Hello, When I took a video that had smaller frames and increased the frame size the file size got bigger... I kind of expected that so I thought nothing of it. This time I took a video and decreased it's size to 220x160. A 9MB .mov with 320x240 resolution went to 12 MB flv with 220x160 resolution, and that's with qscale 3.5. At qscale 0.1, trying to keep a good quality, it went up to 24 MB. Here is a command line I used: ffmpeg -i /tgo_special_edition_another_perfect_season_trailer.mov -f flv -ar 22050 -ab 32 -s 220x166 -qscale 3.5/tgo_special_edition_another_perfect_season_trailer.mov.flv Here is the original file: http://www.mxsponsor.com/tgo_special_edition_another_perfect_season_trailer.... The flash video encoder, that came with flash 8, produced it at 8.3 MB with the Sorenson Spark at high quality, and 32 kbps on sound. The flash video encoder was also able to do it at 220x165, which ffmpeg gave me a "multiples of 2" error. -Luke
On date Sunday 2007-08-26 08:06:13 -0700, Luke Scott encoded:
Hello,
When I took a video that had smaller frames and increased the frame size the file size got bigger... I kind of expected that so I thought nothing of it. This time I took a video and decreased it's size to 220x160. A 9MB .mov with 320x240 resolution went to 12 MB flv with 220x160 resolution, and that's with qscale 3.5. At qscale 0.1, trying to keep a good quality, it went up to 24 MB.
Here is a command line I used:
ffmpeg -i /tgo_special_edition_another_perfect_season_trailer.mov -f flv -ar 22050 -ab 32 -s 220x166 -qscale 3.5/tgo_special_edition_another_perfect_season_trailer.mov.flv
Here is the original file:
http://www.mxsponsor.com/tgo_special_edition_another_perfect_season_trailer....
The flash video encoder, that came with flash 8, produced it at 8.3 MB with the Sorenson Spark at high quality, and 32 kbps on sound.
This gives you a 11MB file, with a slightly worst quality: ffmpeg -i tgo-perfect-season.mov -ar 22050 -ab 32k -g 25 -qscale 6 tgo-perfect-season.flv You need also to change the gop size (-g 25) to keep the I/P number of frames ratio comparable. In the case of the original file you have: I frames mean size: 4208.91472868217 I frames number: 129 P frames mean size: 2713.66288017589 P frames number: 2729 With the FLV encoded by ffmpeg you get: I frames mean size: 9357.03571428572 I frames number: 140 P frames mean size: 3458.86428834131 P frames number: 2719 Increasing the quality too much (reducing the qscale) doesn't help so much, since it doesn't add sensible quality to the original one, furthermore Mpeg 4 achieves better compression ratios than FLV. Cheers. -- ffmpeg-user random tip #16 Patches are welcome!
What's the difference between ffmpeg and mencoder? Lets say that I wanted the best quality possible, but only have a maximum video bit rate of 1000kbps and not go over. How can I do this? -Luke On 8/26/07, Stefano Sabatini <stefano.sabatini-lala at poste.it> wrote:
Hello,
When I took a video that had smaller frames and increased the frame size
On date Sunday 2007-08-26 08:06:13 -0700, Luke Scott encoded: the
file size got bigger... I kind of expected that so I thought nothing of it. This time I took a video and decreased it's size to 220x160. A 9MB .mov with 320x240 resolution went to 12 MB flv with 220x160 resolution, and that's with qscale 3.5. At qscale 0.1, trying to keep a good quality, it went up to 24 MB.
Here is a command line I used:
ffmpeg -i /tgo_special_edition_another_perfect_season_trailer.mov -f flv -ar 22050 -ab 32 -s 220x166 -qscale 3.5/tgo_special_edition_another_perfect_season_trailer.mov.flv
Here is the original file:
http://www.mxsponsor.com/tgo_special_edition_another_perfect_season_trailer....
The flash video encoder, that came with flash 8, produced it at 8.3 MB
with
the Sorenson Spark at high quality, and 32 kbps on sound.
This gives you a 11MB file, with a slightly worst quality: ffmpeg -i tgo-perfect-season.mov -ar 22050 -ab 32k -g 25 -qscale 6 tgo-perfect-season.flv
You need also to change the gop size (-g 25) to keep the I/P number of frames ratio comparable.
In the case of the original file you have: I frames mean size: 4208.91472868217 I frames number: 129 P frames mean size: 2713.66288017589 P frames number: 2729
With the FLV encoded by ffmpeg you get: I frames mean size: 9357.03571428572 I frames number: 140 P frames mean size: 3458.86428834131 P frames number: 2719
Increasing the quality too much (reducing the qscale) doesn't help so much, since it doesn't add sensible quality to the original one, furthermore Mpeg 4 achieves better compression ratios than FLV.
Cheers. -- ffmpeg-user random tip #16 Patches are welcome! _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
On date Tuesday 2007-08-28 08:18:05 -0700, Luke Scott encoded:
What's the difference between ffmpeg and mencoder?
Lets say that I wanted the best quality possible, but only have a maximum video bit rate of 1000kbps and not go over. How can I do this?
Please don't top post. You may use -maxrate 1000k to limit the maximum bitrate (you also need to set -bufsize). Even in this case you have no guarantee that the encoder will be able to respect the bitrate constraints imposed, and ffmpeg may complain everytime it can't respect them (VBV overflow or underflow). When using VBV limits you have to follow these rules (see libavcodec/mpegvideo_enc.c): 1) -b between -minrate and -maxrate 2) -bufsize has to be *at least* the size of a frame with the -b bitrate (e.g. if you have -b 1000k and -r 30 then buf_size should be greater or equal to 1000k * (1/30) ~= 33k). Another strategy to reduce the bitrate is to act on the structure of every single gop, for example using longer gops and B frames (if the codec supports them), and/or to change the spatial (width * height samples) or temporal (frame rate) resolution of the video sequence. Anyway even setting the quality to the least (something that can be achieved using for example -qmin 51 or -qmin 31 depending on the codec, which issues a rather interesting dadaist effect on the output video) you can't achieve an arbitrary low bitrate: and the compression, being entropic also depends on the features of the video (complexity of every single image and e.g. number of sequence cuts). HTH, cheers. -- ffmpeg-user random tip #7 If you're asking about problems with an ffmpeg tool, *always* post the command you're using and the complete output.
Hi Stefano, Stefano Sabatini said:
On date Tuesday 2007-08-28 08:18:05 -0700, Luke Scott encoded:
Lets say that I wanted the best quality possible, but only have a maximum video bit rate of 1000kbps and not go over. How can I do this?
Please don't top post.
You may use -maxrate 1000k to limit the maximum bitrate (you also need to set -bufsize).
Even in this case you have no guarantee that the encoder will be able to respect the bitrate constraints imposed, and ffmpeg may complain everytime it can't respect them (VBV overflow or underflow).
When using VBV limits you have to follow these rules (see libavcodec/mpegvideo_enc.c): 1) -b between -minrate and -maxrate 2) -bufsize has to be *at least* the size of a frame with the -b bitrate (e.g. if you have -b 1000k and -r 30 then buf_size should be greater or equal to 1000k * (1/30) ~= 33k).
Another strategy to reduce the bitrate is to act on the structure of every single gop, for example using longer gops and B frames (if the codec supports them), and/or to change the spatial (width * height samples) or temporal (frame rate) resolution of the video sequence.
Anyway even setting the quality to the least (something that can be achieved using for example -qmin 51 or -qmin 31 depending on the codec, which issues a rather interesting dadaist effect on the output video) you can't achieve an arbitrary low bitrate: and the compression, being entropic also depends on the features of the video (complexity of every single image and e.g. number of sequence cuts).
That looks a very nice FAQ entry. Would you mind re-posting it to ffmpeg-devel as a patch to the docs? Regards, V?ctor
participants (3)
-
lukemessenger@gmail.com -
stefano.sabatini-lala@poste.it -
wzrlpy@arsystel.com