digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG: Ffmpeg quirks and corrections (http://www.digitalfaq.com/archives/encode/5403-ffmpeg-ffmpeg-quirks.html)

kwag 09-05-2003 06:57 PM

ffmpeg quirks and corrections
 
Command line argument -bf states that it is for: use "B frames" (only MPEG-4)
This is incorrect :!:
The -bf applies to MPEG-1 ( maybe also MPEG-2 :?: )

-kwag

japie 09-06-2003 07:25 AM

Maybe it's a good suggestion to subscribe to the ffmpeg mailinglist?
It's a devel list so most off the posting are source related, but since your a coder U are probebly most welcom there.
Maybe after some postings, they will give some support on the kvcd matrixes too... (preferably as in mpeg2enc, yust -K kvcd ;)

kwag 09-06-2003 08:32 AM

Hi japie, major, and all :)

Yesterday, I spent a good 5+ hours playing with ffmpeg, and I found some tricks to make ffmpeg work better than the default settings.
One HUGE problem right now with ffmpeg is that it can't use B frames correctly. It's an encoded mess if you turn on B frames :!:
Also, the default VBV buffer is too small.
The VBV parameter (-bufsize), which states to be in kbit, is completely erroneous, just like the -bf (use B frames ( only MPEG-4 ), which does add B frames to the MPEG-1 :!:
So after hours of playing aroung, and not being able to get good quality with a GOP size of 18 ( worse quality with 24 ), I came up with these settings:

Code:

./ffmpeg -on -i your_INPUT_movie_name -s 528x480 -hq -minrate 300 -maxrate 2500 -qmin 6 -qmax 25 -r 23.976 -bufsize 320 -g 18 -i_qfactor .1 your_OUTPUT_movie_name
The min and max q (6 and 25) were just for a wanted target size I was comparing with TMPEG, so your values will be different, depending on what you want to target.
This gives a correct VBV size of 40KB ( 20 displayed in Bitrate Viewer ), and a good balance for the P frame compression, to compensate for the loss of B frames.
In this case, I was trying 528x480, encoding directly from a VOB piece.
Here's the result:
http://www.kvcd.net/downloads/ffmpeg-rp-mod.mpg

And with the same settings, without adjusting VBV and I to P factor, this is what you get with this line:
Code:

./ffmpeg -on -i your_INPUT_movie_name -s 528x480 -hq -minrate 300 -maxrate 2500 -qmin 6 -qmax 25 -r 23.976  -g 18 your_OUTPUT_movie_name
http://www.kvcd.net/downloads/ffmpeg-rp.mpg


It's an obvious difference, and in file size too :!:
It's VERY sad that ffmpeg can't use B frames correctly. Hopefully, they'll fix it in a future release. Right now, I can see the motion estimation is far better than TMPEG. But the loss of B frames, spoils the quality, specially in higher resolutions. You can clearly see the old "flashing" effect every time a new I frame is inserted. So we really need B frames :(

-kwag

major4 09-06-2003 01:09 PM

hi kwag

ffmpeg is so promising that its different quirks MUST be spotted and addressed :-D

I'd suggest to sign-up to the ffmpeg-devel list and post there detailed reports.

I consider the wrong muxing being a big problem, even if it's possible to demux/remux and get some usable results. The mpeg-1/2 b-frames is another important issue. The unstable mpeg-2 support another. Also it seems that the newer CVS does no longer accept VOB input.

kwag 09-06-2003 01:20 PM

Quote:

Originally Posted by major4
hi kwag

ffmpeg is so promising that its different quirks MUST be spotted and addressed :-D

Well, I believe the development is extremely good, because I had tried earlier versions of ffmpeg, and in no way I had results like what I got last night with version 0.4.7 :D
This looks extremely promising, and as a matter of fact, It's very useable at 352x240, and probably better than TMPEG :!:
I also believe that for making DVDs, where low bitrates are not really used, ffmpeg might just do fine with a GOP of 12 and I, P frames only :cool:
Quote:


I'd suggest to sign-up to the ffmpeg-devel list and post there detailed reports.
I'll look into that later today :!:
Quote:


I consider the wrong muxing being a big problem, even if it's possible to demux/remux and get some usable results. The mpeg-1/2 b-frames is another important issue. The unstable mpeg-2 support another. Also it seems that the newer CVS does no longer accept VOB input.
You mean the CVS of mpeg2enc :?:
Because I downloaded and recompiled ffmpeg 0.4.7 from the CVS tree last night, and I can process VOBs directly.

-kwag

kwag 09-06-2003 03:30 PM

@major,

Never mind. You are correct.The current ffmpeg CVS version ( 0.4.8 ) is broken :(
It can't open VOBs or MPEG-2 files.
Waiting for the next CVS update :roll:

-kwag


All times are GMT -5. The time now is 11:35 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.