This is the draft of the old encoding guide I was working on last fall and never finished. It's far from complete and maybe slightly inaccurate in some areas, but has a lot of good information. I'm posting it here in case anyone wants to finish it or incorporate parts of it into other docs in the meantime. Rich P.S. Especially note that I retract some of the things I've said in the past about -mc 0 and -noskip... So let's discuss them before including them in official docs.
D Richard Felker III wrote:
II.2. Constraints of DVD, SVCD, and VCD
Unfortunately, the DVD, SVCD, and VCD formats are subject to heavy constraints. Only a small selection of encoded picture sizes & aspect ratios are available. If your movie does not meet one of these, you must scale and crop or add black borders (which are bad for quality!) to make it compliant.
Format Resolution V.Codec A.Codec FPS Aspect NTSC DVD 720x480 * MPEG-2 MP2,MP3,AC3,PCM 24,30 4:3,16:9 NTSC SVCD 480x480 MPEG-2 MP2 30 4:3 NTSC VCD 352x240 MPEG-1 MP2 24,30 4:3 PAL DVD 720x576 * MPEG-2 MP2,MP3,AC3,PCM 25 4:3,16:9 PAL SVCD 480x576 MPEG-2 MP2 25 4:3 PAL VCD 352x288 MPEG-1 MP2 25 4:3
* DVD also offers other resolutions but they are usually not desirable.
mp3 is neither permitted nor frequently supported by players; for dvd x=704 is standard and very useful, because it often permits to crop without rescaling
On Fri, Apr 01, 2005 at 09:54:43PM +0200, Nico Sabbi wrote:
D Richard Felker III wrote:
II.2. Constraints of DVD, SVCD, and VCD
Unfortunately, the DVD, SVCD, and VCD formats are subject to heavy constraints. Only a small selection of encoded picture sizes & aspect ratios are available. If your movie does not meet one of these, you must scale and crop or add black borders (which are bad for quality!) to make it compliant.
Format Resolution V.Codec A.Codec FPS Aspect NTSC DVD 720x480 * MPEG-2 MP2,MP3,AC3,PCM 24,30 4:3,16:9 NTSC SVCD 480x480 MPEG-2 MP2 30 4:3 NTSC VCD 352x240 MPEG-1 MP2 24,30 4:3 PAL DVD 720x576 * MPEG-2 MP2,MP3,AC3,PCM 25 4:3,16:9 PAL SVCD 480x576 MPEG-2 MP2 25 4:3 PAL VCD 352x288 MPEG-1 MP2 25 4:3
* DVD also offers other resolutions but they are usually not desirable.
mp3 is neither permitted nor frequently supported by players; for dvd x=704 is standard and very useful, because it often permits to crop without rescaling
Ah yes. :) BTW I think mp3 _is_ standard/supported for PAL DVD, just not NTSC. Can someone verify this? Like I said it's a draft and some of the info is wrong, so thanks for correcting it. Rich
D Richard Felker III wrote: [...]
Format Resolution V.Codec A.Codec FPS Aspect NTSC DVD 720x480 * MPEG-2 MP2,MP3,AC3,PCM 24,30 4:3,16:9 [...] PAL DVD 720x576 * MPEG-2 MP2,MP3,AC3,PCM 25 4:3,16:9 [...]
mp3 is neither permitted nor frequently supported by players; for dvd x=704 is standard and very useful, because it often permits to crop without rescaling
Ah yes. :) BTW I think mp3 _is_ standard/supported for PAL DVD, just not NTSC. Can someone verify this?
I'm quite sure that MP3 is not supported. Only MP2,AC3,PCM and optionally DTS are supported. Of course lots of modern players can play mp3-Files, but AFAIK they still can't play mpegs with mp3 audio. -- Tobias PGP: http://9ac7e0bc.uguu.de
On Sun, Jun 19, 2005 at 04:36:33PM +0200, Tobias Diedrich wrote:
D Richard Felker III wrote: [...]
Format Resolution V.Codec A.Codec FPS Aspect NTSC DVD 720x480 * MPEG-2 MP2,MP3,AC3,PCM 24,30 4:3,16:9 [...] PAL DVD 720x576 * MPEG-2 MP2,MP3,AC3,PCM 25 4:3,16:9 [...]
mp3 is neither permitted nor frequently supported by players; for dvd x=704 is standard and very useful, because it often permits to crop without rescaling
Ah yes. :) BTW I think mp3 _is_ standard/supported for PAL DVD, just not NTSC. Can someone verify this?
I'm quite sure that MP3 is not supported. Only MP2,AC3,PCM and optionally DTS are supported.
My understanding is that you're right, except that MP2 was not included in the NTSC spec, and it's somewhat common to find NTSC players that don't handle DVDs with MP2 audio. Unofficially, there are plenty of nonstandard combinations that some players tolerate, and MP3 audio is just one of many. One thing left out of this guide: MPEG-1 video is allowed on DVD at resolutions of 352x240 (NTSC) or 352x288 (PAL). This isn't identical to VCD; you can use VBR and of course the allowed bitrate is much larger and so is the VBV buffer size.
On Sun, Jun 19, 2005 at 09:58:28AM -0500, Jeff Clagg wrote:
One thing left out of this guide: MPEG-1 video is allowed on DVD at resolutions of 352x240 (NTSC) or 352x288 (PAL). This isn't identical to VCD; you can use VBR and of course the allowed bitrate is much larger and so is the VBV buffer size.
Send a patch ;) Diego
Jeff Clagg wrote:
On Sun, Jun 19, 2005 at 04:36:33PM +0200, Tobias Diedrich wrote:
I'm quite sure that MP3 is not supported. Only MP2,AC3,PCM and optionally DTS are supported.
My understanding is that you're right, except that MP2 was not included in the NTSC spec, and it's somewhat common to find NTSC players that don't handle DVDs with MP2 audio. Unofficially, there are plenty of nonstandard combinations that some players tolerate, and MP3 audio is just one of many.
Right. Now that you mention it... Wikipedia (http://en.wikipedia.org/wiki/DVD-Video) says: |The audio data on a DVD movie can be of the format PCM, DTS, MPEG |audio, or Dolby Digital (AC-3). In countries using the NTSC standard |any movie should contain a sound track in (at least) either PCM or |Dolby AC-3 formats, and any NTSC player must support these two; all |the others are optional. This ensures any standard compatible disc |can be played on any standard compatible player. The vast majority |of commercial NTSC releases today employ AC-3 audio. | |Initially, in countries using the PAL standard (e.g. most of Europe) |the sound of DVD was supposed to be standardized on PCM and MPEG-2 |audio, but apparently against the wishes of Philips, under public |pressure on December 5, 1997, the DVD Forum accepted the addition of |Dolby AC-3 to the optional formats on discs and mandatory formats in |players. The vast majority of commercial PAL releases employ AC-3 |audio by now. -- Tobias PGP: http://9ac7e0bc.uguu.de
Rich, I like this very much, we need to find a way to integrate it into our MEncoder documentation finally. Guillaume, does this sound like a task for you? I have just reread the guide again and found a few more typos and minor glitches, here it goes: On Fri, Apr 01, 2005 at 02:13:49PM -0500, D Richard Felker III wrote:
Although it's the most widely-supported format after MPEG-1, AVI also
s/format/container/ to avoid the all-too-common confusion between file and compression formats. Isn't the name of the container MPEG and MPEG-* the name of the video codecs?
mp3lame Encode VBR or CBR mp3 with LAME
MP3
xvid Xvid
XviD
Your choices for lavc audio are mp2, ac3, and various adpcm formats
I think you are not referring to the option names, so I would capitalize MP2, AC3 and ADPCM.
ffv1 Lossless ffmpeg video codec #1 (slow)
FFmpeg
The so-called "three-pass" encoding which MEncoder supports has been reported to cause A/V desync. This will definitely happen if it is used in conjunction with certain filters, therefore, it is now recommended NOT to use three-pass mode. This feature is only left for compatibility purposes and for expert users who understand when it is safe to use and when it is not. If you have never heard of three-pass mode before, forget that we even mentioned it!
Is this still valid? I remember Loren doing a lot of n-pass work, but probably it only applies to x264, dunno.
Encoding from 2:2 pulldown PAL DVD, title 1 2.35:1 picture aspect 1200 kbit/sec mpeg4 video
MPEG-4
128 kbit/sec average-bitrate mp3 audio
MP3
Encoding from soft-telecined NTSC DVD, title 3 2.35:1 picture aspect 900 kbit/sec mpeg4 video
MPEG-4
Encoding from an existing AVI file 500 kbit/sec mpeg4 video 96 kbit/sec average-bitrate mp3 audio
MPEG-4, MP3
Encoding from an existing AVI file 500 kbit/sec mpeg4 video
MPEG-4
2. Any vertical scaling must be performed in interlaced mode
period at the end Diego
On Mon, Apr 04, 2005 at 02:46:25AM +0200, Diego Biurrun wrote:
The so-called "three-pass" encoding which MEncoder supports has been reported to cause A/V desync. This will definitely happen if it is used in conjunction with certain filters, therefore, it is now recommended NOT to use three-pass mode. This feature is only left for compatibility purposes and for expert users who understand when it is safe to use and when it is not. If you have never heard of three-pass mode before, forget that we even mentioned it!
Is this still valid? I remember Loren doing a lot of n-pass work, but probably it only applies to x264, dunno.
This is from back when 3pass meant the frameno.avi crap. Now it should be clarified since there are two meanings of 3pass, and one is good (albeit unnecessary) while the other sucks. Rich
Hi, On Apr 4, 2005 2:46 AM, Diego Biurrun <diego@biurrun.de> wrote:
Rich, I like this very much, we need to find a way to integrate it into our MEncoder documentation finally. Guillaume, does this sound like a task for you?
Yes, I can certainly do that. We'll have to make some decision on how to organize the new guide as it will be substantially bigger than the old one (if the outputted HTML could be spread across several files, I think it would help readability). Also, some of Rich's paragraphs are pretty much a rewrite of the old guide, and I'm not sure how I should deal with those issues as Rich told me that he started to work on his guide when MEncoder's doc was crappy. I guess the best thing would be to take the best of both worlds, but that'll require a little more work than a simple copy/paste + XML formating. Here's what I think I'm gonna do: Merge Rich's guide into the XML section by section, starting with the ones that I'm comfortable with (like cropping, scaling...). The one(s) I'm not comfortable with is the section about pulldown, as to the best of my knowledge, there's already a fairly big explanation of proper pulldown on the docs, so I'm not sure I'm gonna be able to extract the relevant new informations to put only those on the XML. I'll see how it goes.
I have just reread the guide again and found a few more typos and minor glitches, here it goes:
Would you append to have a corrected draft on hand that you could send me (on private mail for example)? If you don't that's fine too, it's just that whenever you might save some of my time, it means more time I can put toward working on the guide.
On Fri, Apr 01, 2005 at 02:13:49PM -0500, D Richard Felker III wrote:
The so-called "three-pass" encoding which MEncoder supports has been reported to cause A/V desync. This will definitely happen if it is used in conjunction with certain filters, therefore, it is now recommended NOT to use three-pass mode. This feature is only left for compatibility purposes and for expert users who understand when it is safe to use and when it is not. If you have never heard of three-pass mode before, forget that we even mentioned it!
Is this still valid? I remember Loren doing a lot of n-pass work, but probably it only applies to x264, dunno.
Loren's 3 (and up) pass encode is for lavc and x264. Depending on the movie material, it really can improve PSNR (also I must say raising PSNR by 0.5-0.7dB at the best isn't something you can see at first glance at the encoded movie. Regards, Guillaume
On Mon, Apr 04, 2005 at 10:10:57AM +0200, Guillaume Poirier wrote:
On Apr 4, 2005 2:46 AM, Diego Biurrun <diego@biurrun.de> wrote:
Rich, I like this very much, we need to find a way to integrate it into our MEncoder documentation finally. Guillaume, does this sound like a task for you?
Yes, I can certainly do that.
Good to hear.
We'll have to make some decision on how to organize the new guide as it will be substantially bigger than the old one (if the outputted HTML could be spread across several files, I think it would help readability).
That's certainly possible.
I guess the best thing would be to take the best of both worlds, but that'll require a little more work than a simple copy/paste + XML formating.
Sounds like a plan.
Here's what I think I'm gonna do: Merge Rich's guide into the XML section by section, starting with the ones that I'm comfortable with (like cropping, scaling...). The one(s) I'm not comfortable with is the section about pulldown, as to the best of my knowledge, there's already a fairly big explanation of proper pulldown on the docs, so I'm not sure I'm gonna be able to extract the relevant new informations to put only those on the XML. I'll see how it goes.
Start like this, we can worry about the tricky parts once we arrive there.
I have just reread the guide again and found a few more typos and minor glitches, here it goes:
Would you append to have a corrected draft on hand that you could send me (on private mail for example)? If you don't that's fine too, it's just that whenever you might save some of my time, it means more time I can put toward working on the guide.
No, I just read it and added my corrections inline in the email. You'll have to extract my corrections from there. If it's too much of a bother I can provide you with a version of the draft that includes the fixes, although I doubt this will save you much work. Diego
Hi, On Apr 4, 2005 12:01 PM, Diego Biurrun <diego@biurrun.de> wrote:
On Mon, Apr 04, 2005 at 10:10:57AM +0200, Guillaume Poirier wrote:
On Apr 4, 2005 2:46 AM, Diego Biurrun <diego@biurrun.de> wrote:
Rich, I like this very much, we need to find a way to integrate it into our MEncoder documentation finally. Guillaume, does this sound like a task for you?
Yes, I can certainly do that.
Good to hear.
:-)
Here's what I think I'm gonna do: Merge Rich's guide into the XML section by section, starting with the ones that I'm comfortable with (like cropping, scaling...). The one(s) I'm not comfortable with is the section about pulldown, as to the best of my knowledge, there's already a fairly big explanation of proper pulldown on the docs, so I'm not sure I'm gonna be able to extract the relevant new informations to put only those on the XML. I'll see how it goes.
Start like this, we can worry about the tricky parts once we arrive there.
Right. Then nothing is stopping me from starting... Well, like everybody else, I lack time, so that's not too good of an excuse. Just like you, I also believe in incremental work, so if I work a bit on it everyday, it'll end up as a fairly decent work.
Would you append to have a corrected draft on hand that you could send me (on private mail for example)? If you don't that's fine too, it's just that whenever you might save some of my time, it means more time I can put toward working on the guide.
No, I just read it and added my corrections inline in the email.
Ok. I'll remember that.
You'll have to extract my corrections from there. If it's too much of a bother I can provide you with a version of the draft that includes the fixes, although I doubt this will save you much work.
Yes, I can handle that. :-) Cheers, Guillaume
participants (6)
-
D Richard Felker III -
Diego Biurrun -
Guillaume Poirier -
Jeff Clagg -
Nico Sabbi -
Tobias Diedrich