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 > General > Decrypting

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th August 2007, 20:02   #1  |  Link
Ajax_Undone
I dont care so should you
 
Ajax_Undone's Avatar
 
Join Date: Apr 2006
Location: In hell next to the boiling pit of Lava...
Posts: 989
Encode EVO HD files to AVI/MKV/MP4/MPG 1/2 etc.?

Has anyone yet created an app that can encode EVO HD files to AVI/MKV/MP4/MPG 1/2 and so on...

i'd like to beable to compress these enormous files to something useable...

Last edited by Guest; 17th August 2007 at 20:42. Reason: forum rule 9
Ajax_Undone is offline   Reply With Quote
Old 17th August 2007, 21:39   #2  |  Link
hajj_3
Registered User
 
Join Date: Mar 2004
Posts: 897
nope you have to use loads of programs and there are no proper guides anywhere, there are either guides that assume you know lots about it already or there are bits of information over about 200 pages.

dont understand why someone hasnt created a full indepth guide like there is for xvid and divx on this site, they would get loads of praise and would help 1000's of ppl.
hajj_3 is offline   Reply With Quote
Old 18th August 2007, 16:45   #3  |  Link
laserfan
Aging Video Hobbyist
 
Join Date: Dec 2004
Location: Off the Map
Posts: 2,457
I have never used MeGUI, but this looks pretty comprehensive and maybe even understandable!
laserfan is offline   Reply With Quote
Old 19th August 2007, 02:26   #4  |  Link
Galileo2000
Registered User
 
Join Date: Jan 2007
Posts: 224
I am little confused here.

First we want the best PQ possible with HD / BD, then we want to reencode into something which will be lower PQ quality because we don't like the size of files.

Perhaps I am missing something here, but what's the point to get HD / BD in the first place? "Regular" SD DVDs coupled w/good scaler/deinterlacer are still quite good.
Galileo2000 is offline   Reply With Quote
Old 19th August 2007, 03:14   #5  |  Link
bourke
Registered User
 
Join Date: Feb 2007
Posts: 85
Quote:
Originally Posted by Galileo2000 View Post
First we want the best PQ possible with HD / BD, then we want to reencode into something which will be lower PQ quality because we don't like the size of files.
Not necessarily - we may merely want to re-encode BD/HD into formats that can be played back universally (on PS3, Xbox 360, and PC) from the one disc.


At the moment this means VC-1 video stream muxed with a compatible audio stream (e.g. DD, or better DTS) and then burnt onto DVD-9 media or an external hard drive.

Last edited by bourke; 19th August 2007 at 03:17.
bourke is offline   Reply With Quote
Old 19th August 2007, 06:50   #6  |  Link
Raptus
heretic nuB
 
Join Date: Sep 2003
Posts: 71
Quote:
Originally Posted by Galileo2000 View Post
Perhaps I am missing something here, but what's the point to get HD / BD in the first place? "Regular" SD DVDs coupled w/good scaler/deinterlacer are still quite good.
HD source reduced to 720p and encoded with x264 to DVD-5 or DVD-9 is already much better than SD DVD. Keep in mind that many DVDs have bad film transfer and too much edge enhancement... In that case you could make your own still far superior DVD version by reducing your HD source to anamorphic SD and authoring it.

Last edited by Raptus; 19th August 2007 at 06:55.
Raptus is offline   Reply With Quote
Old 19th August 2007, 07:14   #7  |  Link
FoxRacR17
Registered User
 
Join Date: Jan 2007
Posts: 66
and for some size doesnt matter. I for one and buying a nice big hard drive (since they are dirt cheap now) and i'm going to copy my hd-dvd collection to wmvhd vc-1 on my hard drive and just stream them to my 360. This is the only way i can watch them through hdmi since my monitors dvi cable is not hdcp compliant.
FoxRacR17 is offline   Reply With Quote
Old 19th August 2007, 15:30   #8  |  Link
Taktaal
Registered User
 
Join Date: May 2003
Posts: 114
This is a little newbie guide I started working on, just displaying how to convert a VC1/DD+ HD-DVD into a standard format mkv without using any all-in-one tools. Maybe it can help you to get going with HD reencoding.

Getting the Software

VirtualDub
http://virtualdub.sourceforge.net/

Avisynth
http://avisynth.org/mediawiki/Main_Page

FFmpeg with E-AC3
http://forum.doom9.org/showthread.php?t=129050

GraphEdit
http://www.digital-digest.com/dvd/do...hedit_141.html

Windows Media Player 11
http://www.microsoft.com/windows/win...&qstechnology=

x264.exe
http://x264.nl/

EvoDemux
http://pel.hu/down/EVOdemux.exe

Haali Splitter
http://haali.cs.msu.ru/mkv/

MKVToolnix
http://www.bunkus.org/videotools/mkvtoolnix/

Ripping the HD DVD
This is a good thread explaining the different options to copy a HD-DVD movie to hard disk and decrypt it.

Demuxing the movie
At this point you should have the whole HD-DVD in a directory on your PC. The most important part is a bunch of .EVO files in a HVDVD_TS subfolder. There will probably be 1-3 Multi-GB files with names like FEATURE_n.EVO (the main movie) and a couple smaller EVOs that include things like the menu and extras.

What we're interested in mostly is the main movie. So start EVODemux, load the FEATURE_1.EVO, and wait until the program has stopped parsing the file. Scroll down and check if the movie length is correct.

If it isn't you need to go to the Options tab, and set "Continue with second EVO".
Write down how many calculated frames the movie has, we're going to need that number later. In fact it's probably a good idea to copy&paste the whole movie info into a text file for later use.

Do not use the "Read XPL" feature. It's currently bugged in EVODemux and will cause problems later.

Now it's time to see what type of tracks we have in the movie. EVODemux will give you all the info, so just scroll down in the text, and take note of the information there. In this sample case, we have one VC-1 video track, three DD+/E-AC3 5.1 channel audio tracks (number 0 to 2) and one DD/AC3 stereo track with the number 3.
Usually, the commentary track is the lowest quality and has the highest number so this is clearly track 3. Track 0 is probably the english one as it usually comes first on US or UK releases, and 1/2 are the french/spanish ones.


After that, go to the Video/Audio tab, and check all checkboxes that you want in the final movie. Press "Rebuild"


After this, you should have in your output directory a 10-20 GB big .EVO file containing the complete movie and all wanted audio tracks in one continuous file. It's a good idea to rename it to a better name too.


Converting the audio
Some of the tracks might already be in the AC3 format. We don't need to convert those as they are already compatible with all standard movie players.
For those, just check them in the Video/Audio tab of Evodemux, and press "Demux".


The E-AC3 tracks have to be reencoded to a more sensible audio format in order to be compatible with a wide choice of players. AC3 is a good choice of course to convert to.
The program we're going to use here is the new version of FFMPEG with E-AC3 support.

To convert the default audio track, use the command
Code:
ffmpeg -i input.evo -vn -acodec ac3 -ab 448k output.ac3
FFMPEG unfortunately tends to number the audio tracks in a different way than Evodemux, so take note from the output that follows this command to see what the tracks are numbered like.


Here, we see that the commentary is actually the track 0:1, spanish and french are 0:2 and 0:3 (sometimes the secondary audio tracks are stored at a lower bitrate) and english is 0:4.
So we modify our ffmpeg command to use the -map option to select the correct audio track, and export each track with their own command
Code:
ffmpeg -i serenity.evo -map 0:4 -vn -acodec ac3 -ab 448k serenity.en.ac3
ffmpeg -i serenity.evo -map 0:2 -vn -acodec ac3 -ab 448k serenity.fr.ac3
ffmpeg -i serenity.evo -map 0:3 -vn -acodec ac3 -ab 448k serenity.es.ac3
When converting E-AC3 tracks you'll probably get a lot of warnings because ffmpeg support for the format is still in beta.

Converting the video
Once you have installed all the necessary filters and software, converting a HD-DVD movie isn't any different than doing the GraphEdit -> Avisynth -> VirtualDub path with regular DVDs.

First, we have to build a GraphEdit graph. Open the software, but don't drag&drop the EVO into it. That will open it with the default filter which will probably be Sonic Cineplayer and that's bugged and will lead to desynchronized audio.
Instead, choose "Graph" -> "Insert Filters...", then choose "DirectShow Filters" -> "Haali Media Splitter" and insert that. You'll get a popup asking you for a file to split, select the .EVO that you rebuilt earlier


Next, insert the "WMVideo Decoder DMO" Filter, and connect the EVO file with the decoder

If you get an error here, you forgot upgrading WMP to version 11.

Save the graph.

Next, create an AviSynth script to load the graph. A very basic sample:
Code:
DirectShowSource("serenity.grf", fps=23.976, framecount=171229, audio=false)
What's important here is that you have to manually set the movie to the correct framerate (always 23.976 for HD-DVDs) and set the correct framecount according to the number EVODemux calculated for you earlier. If you don't set those two options you'll get a bugged encode.
Also you can add dozens of other AviSynth options here like cropping away black bars, make sure the movie dimensions are dividable by 16, filtering away movie grain, scaling for mobile devices etc. Those options are out of scope for this guide and you should refer to the AviSynth Wiki for them.

Save the Avisynth script.

Right here, you can basically use any software you want that supports .AVS sources. We're going to use the x264 command line encoding tool, alternatively you could also use VirtualDub for Xvid or the WMVideo encoder for making a WMV.
Code:
x264 --bitrate 8000 --progress --threads auto -b 3 --b-bias 5 --b-pyramid --weightb --b-rdo --bime -8 -t 1 -o NUL serenity.avs
x264 --bitrate 8000 --progress --threads auto -b 3 --b-bias 5 --b-pyramid --weightb --b-rdo --bime -8 -t 1 -o serenity.mkv serenity.avs
Those two lines make a decent two pass x264 encode in just a few hours. You have to obviously adjust the input/output files, and can do the same with the bitrate as well as any other option if you want. Save this as a .bat file and run it by double clicking.

If you want higher image quality, the following is a slower but better quality set of options
Code:
x264 --pass 1 --bitrate 8000 --bframes 3 --b-pyramid --direct auto --deblock -3:-3 --subme 1 --analyse none --me dia --threads auto --thread-input --progress --no-psnr --no-ssim -o NUL serenity.avs
x264 --pass 2 --bitrate 8000 --ref 5 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --b-rdo --bime --weightb --direct auto --deblock -3:-3 --subme 7 --analyse all -8 --trellis 1 --me umh --threads auto --thread-input --progress --no-psnr --no-ssim -o serenity.mkv serenity.avs
Reencoding the video with these settings will probably take around a full day on an average dual core computer.
Of course, a whole book could be written on the pro- and contra of various x264 settings, try looking in the MPEG 4 AVC forum for more discussion about it.

If you want to try out the encode, you can add a
Code:
Trim(0, 3000)
line to the .avs script to just encode the first 3000 frames (2 minutes) of the movie. This makes it possible to fiddle with the quality settings without spending hours on each encode.

Remuxing everything again
Load the recompressed mkv movie and the ac3 audio(s) into MKVmerge.
Set an output filename, and press "Start muxing".

Dealing with audio sync issues
There's mainly two ways to deal with audio sync problems.
First find out what kind of offset you have. Try to measure by how much the audio is out of sync at the start, and how much at the end. Try looking for things that have both clearly visible and audible parts. Gunshots are good, slamming doors, scene changes from a noisy to a quiet place, etc.

If the audio offset is the same at the start as at the end, it's probably the fault of a strange EVO that's not fully supported by the programs we're using. You can however fix that by repairing it while muxing the final mkv. If you select your audio track in mkvmerge, you can set a delay to that track.

If the audio happens before the video, use positive numbers, otherwise negative. Try to measure it exactly because a human can notice a 1 frame desync, perhaps not consciously, but it will make the movie feel strange in a way.

If the movie starts out synchronized, but gets desynced over time, two things could have happened. Either you forgot the fps=23.976 setting in AviSynth, in which case you can add a 1001/1000 value in the "Stretch by" field in mkvmerge to fix it.
Or you used Sonic Cineplayer as decoder, in which case you're screwed and you need to reencode the movie again. At least I've never found a way to reliable fix such an audio track because it seems to speed up and slow down at random points.

Subtitles
To come

Chapters
To come

Last edited by Taktaal; 22nd April 2008 at 17:02.
Taktaal is offline   Reply With Quote
Old 20th August 2007, 02:53   #9  |  Link
bourke
Registered User
 
Join Date: Feb 2007
Posts: 85
Taktaal, great guide, can you add in these possible steps:


DD+ ==> LPCM

EAC3to


LPCM ==> DTS (if you have a DD+ track or an LPCM track - e.g. Blu-ray - then DTS is much much better quality than DD :-)

SurCode (commercial)


AVC / MPEG-2 ==> VC-1

Windows Media Encoder

Last edited by bourke; 20th August 2007 at 03:02.
bourke is offline   Reply With Quote
Old 21st August 2007, 06:11   #10  |  Link
Raptus
heretic nuB
 
Join Date: Sep 2003
Posts: 71
Yes, great (first?) guide!

The only thing that bugs me is the WMP11 requirement. I guess it is only needed for VC1 sources, right?
Raptus is offline   Reply With Quote
Old 26th August 2007, 18:05   #11  |  Link
Ajax_Undone
I dont care so should you
 
Ajax_Undone's Avatar
 
Join Date: Apr 2006
Location: In hell next to the boiling pit of Lava...
Posts: 989
Thanks Taktaal very much appreciative 1080i X.264 hvc is awesome... it took my AMD system 3 hours to complete both passes and save my HDD 15GB's per Vid with no visable loss...
Ajax_Undone is offline   Reply With Quote
Old 29th August 2007, 15:31   #12  |  Link
breez25
Registered User
 
Join Date: Aug 2007
Location: AUT
Posts: 4
Hi,

thanks a lot for the guide .. but unfortunately I get an error message when i klick insert filter (Haali Media Splitter selected) and choose the rebuilt Evo.. "Invalid fist byte" and "filter failed to load file".

I installed all the required decoders and i don't have any playback problems with mkv/x264 etc.

As an .Evo file i used a movie trailer.. might this be the reason for the error?

one more question ... is this guide especially for VC1 material? cause wouldn't it be unnecessary to use the WMVideo Decoder for H264/AVC?

I was thinking about buying a blu-ray burner for 200€ ... are there also .evo files on Bluray Disks that i could act as described?

Thanks a lot!
breez25 is offline   Reply With Quote
Old 14th September 2007, 15:10   #13  |  Link
rfisher1968
Registered User
 
Join Date: Aug 2007
Posts: 10
Audio not in sync

Using the method described above I have successfully done "happy feet" and converted to a mkv file. I tried the same method with "the bourne supremacy" with the audio is out of sync. I thought it might be the frame count from evodemux that might be causing my problem, but i have no clue.

Any help.
rfisher1968 is offline   Reply With Quote
Old 14th September 2007, 20:59   #14  |  Link
Taktaal
Registered User
 
Join Date: May 2003
Posts: 114
There's mainly two ways to deal with audio sync problems.
First find out what kind of offset you have. Try to measure by how much the audio is out of sync at the start, and how much at the end. Try looking for things that have both clearly visible and audible parts. Gunshots are good, slamming doors, scene changes from a noisy to a quiet place, etc.

If the audio offset is the same at the start as at the end, it's probably the fault of a strange EVO that's not fully supported by the programs we're using. You can however fix that by repairing it while muxing the final mkv. If you select your audio track in mkvmerge, you can set a delay to that track.

If the audio happens before the video, use positive numbers, otherwise negative. Try to measure it exactly because a human can notice a 1 frame desync, perhaps not consciously, but it will make the movie feel strange in a way.

If the movie starts out synchronized, but gets desynced over time, two things could have happened. Either you forgot the fps=23.976 setting in AviSynth, in which case you can add a 1001/1000 value in the "Stretch by" field in mkvmerge to fix it.
Or you used Sonic Cineplayer as decoder, in which case you're screwed and you need to reencode the movie again. At least I've never found a way to reliable fix such an audio track because it seems to speed up and slow down at random points.
Taktaal is offline   Reply With Quote
Old 15th September 2007, 04:02   #15  |  Link
juzzy999
Registered User
 
Join Date: Aug 2007
Posts: 7
Decoding the ddp audio tracks to mp3/wav/ac3 etc

Converting the audio
Eac3To is our main tool for converting the audio. It's a command line program so we have to start it from there. The syntax is pretty easy and explained in the programs thread on the Doom9 forums, so I won't spend much time explaining that.
Start it with "eac3to input.ddp output.ac3" and it will work a few minutes and convert the Dolby Digital Plus track to regular AC3.




Having an issue with converting this audio.

I have installed all filters and still im getting this error "The Raw file doesnt seem to fit"

How do i fix this error and decode the audio? It's driving me insane.................
juzzy999 is offline   Reply With Quote
Old 15th September 2007, 04:10   #16  |  Link
igboo
Registered User
 
Join Date: Nov 2004
Posts: 4
Quote:
Originally Posted by juzzy999 View Post
Having an issue with converting this audio.

I have installed all filters and still im getting this error "The Raw file doesnt seem to fit"

How do i fix this error and decode the audio? It's driving me insane.................
You need to install the Bluray/HD DVD plugin from Nero. It's $24.99, but it's the only thing that fixed the problem when I was having it.
igboo is offline   Reply With Quote
Old 15th September 2007, 04:14   #17  |  Link
juzzy999
Registered User
 
Join Date: Aug 2007
Posts: 7
Cool, ill try that..

Last edited by juzzy999; 15th September 2007 at 06:57.
juzzy999 is offline   Reply With Quote
Old 17th September 2007, 23:00   #18  |  Link
rfisher1968
Registered User
 
Join Date: Aug 2007
Posts: 10
Thanks for the reply

Thanks, I got it fixed now. I'm on to the next movie
rfisher1968 is offline   Reply With Quote
Old 24th September 2007, 01:32   #19  |  Link
Taktaal
Registered User
 
Join Date: May 2003
Posts: 114
Quote:
Originally Posted by juzzy999 View Post
Having an issue with converting this audio.

I have installed all filters and still im getting this error "The Raw file doesnt seem to fit"

How do i fix this error and decode the audio? It's driving me insane.................
Btw from what movie was the audio, and what type of audio was it? You can see it in the first few lines of the EAC3TO output.
Taktaal is offline   Reply With Quote
Old 24th September 2007, 03:46   #20  |  Link
juzzy999
Registered User
 
Join Date: Aug 2007
Posts: 7
Got it working now! I needed to buy the blu-ray/hd dvd plugin from nero...

I have a perfectly working mkv with 5.1 audio playing.

BUT....

Im trying to encode the mkv to wmv-hd using WME

It wont let me use any of the 5.1 or 7.1 channel audio streams.. It keeps coming up with error.. (0xC00D0BB8)

When i use any 2 channel audio, it works fine. (Video is fantastic by the way)

Audio is a big prob??? How do i fix this audio problem???

Please help?
juzzy999 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 02:13.


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