I am using ffmpeg encoder to encode mpeg4 to mpeg 2
The original file is 480x480 30fps
encoding to 480x480 with 240 letter-boxed sides, 2400 kbs.
No matter what I set the options to, the file either refuses to encode (randomly) setting the output file without appending the .mpg extension it is supposed to, or, even more quirkily, ignoring my setting for the bitrate and instead encoding to 9000kbs. This makes a file WAY too big for what I want. This problem seems confined to ffmpeg. Mpeg2enc works fine, but I want to take advantage of ffmpeg's ability to add letter boxing in such a way as to not distort the video. if my video is at 480x480, I want the resultant file to be 720x480 by virtue of adding bars to the 480x480 files, mpeg2enc seems to insist on scaling the video, since there is no control over the letter boxed sizes.
So… what gives, and how do I force ffmpeg to acknowledge me as it's rightful lord and master?
Results 1 to 9 of 9
-
-
First, SVCD video is standardized 480x480 for a full 4:3 resolution and it does not need any letterboxing.
Second, with ffmpeg engine, you may try to set the profile to "None" if you need to lower the ceiling maxrate.
-
Well… I am not trying to encode for SVCD, but rather DVD. Thus I want to re-encode with the 480x480 vid boxed in the 720x480 frame. Since the file will be used both for stand alone player as well as computer, I want to minimize encoding artifacts, while accounting for the minimum 50 pixels per side lost due to TV specifications.
The real issue is why it is insisting on encoding at 9000kbs
-
1/ Resizing is needed to maintain the image aspect ratio, but no letterboxing is needed, as NTSC SVCD contains 480x480-sized frames implicitly scaled from an ITU-R BT.601 source of 720x480 pixels. This is done by using a pixel aspect ratio of 15/11 for SVCD instead as 10/11 for a NTSC television, so implying that to convert SVCD to DVD you should keep the image height unchanged (11/11) and apply a resize factor of 15/10 to the width (480*15/10=720). Doing the opposite (resizing the height and adding black bars) would imply downsizing, that is, losing image information. Using a Half-DVD size would also downgrade quality a little (useful when size matters).
2/ ffmpeg always encodes in variable bitrate, and the value of 9000kbps which may be shown in the information line is a nominal ceiling bitrate stored by ffmpeg in the file header, and not the real bitrate (which you may determine in average by dividing the file size by the duration of the movie).
-
OK, well that was informative, if a bit weird. Wondering why there is the option of specifying Q values for constant bit rate if ffmpeg doesn't use constant bit rate. I guess that is what was throwing me off. Is there any good source anywhere detailing esoteric info like pixel aspect ratios of different formats? This aspect raton difference makes sense, and explains why quicktime would show the image as a square (being ornery as it is) , whereas VLC and mplayer (djoplayer)_showed them as rectangular.
-
It is currently very difficult if not impossible to make ffmpeg create a true constant bitrate stream. However, for mpeg-2 video this is usually not needed, as variable bitrate lead to a better file compression for the same image quality.
For information about aspect ratio you may check the Jukka Aho page at http://www.uwasa.fi/~f76998/video/conversion/
-
Thanks major.
Thing is, I WANT a variable bit rate. I am just wondering why one has the tools to edit Q values for constant bit-rate available in ffmpeg if they don't actually DO anything. That is what was confusing. The issue for me is that while ffmpeg has some advantages, like allowing user defined padding of the borders, the file size it is generating is huge compared to mpeg2enc. Also, what purpose does the bit rate value in the calculator serve if the codec ignores it anyhow? just trying to get a handle on the intricacies here, to make better informed decisions before choosing encoding options.
-
The quantizers work, but with ffmpeg the bitrate keeps variable within a range depending on quantizer values. The bitrate value is also taken into account (you may try to encode the same clip to DVD with ffmpeg, first by using the preset values, then again by entering "1000" as bitrate: the resulting movie should be smaller). If you need to shrink the movie size, you should lower the bitrate and increase Qmin.
Similar Threads
-
How to achieve the maximum bit rate in variable bit rate mode ?
By Sxn in forum Newbie / General discussionsReplies: 42Last Post: 3rd Dec 2009, 12:53 -
Bit Rate
By shapper in forum Newbie / General discussionsReplies: 10Last Post: 2nd Jun 2008, 14:04 -
Clock will not stay set to correct time
By driley in forum DVD & Blu-ray RecordersReplies: 15Last Post: 28th Mar 2008, 00:20 -
Bit Rate And Frame Rate
By bharathi_n_r in forum Video ConversionReplies: 2Last Post: 30th Nov 2007, 05:48 -
the right bit rate
By nojee in forum Video ConversionReplies: 5Last Post: 10th Nov 2007, 03:00