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: 3,038
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,802
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: 3,038
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,802
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: 56
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: 3,038
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,802
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: 56
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: 3,038
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
Old 29th May 2021, 04:39   #50  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 738
Version 4.1 (28/05/2021):

- Eliminated sc_factor because changes in FFMpeg 4.
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 27th June 2021, 15:29   #51  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 738
Here they are reporting that the -preme option has been removed from FFMpeg, but there are compilations like this one that is still present. If an error message appears indicating that the -preme option is not recognized, remove it from the script, this solution is temporary.
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 27th June 2021, 19:36   #52  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 738
DVD script version 4.2:

- Removed -preme argument, deprecated of FFMpeg builds. Thanks to lvqcl for report it. For this cause exists an increment in encoding speed.
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 29th June 2021, 14:43   #53  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 738
nevcairiel has reported that for the purposes of the mpeg2 -preme codec it has been renamed to -mepre, however I have made the difficult decision so far not to reincorporate it in the script, since this has obtained a gain in encoding speed in the order of 25% or more. I think that a debatable improvement in the image is not enough compensation, since the idea is to balance the quality-speed ratio.

In any case, as in science, there is never something definitive.
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 5th January 2022, 18:59   #54  |  Link
PatchWorKs
Registered User
 
PatchWorKs's Avatar
 
Join Date: Aug 2002
Location: Italy
Posts: 270
Suggeston: how about add "-hwaccel auto" to both passes ?
PatchWorKs is offline   Reply With Quote
Old 26th February 2022, 02:08   #55  |  Link
WSC4
Registered User
 
Join Date: Jun 2011
Location: Melbourne, Australia
Posts: 56
Hi there Manolito. You have not posted for a while. How are you going?

I suffered a major hard drive crash in September 2020 and lost the lot. Sent the HD to 2 data recovery companies but they could not recover data. It has taken me over a year to rebuild FFmpeg commands, Mplex commands, DVDStyler layouts, AC3to commands, CoverDesigner layout et cetera to get back to where I was. It will never be the same.

I still use your FFmpeg commands listed on post number 6.

-intra_matrix "8,8,9,9,10,10,11,11,8,9,9,10,10,11,11,12,9,9,10,10,11,11,12,12,9,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16"
-inter_matrix "8,8,9,9,10,10,11,11,8,9,9,10,10,11,11,12,9,9,10,10,11,11,12,12,9,10,10,11,11,12,13,13,10,10,11,11,12,13,13,14,10,11,11,12,13,13,14,15,11,11,12,13,13,14,15,15,11,12,12,13,14,15,15,16"

I do everything on the command line first using FFmpeg for the M2V and AC3to and Mplex for LPCM to the MPG. I use DVDStyler on copy mode only.

I notice also you have not posted on the DVDStyler forum for a very long time. Have you moved up to Muxman DVD authoring Professional - or even Scenarist? :-)

Last edited by WSC4; 26th February 2022 at 02:15.
WSC4 is offline   Reply With Quote
Old 26th February 2022, 13:04   #56  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Metropolitan City of Milan, Italy
Posts: 2,353
Quote:
Originally Posted by WSC4 View Post
Hi there Manolito. You have not posted for a while. How are you going?

[...]

I notice also you have not posted on the DVDStyler forum for a very long time. Have you moved up to Muxman DVD authoring Professional - or even Scenarist? :-)
Manolito is one of the elderly members of the community and he's been here for a very long time. Unfortunately, he had a stroke when he went to bed one day last year. Don't worry, he's still alive, 'cause his wife eventually noticed and he was eventually rushed to the hospital if I remember correctly. In any case, that was a really close call for him and this is the kind of event that affect a person both physically and mentally. He came back to Doom9 talking to some of us who have been here the longest like Ferenc, Stephen, StainlessS etc saying that it was indeed a close call and that he was gonna spend the rest of his life enjoying the little things together with his wife rather than perfecting Avisynth Scripts and encoding BATs. We all wished him a quick recovery and we understood his decision. Sometimes when you almost pass away, you re-evaluate important things in life.
I don't know if he'll ever come back to Doom9 at this point, but one thing is certain: his legacy will live for years to come.

Last edited by FranceBB; 26th February 2022 at 13:07.
FranceBB is offline   Reply With Quote
Old 23rd May 2022, 18:03   #57  |  Link
PatchWorKs
Registered User
 
PatchWorKs's Avatar
 
Join Date: Aug 2002
Location: Italy
Posts: 270
@GMJCZP I perfectly know that i'm talking about VINTAGE encoding parameters/matrices, but what about to "save" KVCD/KSVCD/KDVD too ?

http://www.digitalfaq.com/archives/e...-kdvd-faq.html
__________________
HYbrid Multimedia Production Suite page @ GitHub
PatchWorKs 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 06:05.


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