Log in

View Full Version : DVD using MPEG 4 Video streams?


me00lpw
27th October 2003, 18:42
Hi,

Is it possible to re-encode the MPEG-2 video in a DVD to MPEG-4 (DivX) and then just replace the video in the VOB files with the new DivX stream?

I know this wouldn't then playback on a standalone player, but could you then play it back on a PC?

Ideally what I would like to do is keep the DVD structure identical (I.E. Subtitles, Chapters, Angles etc....) to how it is at present and use MPEG-4 for the video. I have a DVD burner, but I prefer not to recompres the MPEG-2 stream as I think using DivX I can achieve better quality results.

Any comments appreciated.

Doom9
27th October 2003, 19:31
I very much doubt that VOBs allow for MPEG-4 video.. when the container format for DVDs was defined, there was no MPEG-4 after all.

mpucoder
28th October 2003, 05:55
Provision was made for 2 other future compression technologies. Currently MPEG-4 is under consideration for HD-DVD (red-laser version), but until that is approved there will be no players, hardware or software, that would recognize the format.
http://www.eetimes.com/sys/news/OEG20020301S0091
You can find other pages by looking for +"hd-dvd" +"mpeg-4"

ChristianHJW
28th October 2003, 11:19
Supporting this is a longterm goal for the matroska project. Sorry for mentioning this here while it cant be used yet. Most of the necessary features are already implemented in MKV, like

- MPEG4 video
- AC3/DTS/MP2 audio
- vobsub subtitles
- chapters

Only missing feature :

- DVD menue structure

Spyder also has MPEG1 video in MKV working in an alpha version already, while MPEG2 is giving problems still due to the complicated timestamp calculation. With this and a working menue structure we could transmux a complete DVD into one huge MKV file, in a lossless transformation without any reencoding. But of course, reencoding the video stream only from MPEG2 to MPEG4 is well possible, while leaving all other streams ( audio, subs, menues ) untouched.

About menues for MKV, have a look here (http://forum.doom9.org/showthread.php?s=&threadid=63884)

SeeMoreDigital
28th October 2003, 12:01
Mpeg4 video in a vob container. I've not thought of that one!

For the life of me I can't understand why Mpeg4 video never implemented the .mpg file extension!

However, I'm I correct in assuming that the .mp4 container can be used to store (or be hacked to store) just about everything that a .vob container can?

If .mp4 (or any other container for that matter can be made to store HTML files), then maybe this could solve the DVD menu problem!

Cheers

Wilbert
28th October 2003, 12:05
@Chris,

How does that answer the question in the first post? I thought Koepi gave you a warning for something related in the XviD forum. Please, stay on topic.

alexnoe
28th October 2003, 12:44
Don't wonder if I ignore certain people, especially questions by certain people....the ones who I speak about know it http://forum.gravure-news.com/images/smiles/icon_beurk.gif

bond
28th October 2003, 12:44
perhaps it would be possible to hack mpeg-4 content into .vob but the "official" way to store menues with mpeg-4 content would be in the mp4 container:

Originally posted by SeeMoreDigital
However, I'm I correct in assuming that the .mp4 container can be used to store (or be hacked to store) just about everything that a .vob container can?yes, and even more (no need for hacking)
it is already possible (the only problem is to get the tools that make this possible as they are only available for people from the "big business" atm)

If .mp4 (or any other container for that matter can be made to store HTML files), then maybe this could solve the DVD menu problem!mp4 doesnt understand html, but some other textual language called xmt
read my faq sticky about mp4 to find out more about it here (http://forum.doom9.org/showthread.php?s=&threadid=62723)

ChristianHJW
28th October 2003, 12:59
Originally posted by bond yes, and even more (no need for hacking)
DTS ? AC3 ? MP2 ? Vobsubs ? In the official Mp4 container ? Not to my knowledge ....
it is already possible (the only problem is to get the tools that make this possible as they are only available for people from the "big business" atm)
Be careful bond, you might get striked for telling people here what could be possible with MP4 in theory, if its not really available to them right now ;) ....
mp4 doesnt understand html, but some other textual language called xmt ; read my faq sticky about mp4 to find out more about it here (http://forum.doom9.org/showthread.php?s=&threadid=62723)

@ wilbert : I understood the user posting the original question like that :
He wants to preserve the full scope from the original DVD, without altering too much of it, but it needs to fit on a 4,7 GB DVD-R. So he prefers to reencode the MPEG2 video to MPEG4 video, because he believes he can achieve a higher quality with that then by reencoding the MPEG2 to a lower bitrate MPEG2.
He was naming VOB as container because this is the container he knows from DVD and wanted to know if the MPEG2 in it could be replaced by a MPEG4 stream, again, without altering anything else in the VOB, just the video. His main objective was the possibility to play it on PCs, and therefore he is not bound to be using VOB for that, it can be any format that supports all of the tracks on the DVD unaltered, depsite the MPEG4 video instaed of the original MPEG2. MKV can do all of that already, just the menue is missing still. Sorry for my 'blatant' advertising' ... :confused: ....

SeeMoreDigital
28th October 2003, 13:00
Hi Bond,

I can't believe I missed your MP4 Q&A post!

I remember starting a thread some months ago, asking what could be put in an MP4 container... it died a death!

Thanks mate. Cheers.

mpucoder
28th October 2003, 17:55
It looks to me like Bill Gates strikes again. By stuffing MPEG-4 video into HIS container (riff aka avi) people are forgetting that it is MPEG. MPEG-4 builds on MPEG-2, and, despite some changes in terminology, still retains the elementary stream and system-level architecture. It is both an audio/video encoding method and a container. And there is no reason why MPEG-4 encoded elementary streams cannot be used in VOBs. VOBs are, after all, MPEG-2 system-level streams. All DVD specific information, including AC3/DTS/LPCM/SDDS audio, subpictures, and navigation data, is represented in private streams.

Maybe This (http://www.chiariglione.org/mpeg/standards/mpeg-4/mpeg-4.htm) will help those unfamiliar with MPEG-4 internals.

As I said (and this is where more of my energy is being spent these days, gathering information on the next DVD format) MPEG-4 video is under consideration for the red-laser HD-DVD, along with Microsoft's video encoder, and heavy pre/post processing using low bitrate MPEG-2.

SeeMoreDigital
28th October 2003, 18:14
Originally posted by mpucoder
.....MPEG-4 builds on MPEG-2, and, despite some changes in terminology, still retains the elementary stream and system-level architecture. It is both an audio/video encoding method and a container. And there is no reason why MPEG-4 encoded elementary streams cannot be used in VOBs. VOBs are, after all, MPEG-2 system-level streams..... All of which could take us back to my remark...

"For the life of me I can't understand why Mpeg4 video never implemented the .mpg file extension!"

Cheers

me00lpw
28th October 2003, 18:23
Thanks for the comments so far.

Matroska and MP4 both sound interesting. As Chris stated I would like to keep everything except the video format as close to the original as possible, I.E. Not do any conversion if possible.

The main advantage I can see MP4 having over Matroska is that MP4 players (standalone) will be avaliable shortly and it may be that we never see standalone players supporting Matroska. It may even be the case that Matroska is just too flexible in what content it can hold for any player to truely claim it supports Matroka files fully.

Anyway as soon as I look to put AC3 or DTS audio into my files the compatibility benifits of MP4 start to slip, although I'm sure many standalone MP4 players will support MP4 files containing AC3 or DTS.

Regarding subtitles; converting them to text first is hassle as it takes time to setup the profiles and even then you can still get annoying errors. I believe DVD uses images for the subs which just get overlayed onto the video? Can either Matroska or MP4 do the same thing? It would use more filespace but now that I have 4.7GB it's not such a concern as it was before.

As for the DVD style menus - any news out there about tools that can convert them from DVD to a format that will work in either MP4 or Matroska?

@ mpucoder
Thanks for the links in your 2 posts. Regarding your last post; If I have encoded my video to, say DivX, are there any tools avaliable that will let me replace the original video in the VOBs with this MPEG-4 video? I assume that certain pointers (excuse me if this terminology is incorrect) would need to be reset (possibly in the .IFO file?) so if there is a program that can do this then thats what I'm really looking for.

Ideally at the end of the day this would play back on a PC software DVD player (doesn't WinDVD support DivX anyway?) and would work just like the original DVD. Not to worried about playback on standalones .... after all a cheap PC costs not much more than a good DVD player!

Thanks for the posts so far ..... Keep 'em comming!

Oh! and I forgot to ask about muliple angles in both Matroska and MP4. Can they be done in either?

mpucoder
28th October 2003, 20:01
Well, here's the dilema with MPEG-4 video and DVD. MPEG-4 has not been approved yet, and if it is, it will be for HD-DVD. Most certainly the ifo file as we know it will not be compatible as HD-DVD will add more interactivity, and address problems discovered with the current DVD.
So it too is vapor, but the idea of using MPEG-4 video isn't so far fetched. IF there were something that could play it, creating it would be as easy as remuxing the video, and making a few attribute changes in the ifo. But I doubt any player would do this, they all expect MPEG-2 (which can decode MPEG-1 with no problem), even if the player were "Divx aware".

Edit: It just occurred to me, there must be 2 or 3 authors of multimedia players in this forum - what do they think of decoding MPEG-4 video from vob? The video attribute byte in the ifo would have the value "2" in the 2-bit field "coding mode" (bits 7&6)

bond
29th October 2003, 10:25
Originally posted by mpucoder
And there is no reason why MPEG-4 encoded elementary streams cannot be used in VOBs. VOBs are, after all, MPEG-2 system-level streams. All DVD specific information, including AC3/DTS/LPCM/SDDS audio, subpictures, and navigation data, is represented in private streams.yeah, i am sure that there is a way to replace the mpeg-2 video stream with a mpeg-4 one
like always the only problem is that someone still has to do this hackery
i wonder if available directshow splitter would be able to pass the mpeg-4 streams to the needed decoders?

Originally posted by ChristianHJW
DTS ? AC3 ? MP2 ? Vobsubs ? In the official Mp4 container ? Not to my knowledge ....there are already much better codecs available, no need for that old technology anymore in mp4 :p

Be careful bond, you might get striked for telling people here what could be possible with MP4 in theory, if its not really available to them right now ;) ....of course it is fully available right now! :p
you only need a text editor, write your own script with xmt/bt, grap the encoder from ENST, encode your script to mp4, bingo (of course that isnt really an easy solution, perhaps if i find the time, i will write such a script were people will only have to change the paths to their avi, jpg, aac, srt files and would be able to create such a menu easily...)
the second way would be to get a copy of the mp4 authoring softwares that are already available from avipix, ibm, etri, envivio, midego... the problem is that there are no evaluation copies or so and also no other way to get them, believe me :D
anyways i dont know if it would be possible to directly (!) convert a dvd menue to a mp4 menue with these tools

I forgot to ask about muliple angles in both Matroska and MP4. Can they be done in either?matroska doesnt support it atm
mp4 supports it but of course there is again the problem that you have to know the xmt language to write such a script...

SeeMoreDigital
29th October 2003, 11:11
Hi bond

I really like the thought/idea of being able to remove the 'movies' Mpeg2 stream. Re-encoding it to an Mpeg4 stream. And then being able to pop it back into an VOB container!

If it was be possible to do this. There would be no need to muck about with the DVD menus and stuff... as they would (in theory) still work!

Personally, just (I say just!) being able swap the video stream would be a great start!

I did a test the other day to see how much data I could remove from a DVD while still preserving it's structure.

Using the PAL version of Planet of the Apes and DVDShrink. I was able to remove all audio streams except the DTS stream. And all subtitles, except english. And then 'shrinked' the whole lot down from an 6.78GB file to an 4.37GB file!

At the moment the file is sitting on my PC's hard drive. But when I play it back using either my Xcard or PowerDVD 5 it behaves just like the original DVD but with less options!

I'm rambling now, arn't I.... Cheers

me00lpw
29th October 2003, 15:14
It sounds like there is some interest in trying to do what I would like to see. I.E. a DVD using MPEG-4 video with everything else untouched (not waiting for a red-lazer MPEG-4 DVD stratergy to be ratified).

Now I'm no software developer, but from what I can gather there is no software able to create these files at present and there is no player to support them. Would any developers be interested in trying to create a remuxing program and modified player to make this all work? Is this something that should be started in a new post in another part of the forum and if so which part?

archimage
4th November 2003, 13:06
-h
It wouldn't be too much work to fork XviD into an MPEG-1 video compressor, but I don't know anyone who both has the time and is able to.

http://forum.doom9.org/showthread.php?s=&threadid=38659


I remember this thread from a while back , i thought it might give some inspiration to those brave enough to do something like this . This quote
is for xvid--->mpeg1 encoder , but if possible to write m1v files useing
mpeg4 compression , it wouldnt seem to far from transcodeing existing files also . Mpeg1 being dvd compliant , well , implications are enormous ;)

SeeMoreDigital
4th November 2003, 15:11
Hmm... It's an interesting thought!

Mpeg2 video in an MPG container is .m2v
Mpeg1 video in an MPG container is .m1v

Shame then that Mpeg4 video was never compiled to fit into an MPG container as .m4v

I wonder what would happen if an .m4v elementary stream was just renamed to .m2v or .m1v, prior to remuxing back into either an MPG or VOB container?

Or is this what some of you are suggesting?

Cheers

archimage
5th November 2003, 08:43
Both mpeg1 & 2 can be stored in .mpv also . I dont think changing file extensions (mp4-->mpv etc...) would work for anything . Im not 100% sure but I doubt that xvid ; mp4 in its native format would be dvd compliant . If it is possible to use mpeg4 compression for mpeg1 compliant streams like -h was suggesting , then this could possibly totally change dvd authoring .

ChristianHJW
5th November 2003, 14:39
Originally posted by archimage If it is possible to use mpeg4 compression for mpeg1 compliant streams like -h was suggesting , then this could possibly totally change dvd authoring

You people are swobbing something :

XviD doesnt output .mpg files. The encoder alone will either output raw, elementary MPEG4 video streams into a file, or do the same via his VfW interface such that the app can store those in AVI/OGM/MKV.

-h never said XviD could be used to output MPEG4 compression into the MPEG container. What he ment was that it would be possible to modify XviD such that a MPEG1 video encoder could be made from it, mainly by leaving all of the advanced MPEG4 stuff away, but again this encoder would only output a raw MPEG1 elementary stream, that its.

Again, with the exception of the main menue you can already mux a complete DVD into a single MKV file, if you recompress the MPEG2 video into MPEG4 format. This includes all the sound streams on the DVD, i.e. AC3, MP2 or DTS, and the subs ( vobsub ). MPEG2 video, not recompressed into MPEG4, should be possible soon. Dont ask me about menues though, we dont make any real progress on this recently ....

SeeMoreDigital
5th November 2003, 16:23
Christian,

Please, please, please stop going on and on about what can, or cannot be placed into an MKV container!

Your knowledge about containers is without doubt greater than many peoples here on the forum. So it is much appreciated.

However, what we are trying to ascertain in this thread is what can or cannot be placed into an VOB container!

So if you have any suggestions of how an native .m4v stream can be inserted (as a direct replacement to an .m2v stream) into an VOB container, please let us know!

Cheers mate!

PS: I love MKV

Atamido
5th November 2003, 17:28
Well, for starters if you want to know if MPEG-4 could be put in a VOB, you probably want to describe the technical aspects of a VOB file. What does the bitstream look like? How are streams differentiated? What aspects of it are specific to MPEG-2? How do they differ from TS and ES streams?

SeeMoreDigital
5th November 2003, 18:28
Originally posted by Pamel
Well, for starters if you want to know if MPEG-4 could be put in a VOB, you probably want to describe the technical aspects of a VOB file. What does the bitstream look like? How are streams differentiated? What aspects of it are specific to MPEG-2? How do they differ from TS and ES streams? Blimey, what a to-do this tread could turn in-to!

Do we really need to go through all of that kinda stuff?

I think it's clear from many of posts in the thread what the ultimate goal is.

All of you guys are far cleverer than I'll ever be at this sort of thing.

me00lpw, came up with a very novel (maybe even original) idea. I've certainly never come across such a suggestion, (unless I've missed it) on this forum or any other!

So, what do you guys think, is it possible?

Cheers

mpucoder
5th November 2003, 22:48
A vob is an mpeg system stream, all DVD specific information is in either "private streams" or "user data". With current DVDs there is no practical difference between MPEG-1 and MPEG-2 system streams.
While others are more familiar with the bits in MPEG-4 video, I did find this statement in a working draft of ISO14496 (W4319 to be exact)
"4.1.8 Compatibility Requirement
The MPEG-4 standard shall allow backward compatibility to some audio, video, imaging and audio-visual standards.
Specification
The systems layer shall support MPEG-1 and MPEG-2 Video streams, and MPEG-1 and MPEG-2 audio streams.
Note
Direct interworking with MPEG-2 Systems is not supported. The MPEG-2 Transport Multiplex may be utilized however."

That last note makes it clear, a vob, aka MPEG-2 transport multiplex, can contain mpeg-4 video.
The real question is, what will play it? And what profile would be usable? DVD players that can play mpeg-4, or divx, won't necessarily play mpeg-4 video in a vob - but they might.

SeeMoreDigital
5th November 2003, 22:56
Originally posted by mpucoder
.....That last note makes it clear, a vob, aka MPEG-2 transport multiplex, can contain mpeg-4 video.
The real question is, what will play it? And what profile would be usable? DVD players that can play mpeg-4, or divx, won't necessarily play mpeg-4 video in a vob - but they might. Ooooo!

I would have thought a PC could play such streams.

But the question is, can it be done and how can it be done?

Cheers

me00lpw
8th November 2003, 17:07
From the most recent posts added here I gather that in theory it is possible to use the VOB container to hold MPEG-4 video, but there aren't any media players that will support this yet. Also I gather there are no tools avaliable to put the MPEG-4 video into the VOB file.

Am I correct in saying that if someone develops the tools to put an MPEG-4 video stream into a VOB and someone else develops a media player to recognise this *special* type of VOB, it will be possible to create a DVD with MPEG-4 video that plays in this modified media player? Or am I missing something much more fundamental?

P.S. When I initally started this new thread I wasn't too worried about depending on the VOB container, but I figured that this might offer the easiest solution for creating something that plays back EXACTLY like the original, albiet only on a device that has a media player able to support MPEG-4 in a VOB.

ChristianHJW
9th November 2003, 14:27
Originally posted by me00lpw P.S. When I initally started this new thread I wasn't too worried about depending on the VOB container, but I figured that this might offer the easiest solution for creating something that plays back EXACTLY like the original, albiet only on a device that has a media player able to support MPEG-4 in a VOB.

It's not even half as easy as you guys think. While the muxing may not be so extremely difficult, the playback definitely is.

All VOB parser filters expect MPEG2 in the VOBs, and nothing else. So, first of all you need to find a way to flag MPEG4 in the VOBs, unless you want to 'abuse' the IFO file for that, rendering the VOBs alone useless once the IFO gets lost.

Once you have that, you have to start writing an opensource VOB parser filter ( there is none AFAIK ) and to map from it to an external MPEG4 deocder filter if the MPEG4 flag is detected in the VOBs.

Too much hassle IMHO, maybe with a special mplayer mod it would be easier ...

unixfs
21st November 2003, 12:35
The official way to store mpeg4 content in mpeg2-ps is to use the
usual pes-id identifiers (0xe0..0xef for video, and 0xc0..0xcf for audio
if I remember correctly) and to add in the Program Stream Map the following stream_tags in the loop:

0x0f = AAC ADTS
0x10 = MPEG4 video
0x11 = AAC latm

The software TCVP (from Sourceforge) can both read and write these files already, afaik.
VLC (and to a minor extent MPlayer from cvs, that I patched) can already play MPEG4-in-TS

I guess that IFO files should be extended accordingly (but I don't know
the IFO structure, so I may be wrong).

Naturally no standalone actually plays this content, but it wouldn't
take a lot to modify existing players to recognize it (I could patch mplayer).

mpucoder
21st November 2003, 18:49
Cool. In a DVD there is no Program Stream Map, the ifo and constraints of DVD (only one video stream) make it unnecessary. Unofficially (not adopted yet) the "coding mode" for the video attribute is 2.

mf
21st November 2003, 21:39
Originally posted by SeeMoreDigital
Hmm... It's an interesting thought!

Mpeg2 video in an MPG container is .m2v
Mpeg1 video in an MPG container is .m1v

Shame then that Mpeg4 video was never compiled to fit into an MPG container as .m4v

I wonder what would happen if an .m4v elementary stream was just renamed to .m2v or .m1v, prior to remuxing back into either an MPG or VOB container?

Or is this what some of you are suggesting?

Cheers
Afaik m1v and m2v are raw video streams, same as for instance xvid_encraw outputs m4v.

SeeMoreDigital
21st November 2003, 22:08
Originally posted by mf
Afaik m1v and m2v are raw video streams, same as for instance xvid_encraw outputs m4v. You will have to excuse me, if I don't express the terminology of the streams (elementary -v- raw) correctly.

However, the spirit question still remains the same!

One way or another it would seem it should be possible to replace an m2v stream with an m4v stream. Or have I got this wrong?

Cheers

unixfs
21st November 2003, 22:14
it IS possible, but IFOs will have to be remade (if I understand
correctly the role of IFO files)

bond
11th December 2003, 14:20
hi guys

wanna have mpeg-4 dvd-like menus, checkout this thread (http://forum.doom9.org/showthread.php?s=&threadid=66583) :D

reddragon72
11th December 2003, 16:46
Well someone has thought of this in a way and are ready to market it. http://www.nero.com/us/632028719687858.html
check out both the Data sheet and press release. It seems that Nero is gearing up for the Mpeg-4 players that will hit the market soon. I'm not into this Mpeg-4 thing but when I looked here to see how good the DVD-9 to DVD conversion was I saw all the Mpeg-4 stuff and thought I'de throw this out here.

bond
11th December 2003, 17:11
nero recode2 will offer keeping the dvd menu when recoding to dvd but not when recoding to mpeg-4/mp4

SeeMoreDigital
11th December 2003, 17:17
Originally posted by bond
hi guys

wanna have mpeg-4 dvd-like menus, checkout this thread (http://forum.doom9.org/showthread.php?s=&threadid=66583) :D It's just so dammed cool!

Great work bond. I'm going to see if it's possible to get the GUI to work with my Xcard and JovePlayer!

"Standby for action"!