MPEG-2 Audio and DVDs

Comments

Gary James wrote on 7/20/2012, 7:33 AM
"How is anything that I've said implying not sticking to the spec?"

It's not that you aren't sticking to spec by including a muxed audio stream in your video file, you're creating extra work for DVDA. It's been years since I used DVDA to author DVD Titles because I found it too constricting on what it lets me do. But from past experience, I've found that the first thing DVDA does is quietly demux your muxed video stream(s). This is necessary because it has to start with single media streams so it can mux all of your projects data (Video, multiple Audio tracks, Subtitles, etc) into the final .VOB files. By encoding an MPEG audio track in your video, all you're doing is making DVDA strip out that track before it does anything else.
PeterDuke wrote on 7/20/2012, 7:51 AM
"It's been years since I used DVDA to author DVD Titles"

May I ask what you use these days? And if you make BDs, what do you use for them?
Gary James wrote on 7/20/2012, 7:58 AM
I use a program called DVD Lab Pro. It provides the most flexibility in authoring a DVD outside the mega expensive Scenarist DVD Authoring Software that the commercial DVD houses use. I created a few DVD based movie trivia games, and DLP gives me access to the DVD players Virtual Machine program code that's needed to program the game responses and score playback.

No, I've not yet authored any BD titles.
Former user wrote on 7/20/2012, 10:43 AM
Gary,

Kind of makes me wonder if by demuxing, DVDA is correcting something in the MPEG file that could be causing problems on the PC playback. Curious behaviour Bob is describing.

Dave T2
Gary James wrote on 7/20/2012, 10:52 AM
It's anybody guess as to what's happening there. I make NTSC titles, so my SOP is to render a video only .m2v file, followed by an audio .ac3 Dolby digital file. DVD Lab Pro actually requires the user to provide separate A/V input streams so it can do it's job more efficiently.

I've done this hundreds of times using Sony Vegas all the way back through the original Sonic Foundry Vegas days without a hiccup. If the render settings are correct, and there isn't a subtle Vegas bug in play, everything should work fine!
larry-peter wrote on 7/20/2012, 11:36 AM
I had the same results recently with some clients who could not hear audio from DVDs authored in DVDA with PCM audio. And these were NTSC. Clients were on XP with older versions of Windows Media Player (9 I believe it was). They obviously had the appropriate codecs for basic DVD playback because ac3 encoded DVDs played fine. Since WMP uses a Microsoft PCM codec , is it possible that in older versions the PCM codec only associates with certain file types such as .avi and .wav and can't make an association with an MPEG2/PCM stream? MPEG Audio layer 2 should always play fine in any standard install of WMP since version 7.

Also I think it's interesting that according to: http://support.microsoft.com/kb/316992, listing WMP file types and codecs needed that .wav files require the PCM codec but .aif files do not apparently require any codec.
Former user wrote on 7/20/2012, 12:18 PM
I very seldom use PCM for DVDs. So I would not have ran across this on a normal basis.

It would be interesting if you had another author program to test the same procedure on, but most other DVD authoring programs don't accept MPEG audio. It usually has to be elementary streams.

Dave T2
Gary James wrote on 7/20/2012, 12:48 PM
Here's a link to one of the many on-line guides that explain the nuances of the DVD spec.

Basically, in the NTSC world, Dolby Digital and PCM are REQUIRED audio formats that commercial players must recognize, with MPEG Audio optional. If you have a player that doesn't play Dolby Digital Audio I hope you dowloaded it for free. In the PAL world, MPEG Audio and PCM are REQUIRED audio formats that commercial players must recognize, with Dolby Digital Audio optional.

The only common thread appears to be PCM. But since these files are so much larger than Dolby Digital, I rarely ever use them. I'd opt for a higher video bitrate and get better video in the same size file.
Gary James wrote on 7/20/2012, 9:31 PM
Bob, I just had a thought. Have you tried looking at your DVD title using the free utility programs IFOEdit? This will do an analysis on your DVDs PGC chains and let you look at the various types of reports from its examination of the DVD.

This will show you exactly what types, sizes, and formats there are in all of the Audio and Video streams in the DVD.



PeterDuke wrote on 7/20/2012, 10:19 PM
"but most other DVD authoring programs don't accept MPEG audio. It usually has to be elementary streams."

TMPGEnc Authoring Works doesn't require elementary streams. I don't know what it does with MP2/MPA, however.

My old Pinnacle Studio (PAL version) produced DVDs with MPA.

Gary James wrote on 7/20/2012, 10:41 PM
Peter, in PAL DVD land, MPEG Audio IS one of the required audio formats, along with PCM. So this by itself doesn't really tell you anything.

Again, any DVD authoring software that doesn't require separate elementary streams as source material, must demux the source file into elementary streams before it can mux everything together into the final .VOB files.

So, just like DVDA, TMPGEnc is demuxing your single A/V file before it can build the DVD. Try it. DVDA and TMPGEnc should run noticeably faster if you start off with elementary streams, because it doesn't have to demux the source data file.
farss wrote on 7/21/2012, 12:25 AM
Just to amuse myself I took one of the VOB files and copied it to another directory.
Renamed it to .mpg.
Droped that onto a Vegas T/L and had a look at the media info.
No real surprises, Vegas says Audio Stream 1 is PCM 48KHz.

Took the .mpg file used to author the DVD from with the mpeg-1 audio onto the same T/L and Vegas says the audio is mpeg-1 Layer 2. Again no surprises.


So I loaded up a program I've had for almost a decade, MPEG-2 Analyser.
Opened the renamed .vob in it.
Guess what, there's two audio streams!
I cannot say for certain but going by the total byte count for each, one is the PCM stream and the other is the mpeg-1 Layer 2 audio stream. Also one has an ID, the other no ID.

This is what I suspected.
The DVD as authored contains the following

Vision stream 1: mpeg-2 video + mpeg-1 layer 2 audio.
Audio stream 1: PCM Audio.


A conventional STB DVD player will never play the mpeg-1 layer 2 audio because it is not referenced. Of course as the DVD also contains a referenced audio stream it will play that as it should, all good.


Some ancient versions of WMP that perhaps cannot play PCM audio are somehow finding the unreferenced mpeg-1 layer 2 audio buried in the vision stream and playing that, all good as well. Client is happy.

Bob.
PeterDuke wrote on 7/21/2012, 1:19 AM
What does Mediainfo report?
Former user wrote on 7/21/2012, 1:56 AM
Really interesting Bob. But I wonder if this is by design or a bug?
I wonder if NTSC results would be the same.

Dave T2
farss wrote on 7/21/2012, 3:44 AM
Peter Duke:

"What does Mediainfo report?"

It only reports the mpeg-2 video stream and the PCM audio stream.
Interestingly though it reports the mpeg-2 video as being 8Mbps target, 7.979 Mbps actual. So the PCM audio wasn't taken from the mpeg-2 bit budget.

DaveT2:
"But I wonder if this is by design or a bug?"

I see no reason to consider it a bug.
All that (seems) to be happening is an audio stream is being left in place. No regular DVD player is going to see it or play it. It just so happens that in some case this bug or whatever means the client gets to hear the audio.

-----------------------------------------------------------------------------------------------

I think I've had one other report of this problem. It was a long time ago and it came via a long path, someone who'd bought a DVD I authored came back to the store to complain about no sound when played on a PC. I just told the store to tell them to install a proper DVD playing application.

I tried the same line this time but it didn't work because:

a) DVDs made by DVD recorders worked just fine on the problem PCs
b) They'd already had a DVD that I'd authored and it worked.

It was only when I ommited the mpeg audio that they had an issue playing the DVD.

TBH I'm still no convinced about what's really going on. MPEG-2 is after all only a wrapper and I guess "stuff" can be wrapped inside wrappers inside wrappers. More to the point, the problem is fixed, this was a basic $100 job that's used up $100 worh of fuel by my client driving to and fro.

Bob.
Gary James wrote on 7/21/2012, 8:43 AM
Bob, lets try this again. Reading through this thread has left me more confused than when I started. Here's a much better, and more up to date description of the DVD spec that you might check against your project layout.

The audio data on a DVD movie can be PCM, DTS, MPEG-1 Audio Layer II (MP2), or Dolby Digital (AC-3) format. For PAL, standard DVD-Video releases must contain at least one audio track using the PCM, MP2, or AC-3 format, and all standard PAL players must support all three of these formats. In countries using the NTSC system, no requirement mandating the use of or support for the MP2 format exists. DTS audio is optional for all players, as DTS was not part of the initial draft standard and was added later; thus, many early players are unable to play DTS audio tracks. The vast majority of commercial DVD-Video releases today employ AC-3 audio, and the players are capable of recognizing DTS audio.

The official allowed formats for the audio tracks on a DVD Video are:

PCM: 48 kHz or 96 kHz sampling rate, 16 bit or 24 bit Linear PCM, 2 to 6 channels, up to 6,144 kbit/s. (AIFF or WAVE)

AC-3: 48 kHz sampling rate, 1 to 5.1 (6) channels, up to 448 kbit/s

DTS: 48 kHz or 96 kHz sampling rate, 2 to 6.1 channels, Half Rate (768 kbit/s) or Full Rate (1,536 kbit/s)

MP2: 48 kHz sampling rate, 1 to 7.1 channels, up to 912 kbit/s

DVDs can contain more than one channel of audio to go together with the video content, supporting a maximum of 8 simultaneous audio tracks per video. This is most commonly used for different audio formats—DTS 5.1, AC-3 2.0 etc.—as well as for commentary and audio tracks in different languages.
If you use DTS, it can only be used as a secondary audio channel. You must have one of the others as the primary DVD audio channel.

DVD discs have a raw bitrate of 11.08 Mbit/s, with a 1.0 Mbit/s overhead, leaving a payload bitrate of 10.08 Mbit/s. Of this, up to 3.36 Mbit/s can be used for subtitles and a maximum of 9.80 Mbit/s can be split amongst audio and video. In the case of multiple angles the data is stored interleaved, and so there's a bitrate penalty leading to a max bitrate of 8 Mbit/s per angle to compensate for additional seek time. This limit is not cumulative, so each additional angle can still have up to 8 Mbit/s of bitrate available.

Professionally encoded videos average a bitrate of 4-5 Mbit/s with a maximum of 7–8 Mbit/s in high-action scenes. This is typically done to allow greater compatibility amongst players, and to help prevent buffer under-runs in the case of dirty or scratched discs.

You should check your audio channels against these specs to verify if they meet the requirements of the spec.

Gary ...
farss wrote on 7/21/2012, 9:08 AM
"Bob, lets try this again. Reading through this thread has left me more confused than when I started."

Well it seems you're not reading it very carefully.

"all standard PAL players must support all three of these formats"

Yes, indeed, except this thread has NOTHING TO DO WITH A STANDARD DVD PLAYER.

Sorry to shout but I have said that many times, I'm very well aware of the requirements for compliant DVDs and what standard players must do. This has nothing, zip, yadda to do with a problem of playing a DVD in a standard DVD player.



Bob.
videoITguy wrote on 7/21/2012, 10:18 AM
Yes, Bob, your first posting did leave a lot of confusion and so the many commenters looked at this from a different tact than what you had to meant to be considered.

1) You were creating a DVD that HAD TO BE READ by a wide gamut of PC builds - in other words you were going to have to consider how many variations of codecs were on a PC to read the encoded material.

Comment: Generally using a DVD production method - following compliance of the standards - producers do not use this kind of production target- for good reason - they use the DVD player standards -PAL or NTSC.

2) Since you were having to satisfy your production target in a different venue - this caused your production method to go in a much different direction.

3) Generally if I have a request to meet compatibility across a wide range of PC's I do the following - I produce a DVD/DVD-Rom with A) DVD standards and B) the DVD-Rom portion contains an auto start-up screen/menu of PC code with access to playing selections of video/audio in the expected codecs of the PC. Let's say for some crazy reason, the client wants QuickTime. mov container - then I can do that on the DVD-ROM side of the product.
larry-peter wrote on 7/21/2012, 10:24 AM
Bob, I don't know if you read my earlier post - and I wandered off topic like I tend to do - but I think the cause could be that in earlier versions of WMP on XP the Microsoft PCM codec will only recognize certain file extensions such as .wav and avi. In my case I wasn't including an MPEG layer2 audio stream in my NTSC DVDs, but the ones that used ac3 audio played fine while those with PCM audio would not play sound. I think in certain older configurations WMP just can't connect the PCM codec with the stream. And MPEG layer 2 has been recognized by WMP for a long time.
farss wrote on 7/21/2012, 5:13 PM
Atom12:
"Bob, I don't know if you read my earlier post"

Yes, I did.
I *think* early versions of WMP will play PCM but are limited to 44.1KHz.

Just for giggles I tried playing a DVD in one of my XP machines with WMP. It just plain doesn't work. It provoked me into downloading WMP 11. Insatlled it and still no joy because WinXP doesn't include a mpeg-2 codec, gotta pay for it :(

VideoITguy:

"Generally if I have a request to meet compatibility across a wide range of PC's I do the following - I produce a DVD/DVD-Rom with A) DVD standards and B) the DVD-Rom portion contains an auto start-up screen/menu of PC code with access to playing selections of video/audio in the expected codecs of the PC. Let's say for some crazy reason, the client wants QuickTime. mov container - then I can do that on the DVD-ROM side of the product. "

Absolutely that is a good path to go down. Of course the original request never mentioned "compatibility on a wide range of PCs". That was further compunded by two things:

1) I'd already made them a DVD that did play in a wide range of PCs and STB DVD players..by accident.

2) DVDs for STB DVD recorders play fine as well in their PCs with their crippled WMP, figure that one out.

Bob.
mikkie wrote on 7/22/2012, 1:37 PM
Purely FWIW...

I could have missed it reading the thread -- if so, apologies -- but when trying to figure out what's going into a DVD, I've always found it useful to take the DVD apart, e.g. use PGCEdit &/or PGCDemux. I'd think comparing the audio/video files PGCDemux gave you would quickly show what if anything was different. PGCEdit would let you see if anything's different inside the IFOs.

As far as standards go, AFAIK most all the circuitry in DVD players comes from the same place, China, & most players were/are shipped world-wide. It'd make more sense to me at least to leave the audio decoding chips in place, as-is, regardless the market. Software players may be a different ball game.

Far as Windows system-wide audio handling, for anything other than basic wav it's a bit of a mess, e.g. the WinMedia Player update that disabled the MP3 codec installed with earlier versions. Video's worse. Personally I don't like packaging video for random PCs without including some sort of player, but that's me.