[FFmpeg-trac] #1674(FFmpeg:new): Assertion fail when attempting to copy metadata

FFmpeg trac at avcodec.org
Thu Aug 23 22:07:23 CEST 2012


#1674: Assertion fail when attempting to copy metadata
---------------------------------+--------------------------------------
             Reporter:  Chippit  |                     Type:  defect
               Status:  new      |                 Priority:  normal
            Component:  FFmpeg   |                  Version:  git-master
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 Summary of the bug:
 Using two input files, one with both an audio and video stream with some
 metadata, and a second with only an audio stream and no (or undefined)
 metadata, attempting to mux the video from file A with the audio from file
 B while copying metadata from the audio stream of file A results in an
 assertion fail.

 How to reproduce:

 Using any file A (temp.mkv), which can be generated as below (with some
 dummy language metadata for the audio stream) for testing purposes:
 {{{
 % ffmpeg -t 10 -s 200x200 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero -t
 10 -ar 48000 -f s16le -acodec pcm_s16le -i /dev/zero -acodec copy
 -metadata:s:1 language=eng temp.mkv
 }}}

 And file B, 10 seconds of silence generated in Audacity and saved as m4a.
 Can also be generated with a similar command as above.

 Attempt to run:

 {{{
 % ffmpeg -i temp.mkv -i temp.m4a -map 0:0 -map 1:0,0:1 -map_metadata:s:1
 0:s:1 temp.mp4
 }}}

 Results in an error as shown below:

 {{{
 % ffmpeg -i temp.mkv -i temp.m4a -map 0:0 -map 1:0,0:1 -map_metadata:s:1
 0:s:1 temp.mp4 -v 9 -loglevel 99
 ffmpeg version N-43827-gc2271fa Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Aug 23 2012 15:00:38 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration: --enable-gpl --enable-libspeex --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
 --enable-version3 --enable-x11grab
   libavutil      51. 70.100 / 51. 70.100
   libavcodec     54. 54.100 / 54. 54.100
   libavformat    54. 25.104 / 54. 25.104
   libavdevice    54.  2.100 / 54.  2.100
   libavfilter     3. 13.100 /  3. 13.100
   libswscale      2.  1.101 /  2.  1.101
   libswresample   0. 15.100 /  0. 15.100
   libpostproc    52.  0.100 / 52.  0.100
 [matroska,webm @ 0xa429520] 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 @ 0xa429520] File position before
 avformat_find_stream_info() is 683
 [matroska,webm @ 0xa429520] parser not found for codec pcm_s16le, packets
 or times may be invalid.
 [h264 @ 0xa430080] no picture
 [matroska,webm @ 0xa429520] parser not found for codec pcm_s16le, packets
 or times may be invalid.
 [matroska,webm @ 0xa429520] All info found
 [matroska,webm @ 0xa429520] File position after
 avformat_find_stream_info() is 3520
 Guessed Channel Layout for  Input Stream #0.1 : mono
 Input #0, matroska,webm, from 'temp.mkv':
   Metadata:
     ENCODER         : Lavf54.25.104
   Duration: 00:00:10.00, start: 0.000000, bitrate: 775 kb/s
     Stream #0:0, 3, 1/1000: Video: h264 (High 4:4:4 Predictive), yuv444p,
 200x200, 1/50, SAR 1:1 DAR 1:1, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
     Stream #0:1(eng), 1, 1/1000: Audio: pcm_s16le, 48000 Hz, mono, s16,
 768 kb/s (default)
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa430d40] Format mov,mp4,m4a,3gp,3g2,mj2
 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa430d40] ISO: File Type Major Brand: M4A
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa430d40] File position before
 avformat_find_stream_info() is 112505
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa430d40] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa430d40] File position after
 avformat_find_stream_info() is 184
 Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'temp.m4a':
   Metadata:
     major_brand     : M4A
     minor_version   : 512
     compatible_brands: isomiso2
     encoder         : Lavf53.21.0
   Duration: 00:00:10.00, start: 0.000000, bitrate: 89 kb/s
     Stream #1:0(und), 1, 1/44100: Audio: aac (mp4a / 0x6134706D), 44100
 Hz, mono, s16, 86 kb/s
     Metadata:
       handler_name    : SoundHandler
 File 'temp.mp4' already exists. Overwrite ? [y/N] y
 Assertion 0 failed at ffmpeg_opt.c:449
 Aborted (core dumped)
 }}}

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


More information about the FFmpeg-trac mailing list