Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th October 2019, 04:59   #41  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,906
The reason for reducing the max bitrate and also the max average bitrate is that the FFmpeg MPEG2 encoder still has a lousy rate control. Overshooting the specified max bitrate is very common (even the very old and deprecated QuEnc which is also based on libavcodec had this overshooting), and this can cause errors when multiplexing and authoring the encoded stream. You can check such a high bitrate encode by authoring it with MuxMan. If MuxMan does not choke on it then you are fine, but if it does choke then you should reencode the source with a lower bitrate and/or a different quant matrix.

Other MPEG2 encoders like CCE, HCenc or ProCoder do also overshoot, but to a much lesser degree than FFmpeg. Also these encoders seem to have a better VBV buffer control than FFmpeg so you only get muxing and authoring errors very rarely.
manolito is offline   Reply With Quote
Old 15th October 2019, 19:53   #42  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,465
CCE basically never. Probably has the best rate control from any DVD compliant encoder.
kolak is offline   Reply With Quote
Old 16th October 2019, 07:30   #43  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,906
I only have some experience with CCE 2.50 up to 2.70 (switched to HCenc afterwards), but I do remember that these versions did overshoot the specified max bitrate in many cases. The MuxMan log file shows the peak bitrates, so this was easy to see. But this never caused Mplex and DVDAuthor to choke on these encodes (contrary to encodes made with libavcodec).

Last edited by manolito; 16th October 2019 at 07:34.
manolito is offline   Reply With Quote
Old 16th October 2019, 22:16   #44  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,465
Not sure about MuxMan, but I take Scenarist as reference muxer for DVD (it's very picky one) and I had basically 0 problems (done encodes in thousands over 8 years with 2.7 and SP3).
It's not about very short peaks, but properly calculated ones which take into account all DVD muxing restrictions.
ProCoder was ok, but not as good.

Last edited by kolak; 16th October 2019 at 22:21.
kolak is offline   Reply With Quote
Old 22nd October 2019, 09:39   #45  |  Link
WSC4
Registered User
 
Join Date: Jun 2011
Location: Melbourne, Australia
Posts: 41
Sorry, I forgot to subscribe to this thread and have just seen these replies.

I found a number of bit rate viewers to install, and here are the results of my FFmpeg encode which is video + audio.

The Bitrate Viewer shows a maximum short peak of 10698 kbps at 2:33 time.

MPEG-2 Validator shows a maximum short peak of 10447 kbps at 154 seconds. The average bit-rate is 8750 kb/s

The programs you mention may fail my bit rates, but what about real-time tests on modern DVD players today? Will a DVD player stop, pause, start, show pixelation or show an error on the screen or just not play at all?

I do not have a dedicated DVD player, only a modern, high-end Blu-ray player. Testing on this would be unfair.

Last edited by WSC4; 22nd October 2019 at 09:49.
WSC4 is offline   Reply With Quote
Old 22nd October 2019, 11:28   #46  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,906
Just dug out some very old threads about this problem. The problem is not only the encoder, the muxing and the authoring applications are just as important.

Have a look at this thread:
https://forum.doom9.org/showthread.p...319#post739319
and especially this post:
https://forum.doom9.org/showthread.p...503#post743503

Of course when using a modern BD player for playback you probably won't get any stutter even with a DVD which is outside of the specs. But I would not recommend to simply ignore the specs.

For me the ultimate (and free) DVD compliance checker is the latest free version of MuxMan (just as picky as Scenarist, but I cannot afford Scenarist). Mplex/DVDAuthor and FFmpeg/DVDAuthor are far less reliable in my experience.

Last edited by manolito; 22nd October 2019 at 12:51.
manolito is offline   Reply With Quote
Old 1st November 2019, 22:28   #47  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,465
Quote:
Originally Posted by WSC4 View Post
Sorry, I forgot to subscribe to this thread and have just seen these replies.

I found a number of bit rate viewers to install, and here are the results of my FFmpeg encode which is video + audio.

The Bitrate Viewer shows a maximum short peak of 10698 kbps at 2:33 time.

MPEG-2 Validator shows a maximum short peak of 10447 kbps at 154 seconds. The average bit-rate is 8750 kb/s

The programs you mention may fail my bit rates, but what about real-time tests on modern DVD players today? Will a DVD player stop, pause, start, show pixelation or show an error on the screen or just not play at all?

I do not have a dedicated DVD player, only a modern, high-end Blu-ray player. Testing on this would be unfair.
Those bitrate viewers are most often not very good and they don't take into account whole VBV model. Spikes above 10Mbit are fine if they are very short.
kolak is offline   Reply With Quote
Old 17th April 2020, 10:10   #48  |  Link
WSC4
Registered User
 
Join Date: Jun 2011
Location: Melbourne, Australia
Posts: 41
Hi Manolito, Has there been any update to your parameters that you posted here:

https://forum.doom9.org/showthread.p...47#post1808247

I need to use your commands to encode an interlaced MPEG video to progressive, what are you thoughts on FFmpeg's YADIF or the new FFmpeg BWDIF deinterlacer? I have seen reports that it is better than YADIF, which is pretty old now.
WSC4 is offline   Reply With Quote
Old 17th April 2020, 12:26   #49  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,906
No, there is no update, these are still the parameters I use...

And I have no idea if Yadif or BWDIF give better deinterlacing results. I tried them both, and the quality looked pretty much the same to me. When making DVDs I usually do not bother to deinterlace interlaced sources. My ancient CRT TV displays interlaced content perfectly, and to tell ffmpeg to encode in interlaced mode all you have to do is add these params to the command line:
Quote:
-flags +ilme+ildct -alternate_scan 1 -top 1
(This is for a TFF source file, for BFF use -top 0).


Cheers
manolito
manolito is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.