[FFmpeg-trac] #2456(undetermined:new): can't concatenate two video files because of different SARs

FFmpeg trac at avcodec.org
Wed Apr 10 23:20:27 CEST 2013


#2456: can't concatenate two video files because of different SARs
-------------------------------------+-------------------------------------
             Reporter:  DK           |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I've got two videos encoded from a sequence of png images and audio
 streams from mp3 with similar params.
 When I try to concatenate them using a custom filter I get this error:

 [Parsed_concat_0 @ 00000000020a20e0] Input link in1:v0 parameters (size
 1280x720, SAR 1:1) do not match the corresponding output link in0:v0
 parameters (1280x720, SAR 0:1)

 I don't quite understand how SARs of my videos both produced from 1280x720
 pngs with the same FFMPEG parameters ended up having different SARs.

 Here's the command line:

 ffmpeg.exe" -report -i test3.mov -i test-h264-jpg.mov -filter_complex
 "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]"
 -start_number 0 -r 25 -vcodec libx264 -crf 15 -preset slow -profile:v main
 -pix_fmt yuv420p -ac 2 -ar 48000 -ab 320k -y  concatted-mux.mov

 and full output:

 ffmpeg started on 2013-04-10 at 22:19:06
 Report written to "ffmpeg-20130410-221906.log"
 Command line:
 "ffmpeg.exe" -report -i test3.mov -i test-h264-jpg.mov -filter_complex
 "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]"
 -start_number 0 -r 25 -vcodec libx264 -crf 15 -preset slow -profile:v main
 -pix_fmt yuv420p -ac 2 -ar 48000 -ab 320k -y concatted-mux.mov
 ffmpeg version N-49527-g985e93a Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Feb  1 2013 18:47:10 with gcc 4.7.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca
 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-librtmp --enable-libschroedinger --enable-
 libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc
 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-
 libx264 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      52. 17.100 / 52. 17.100
   libavcodec     54. 91.100 / 54. 91.100
   libavformat    54. 61.104 / 54. 61.104
   libavdevice    54.  3.103 / 54.  3.103
   libavfilter     3. 35.100 /  3. 35.100
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  2.100 / 52.  2.100
 Splitting the commandline.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-i' ... matched as input file with argument 'test3.mov'.
 Reading option '-i' ... matched as input file with argument
 'test-h264-jpg.mov'.
 Reading option '-filter_complex' ... matched as option 'filter_complex'
 (create a complex filtergraph) with argument '[0:0] [0:1] [1:0] [1:1]
 concat=n=2:v=1:a=1 [v] [a]'.
 Reading option '-map' ... matched as option 'map' (set input stream
 mapping) with argument '[v]'.
 Reading option '-map' ... matched as option 'map' (set input stream
 mapping) with argument '[a]'.
 Reading option '-start_number' ... matched as AVOption 'start_number' with
 argument '0'.
 Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
 fraction or abbreviation)) with argument '25'.
 Reading option '-vcodec' ... matched as option 'vcodec' (force video codec
 ('copy' to copy stream)) with argument 'libx264'.
 Reading option '-crf' ... matched as AVOption 'crf' with argument '15'.
 Reading option '-preset' ... matched as AVOption 'preset' with argument
 'slow'.
 Reading option '-profile:v' ... matched as option 'profile' (set profile)
 with argument 'main'.
 Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
 format) with argument 'yuv420p'.
 Reading option '-ac' ... matched as option 'ac' (set number of audio
 channels) with argument '2'.
 Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
 (in Hz)) with argument '48000'.
 Reading option '-ab' ... matched as AVOption 'ab' with argument '320k'.
 Reading option '-y' ... matched as option 'y' (overwrite output files)
 with argument '1'.
 Reading option 'concatted-mux.mov' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option report (generate a report) with argument 1.
 Applying option filter_complex (create a complex filtergraph) with
 argument [0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a].
 Applying option y (overwrite output files) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input file test3.mov.
 Successfully parsed a group of options.
 Opening an input file: test3.mov.
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032ef00] Format
 mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032ef00] ISO: File Type Major Brand:
 qt
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032ef00] File position before
 avformat_find_stream_info() is 10775937
 [h264 @ 000000000032f460] Using externally provided dimensions
 [h264 @ 000000000032f460] no picture
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032ef00] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032ef00] File position after
 avformat_find_stream_info() is 3111
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test3.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf54.61.104
   Duration: 00:03:34.20, start: 0.000000, bitrate: 402 kb/s
     Stream #0:0(eng), 3, 1/12800: Video: h264 (Main) (avc1 / 0x31637661),
 yuv420p, 1280x720, 74 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
     Metadata:
       handler_name    : DataHandler
     Stream #0:1(eng), 1, 1/44100: Audio: mp3 (.mp3 / 0x33706D2E), 44100
 Hz, stereo, s16p, 320 kb/s
     Metadata:
       handler_name    : DataHandler
 Successfully opened the file.
 Parsing a group of options: input file test-h264-jpg.mov.
 Successfully parsed a group of options.
 Opening an input file: test-h264-jpg.mov.
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032a160] Format
 mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032a160] ISO: File Type Major Brand:
 qt
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032a160] File position before
 avformat_find_stream_info() is 1982254
 [h264 @ 0000000004194920] Using externally provided dimensions
 [h264 @ 0000000004194920] no picture
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032a160] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 000000000032a160] File position after
 avformat_find_stream_info() is 2064
 Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'test-h264-jpg.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 512
     compatible_brands: qt
     encoder         : Lavf54.61.104
   Duration: 00:00:12.09, start: 0.000000, bitrate: 1311 kb/s
     Stream #1:0(eng), 3, 1/12800: Video: h264 (Main) (avc1 / 0x31637661),
 yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1021 kb/s, 25 fps, 25 tbr, 12800
 tbn, 50 tbc
     Metadata:
       handler_name    : DataHandler
     Stream #1:1(eng), 1, 1/44100: Audio: mp3 (.mp3 / 0x33706D2E), 44100
 Hz, stereo, s16p, 320 kb/s
     Metadata:
       handler_name    : DataHandler
 Successfully opened the file.
 Parsing a group of options: output file concatted-mux.mov.
 Applying option map (set input stream mapping) with argument [v].
 Applying option map (set input stream mapping) with argument [a].
 Applying option r (set frame rate (Hz value, fraction or abbreviation))
 with argument 25.
 Applying option vcodec (force video codec ('copy' to copy stream)) with
 argument libx264.
 Applying option profile:v (set profile) with argument main.
 Applying option pix_fmt (set pixel format) with argument yuv420p.
 Applying option ac (set number of audio channels) with argument 2.
 Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
 Successfully parsed a group of options.
 Opening an output file: concatted-mux.mov.
 [concat @ 0000000002089720] Setting entry with key 'n' to value '2'
 [concat @ 0000000002089720] Setting entry with key 'v' to value '1'
 [concat @ 0000000002089720] Setting entry with key 'a' to value '1'
 [buffer @ 0000000002099900] Setting entry with key 'video_size' to value
 '1280x720'
 [buffer @ 0000000002099900] Setting entry with key 'pix_fmt' to value '0'
 [buffer @ 0000000002099900] Setting entry with key 'time_base' to value
 '1/12800'
 [buffer @ 0000000002099900] Setting entry with key 'pixel_aspect' to value
 '0/1'
 [buffer @ 0000000002099900] Setting entry with key 'sws_param' to value
 'flags=2'
 [buffer @ 0000000002099900] Setting entry with key 'frame_rate' to value
 '25/1'
 [graph 0 input from stream 0:0 @ 00000000020a1e60] w:1280 h:720
 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:0/1 sws_param:flags=2
 [abuffer @ 0000000002098be0] Setting entry with key 'time_base' to value
 '1/44100'
 [abuffer @ 0000000002098be0] Setting entry with key 'sample_rate' to value
 '44100'
 [abuffer @ 0000000002098be0] Setting entry with key 'sample_fmt' to value
 's16p'
 [abuffer @ 0000000002098be0] Setting entry with key 'channel_layout' to
 value '0x3'
 [graph 0 input from stream 0:1 @ 00000000020a1f00] tb:1/44100
 samplefmt:s16p samplerate:44100 chlayout:0x3
 [buffer @ 0000000002098ca0] Setting entry with key 'video_size' to value
 '1280x720'
 [buffer @ 0000000002098ca0] Setting entry with key 'pix_fmt' to value '0'
 [buffer @ 0000000002098ca0] Setting entry with key 'time_base' to value
 '1/12800'
 [buffer @ 0000000002098ca0] Setting entry with key 'pixel_aspect' to value
 '1/1'
 [buffer @ 0000000002098ca0] Setting entry with key 'sws_param' to value
 'flags=2'
 [buffer @ 0000000002098ca0] Setting entry with key 'frame_rate' to value
 '25/1'
 [graph 0 input from stream 1:0 @ 00000000020a1de0] w:1280 h:720
 pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1 sws_param:flags=2
 [abuffer @ 0000000002098d40] Setting entry with key 'time_base' to value
 '1/44100'
 [abuffer @ 0000000002098d40] Setting entry with key 'sample_rate' to value
 '44100'
 [abuffer @ 0000000002098d40] Setting entry with key 'sample_fmt' to value
 's16p'
 [abuffer @ 0000000002098d40] Setting entry with key 'channel_layout' to
 value '0x3'
 [graph 0 input from stream 1:1 @ 00000000020a1960] tb:1/44100
 samplefmt:s16p samplerate:44100 chlayout:0x3
 [aformat @ 0000000002088720] Setting entry with key 'sample_fmts' to value
 's16'
 [aformat @ 0000000002088720] Setting entry with key 'sample_rates' to
 value '48000'
 [aformat @ 0000000002088720] Setting entry with key 'channel_layouts' to
 value '0x3'
 Successfully opened the file.
 [audio format for output stream 0:1 @ 00000000020a1ba0] auto-inserting
 filter 'auto-inserted resampler 0' between the filter 'Parsed_concat_0'
 and the filter 'audio format for output stream 0:1'
 [Parsed_concat_0 @ 00000000020a1d40] Input link in1:v0 parameters (size
 1280x720, SAR 1:1) do not match the corresponding output link in0:v0
 parameters (1280x720, SAR 0:1)
 [Parsed_concat_0 @ 00000000020a1d40] Failed to configure output pad on
 Parsed_concat_0
 [AVIOContext @ 000000000209e320] Statistics: 266930 bytes read, 2 seeks
 [AVIOContext @ 000000000032a980] Statistics: 77594 bytes read, 2 seeks

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


More information about the FFmpeg-trac mailing list