[FFmpeg-user] Concatenating MP4 Problems

Nicolas George nicolas.george at normalesup.org
Tue Nov 6 17:57:14 CET 2012


Le quintidi 15 brumaire, an CCXXI, Young Kim a écrit :
>     Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 848x480 [SAR 107:106 DAR 107:60], 799 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc
>     Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 848x480 [SAR 427:424 DAR 427:240], 420 kb/s, 23.98 fps, 23.98 tbr, 11988 tbn, 47.95 tbc
>     Stream #2:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 848x480 [SAR 107:106 DAR 107:60], 803 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc

There are two problems here.

First, your videos were all rescaled from their original resolution to
848×480 with almost-square pixels. The problem is the "almost". I suggest
you use "setsar=1" to transform the almost-square to a real square, ignoring
the very small distortion to the image. This should get concat working.

There is another problem, which will result in something ugly: your files
have a different frame rate. This is not a problem for concat, it uses
microsecond-accurate timestamps. But the output file needs something, and
ffmpeg does not like to produce variable frame rate by default. You have to
chose something. If you want a variable frame rate, assuming your video are
really 30000/1001 and 24000/1001 frames per second, a time base of 1/120000
or 1001/120000 should do the trick.

Also, I would suggest you do not work with intermediary files if you can
avoid it: use your files in their full original resolution for ffmpeg input
and do all the treatments in a single pass. If this is not possible,
consider using a much higher bitrate for your intermediate files.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20121106/28112917/attachment.asc>


More information about the ffmpeg-user mailing list