[FFmpeg-user] Altering mp4 container and video stream headers without transcoding

Philip Kahle philip.kahle at gmail.com
Wed Dec 12 12:23:28 CET 2012


Hi all,

I have a huge amount of mp4 files (video mpeg4, audio aac) with wrong
aspect ratio and I want to fix that on container/header level without
touching the streams (due to time and quality reasons).

I already tried altering the header with mp4box and it seems to work.
However, the source file and the resulting one slightly differ in
bitrate according to ffprobe. The only differences in ffprobes output
(-show_streams -show_format):

Source file:

Duration: 00:00:10.40, start: 0.000000, bitrate: 5809 kb/s Stream
#0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p,
720x576 [SAR 1:1 DAR 5:4], 5612 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc

size=7549051

Result:

Duration: 00:00:10.40, start: 0.000000, bitrate: 5806 kb/s Stream
#0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p,
720x576 [SAR 16:15 DAR 4:3], 5612 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc

size=7551734

My questions are:
How can the aspect ratio possibly impact the bitrate of the stream? Or
does this value just change with the file size and the way ffprobe
computes the VBR?
Do I have to expect defects with this approach?

And what I could not find in the documentation: Is there a way to fix
these files with ffmpeg without doing any transcoding?

Thanks and kind regards,
Philip


More information about the ffmpeg-user mailing list