[FFmpeg-trac] #6671(undetermined:new): FFMPEG does not convert a file with invalid metadata

FFmpeg trac at avcodec.org
Sun Sep 17 13:27:08 EEST 2017


#6671: FFMPEG does not convert a file with invalid metadata
-------------------------------------+-------------------------------------
             Reporter:  xtemp09      |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  metadata     |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 If FFMPEG finds out that the file contains wrong metadata, it does not
 convert it, even if the metadata is not necessary:


 {{{
 $ cat ffmpeg-20170917-172025.log
 ffmpeg started on 2017-09-17 at 17:20:25
 Report written to "ffmpeg-20170917-172025.log"
 Command line:
 ./ffmpeg -i "/mnt/svalka/media_files/shana/Shakugan no Shana 24 [BDRemux
 1920x1080 AVC FLAC].mkv" -c copy -f matroska -report -y /dev/null
 ffmpeg version N-87286-g6ce4a635ed-static http://johnvansickle.com/ffmpeg/
 Copyright (c) 2000-2017 the FFmpeg developers
   built with gcc 6.4.0 (Debian 6.4.0-4) 20170820
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio
 --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-
 gray --enable-libfribidi --enable-libass --enable-libvmaf --enable-
 libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-
 librtmp --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-
 libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
 --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxvid --enable-libzimg
   libavutil      55. 74.100 / 55. 74.100
   libavcodec     57.105.100 / 57.105.100
   libavformat    57. 82.100 / 57. 82.100
   libavdevice    57.  8.100 / 57.  8.100
   libavfilter     6.105.100 /  6.105.100
   libswscale      4.  7.103 /  4.  7.103
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
 Splitting the commandline.
 Reading option '-i' ... matched as input url with argument
 '/mnt/svalka/media_files/shana/Shakugan no Shana 24 [BDRemux 1920x1080 AVC
 FLAC].mkv'.
 Reading option '-c' ... matched as option 'c' (codec name) with argument
 'copy'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'matroska'.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-y' ... matched as option 'y' (overwrite output files)
 with argument '1'.
 Reading option '/dev/null' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option report (generate a report) with argument 1.
 Applying option y (overwrite output files) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input url
 /mnt/svalka/media_files/shana/Shakugan no Shana 24 [BDRemux 1920x1080 AVC
 FLAC].mkv.
 Successfully parsed a group of options.
 Opening an input file: /mnt/svalka/media_files/shana/Shakugan no Shana 24
 [BDRemux 1920x1080 AVC FLAC].mkv.
 [NULL @ 0x5de9460] Opening '/mnt/svalka/media_files/shana/Shakugan no
 Shana 24 [BDRemux 1920x1080 AVC FLAC].mkv' for reading
 [file @ 0x5de9c80] Setting default whitelist 'file,crypto'
 [matroska,webm @ 0x5de9460] Format matroska,webm probed with size=2048 and
 score=100
 st:0 removing common factor 1000000 from timebase
 st:1 removing common factor 1000000 from timebase
 [matroska,webm @ 0x5de9460] Before avformat_find_stream_info() pos: 14165
 bytes read:32768 seeks:0 nb_streams:2
 [h264 @ 0x5dee640] nal_unit_type: 7, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 8, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 7, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 8, nal_ref_idc: 3
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [h264 @ 0x5dee640] nal_unit_type: 7, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 8, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 6, nal_ref_idc: 0
 [h264 @ 0x5dee640] nal_unit_type: 6, nal_ref_idc: 0
 [h264 @ 0x5dee640] nal_unit_type: 6, nal_ref_idc: 0
 [h264 @ 0x5dee640] nal_unit_type: 5, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 5, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 5, nal_ref_idc: 3
 [h264 @ 0x5dee640] nal_unit_type: 5, nal_ref_idc: 3
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [h264 @ 0x5dee640] Reinit context to 1920x1088, pix_fmt: yuv420p
 [h264 @ 0x5dee640] no picture
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [h264 @ 0x5dee640] ct_type:1 pic_struct:0
 [matroska,webm @ 0x5de9460] All info found
 [matroska,webm @ 0x5de9460] After avformat_find_stream_info() pos: 1082096
 bytes read:1082096 seeks:0 frames:10
 Input #0, matroska,webm, from '/mnt/svalka/media_files/shana/Shakugan no
 Shana 24 [BDRemux 1920x1080 AVC FLAC].mkv':
   Metadata:
     encoder         : libebml v1.2.0 + libmatroska v1.1.0
     creation_time   : 2011-07-28T08:17:03.000000Z
   Duration: 00:24:41.03, start: 0.000000, bitrate: 33616 kb/s
     Chapter #0:0: start 105.021000, end 721.071000
     Metadata:
       title           : Part A
     Chapter #0:1: start 721.071000, end 1203.911000
     Metadata:
       title           : Part B
     Chapter #0:2: start 1203.911000, end 1481.025000
     Metadata:
       title           : ED
     Chapter #0:3: start 1486.026000, end 1481.025000
     Metadata:
       title           : Preview
     Stream #0:0, 6, 1/1000: Video: h264 (High), yuv420p(tv, bt709,
 progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn,
 47.95 tbc (default)
     Stream #0:1(jpn), 4, 1/1000: Audio: flac, 48000 Hz, stereo, s16
 (default)
 Successfully opened the file.
 Parsing a group of options: output url /dev/null.
 Applying option c (codec name) with argument copy.
 Applying option f (force format) with argument matroska.
 Successfully parsed a group of options.
 Opening an output file: /dev/null.
 [file @ 0x5e161c0] Setting default whitelist 'file,crypto'
 Successfully opened the file.
 Output #0, matroska, to '/dev/null':
   Metadata:
     encoder         : Lavf57.82.100
     Chapter #0:0: start 105.021000, end 721.071000
     Metadata:
       title           : Part A
     Chapter #0:1: start 721.071000, end 1203.911000
     Metadata:
       title           : Part B
     Chapter #0:2: start 1203.911000, end 1481.025000
     Metadata:
       title           : ED
     Chapter #0:3: start 1486.026000, end 1481.025000
     Metadata:
       title           : Preview
     Stream #0:0, 0, 1/1000: Video: h264 (High) (H264 / 0x34363248),
 yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31,
 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
     Stream #0:1(jpn), 0, 1/1000: Audio: flac ([172][241][0][0] / 0xF1AC),
 48000 Hz, stereo, s16 (default)
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 [matroska @ 0x5e3ada0] get_metadata_duration returned: 0
 [matroska @ 0x5e3ada0] Invalid chapter start (1486026000000) or end
 (1481025000000).
 av_interleaved_write_frame(): Invalid data found when processing input
 No more output streams to write to, finishing.
 Error writing trailer of /dev/null: Invalid data found when processing
 input
 frame=    1 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A
 speed=   0x
 video:230kB audio:2kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Input file #0 (/mnt/svalka/media_files/shana/Shakugan no Shana 24 [BDRemux
 1920x1080 AVC FLAC].mkv):
   Input stream #0:0 (video): 1 packets read (235318 bytes);
   Input stream #0:1 (audio): 1 packets read (1965 bytes);
   Total: 2 packets (237283 bytes) demuxed
 Output file #0 (/dev/null):
   Output stream #0:0 (video): 1 packets muxed (235318 bytes);
   Output stream #0:1 (audio): 1 packets muxed (1965 bytes);
   Total: 2 packets (237283 bytes) muxed
 0 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 0x5e14a80] Statistics: 0 seeks, 1 writeouts
 [AVIOContext @ 0x5df1e80] Statistics: 1082096 bytes read, 0 seeks
 Conversion failed!
 }}}

 The file is played normally, however FFMPEG refuses to convert.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6671>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list