PDA

View Full Version : Guide - HD DVD/Blu-Ray to AVI/MPG/MP4 - Updated for Blu-Ray


dat720
23rd April 2008, 00:33
Edit: I now own a LG GGC-H20L BD/HD Combo Drive and have started testing this guide with Blu-Ray's and so far it looks to work mostly the same!!!!!

This guide covers the compresion to AVI of BluRay/HD if you want a 1:1 copy look at This (http://forum.doom9.org/showthread.php?t=137151) Guide.

Basic requirements are a FAST Multi Core CPU, and plenty of hard drive space, 2GB or more of Ram. The hard drive space is the biggest requirement, using Transformers as an example you will have about 43GB of files after step 2 and still need up to 20GB of space for the final encode, depending on quality settings.

As a guide encoding a 1920x800 px HD/BR runs at between 4 and 8 fps on my Pentium D 935 (Dual Core 3.2ghz) 2gb RAM with SATA HDD's.

The Tools:
AnyDVD HD 6.3.1.7 newer version available - http://www.slysoft.com/en/anydvd.html
eac3to v2.45 - 21/4/08 from http://forum.doom9.org/showthread.php?t=125966
mkvtoolnix 2.2.0 - 4/3/08 from http://www.bunkus.org/videotools/mkvtoolnix/
Mencoder svn rev 26446 - 04/14/08 from http://oss.netfarm.it/mplayer-win32.php
Haali Media Splitter - 29/03/08 from http://haali.cs.msu.ru/mkv/

1) Inspect Disc
The first step involves gathering information about the HD or Blu-Ray you intend to transcode.

code:
eac3to.exe i: log(1).txt

This command creates a log file containing the streams and info about the streams on the HD/BR.

eac3to v2.41
command line: d:\vidtools\eac3to\eac3to.exe i: log(1).txt
------------------------------------------------------------------------------
EVO, 2 video tracks, 5 audio tracks, 12 subtitle tracks, 2:23:26
"Main Movie"
1: Joined EVO file
2: Chapters, 23 chapters with names
3: h264/AVC, 1080p24 /1.001 (16:9)
4: VC-1, 480p30 /1.001 (3:2), -84ms
5: E-AC3, English, 5.1 channels, 1536kbit/s, 48khz, dialnorm: -27dB, -84ms
6: E-AC3, Italian, 5.1 channels, 768kbit/s, 48khz, dialnorm: -27dB, -84ms
"Italian"
7: E-AC3, Spanish, 5.1 channels, 768kbit/s, 48khz, dialnorm: -27dB, -84ms
"Castilian"
8: E-AC3, English, 2.0 channels, 192kbit/s, 48khz, dialnorm: -27dB, -84ms
"Director Commentary"
9: E-AC3, 2.0 channels, 192kbit/s, 48khz, dialnorm: -27dB, -111ms
10: Subtitle, English, "UK"
11: Subtitle, Italian, "Italian"
12: Subtitle, Spanish, "Castilian"
13: Subtitle, Turkish, "Turkish"
14: Subtitle, Modern Greek, "Greek"
15: Subtitle, Polish, "Polish"
16: Subtitle, Hungarian, "Hungarian"
17: Subtitle, Portuguese, "EU"
18: Subtitle, English, "UK Director Commentary"
19: Subtitle, Italian, "Italian Director Commentary"
20: Subtitle, Spanish, "Castilian Director Commentary"
21: Subtitle, English, "HUD"
Creating file "log(1).txt"...
Done.

2) Demux Tracks
Decide what tracks to demux, from the log file I could see I wanted stream 3: and 5:, and set the next command up appropriately,

Code:
eac3to.exe i: 1) 3: HDDVD.mkv 5: HDDVD.ac3 -libav

f:, is my LG BR/HD Combo Drive
1), is the Feature number
3: HDDVD.mkv, tells eac3to to demux video track 3: to a mkv file
5: HDDVD.ac3 -libav, tells eac3to to demux audio track 5: to a ac3 file using the libav encoder

I used -libav as I have read that the cineplayer codec (which I had installed and would account for previous failed attempts) is buggy and does not produce a good ac3 file for encoding purposes, and i am a cheap skate and wanted to see the results with open source/free software (not counting anydvd).

For Blu-Ray movies you may see a comment at the end of the demux process asking you to rerun the same command to process the overlap information.

A good guide for eac3to is available here http://forum.slysoft.com/showthread.php?t=15543

3) Mux the Tracks to MKV
The next step is mux the ac3 audio and video into a mkv file, you could do this with the command line or the GUI, it's up to you.

Code:
mkvmerge -o HDDVD.mkv --display-dimensions 1:1920x1080 -d 1 -A -S HDDVD.mkv -a 0 -D -S HDDVD.ac3 --track-order 0:1,1:0

4) Encode to prefered format
At this point you could use just about any video encoder that is capable of reading MKV file's, I prefer Mencoder, encode the mkv file into a avi with the following command (alter to suit your tastes/requirements you may also want to do test runs using scale=320:-2 which is significantly faster than the 1920 wide movie, about 4 times on my 3.2ghz Pentium D machine)

Code:
mencoder.exe -vf harddup,crop=1920:800:0:142 -priority normal -o Out.avi -ovc xvid -xvidencopts
bitrate=8500:max_bframes=0:vhq=0:me_quality=6:hq_ac:trellis -channels 6 -oac copy In.avi

Lately i have been doing 2 Pass encodes @ 8.5mb/s and the quality is much the same as a single pass but the final avi can be upto 1-1.5gb smaller.

I suggest a GUI to setup the mencoder command line if you aren't familiar with it, I use automen, which has stopped development, do some searching on google and you will find many Frontends for Mencoder, MeGUI and MediaCoder are a couple that spring to mind.

During the encode you can use a command like this to playback the movie to check sync, using mplayer with the -idx option, mplayer will be able to seek during playback

Code:
mplayer.exe -idx Trans.avi

Once it is complete you should have a perfectly synced AVI.

Once you know the stream numbers you want, you could easily setup a batch file to do every step of this automaticly, start with a fresh HD/BR in the drive run the script and your done by morning, something like this:

Code:
@echo off
eac3to.exe i: 1) 3: HDDVD.mkv 5: HDDVD.ac3 -libav
mkvmerge.exe -o HDDVD.mkv --display-dimensions 1:1920x1080 -d 1 -A -S HDDVD.mkv -a 0 -D -S HDDVD.ac3 --track-order 0:1,1:0
mencoder.exe -vf harddup,crop=1920:800:0:142 -priority normal -o Out.avi -ovc xvid -xvidencopts
bitrate=8500:max_bframes=0:vhq=0:me_quality=6:hq_ac:trellis -channels 6 -oac copy In.avi

You could just as easily encode to a different format, search google for mencoder options or read the mencoder/mplayer manual, and you will see how flexible it is.

Go Easy on me, it's my first guide.

update 9th May 2008:
Succesfully encoded movie's using this method:
2 Fast 2 Furious HD
Blazing Saddles HD
I Am Legend BR
King Kong HD
Live Free or Die Hard BR
Meet the Robinsons BR
Predator BR
Rambo 4 BR
Robocop BR
Serenity HD
Terminator 2 HD
Terminator 3 HD
Terminator BR
The Chronicles of Riddick HD
The Fast and the Furious Tokyo Drift HD<= extra steps were required to hard sub the bits not spoken in english
The Fast and the Furious HD
The Fifth Element BR
The Simpsons BR
Transformers HD

If anyone has any comments or suggestions feel free to let me know.

steve77
23rd April 2008, 14:50
Honestly, thanks for taking the time to do this. There's only that stupid 200 page thread that has all the information spread over hundreds of posts.

I'm pretty adept with alot of the tools for Mpeg ripping and re-encoding, but I'll be damned if I can get my head around the new tools for HD-DVDs.

I'd love to see a Blu-Ray guide too :rolleyes:

MrBDRipper
23rd April 2008, 15:07
dat720, thank you for your hard work.:thanks:

I'd love to see a Blu-Ray guide too :rolleyes:

There is another easy-to-use solution for rip Blu-ray to any other video format. It may meet your need.
http://forum.doom9.org/showthread.php?t=137132

dat720
23rd April 2008, 23:01
No Probs, i figured if i found a method that works for me why not share it... i know it uses AnyDVD which allot of people dont seem to like, but it makes things so much easier and cust a whole heap of steps out.

Unfortunetly i'm yet to purchase a BR drive, i might have to hit my friend up (manages a pc shop and always does me deals) for a HDDVD\BR combo drive. If eac3to works with BlueRay then this guide should be no different for BR, give it a go and let me know.

Just to add to it abit, the main purpose for this is to have a archive of my HD's so i dont need to find the disc to rewatch a movie, the main unit i use to playback is a XBOX360, and from what i've learnt over the last few days it really hates Constant Quality encodes that go over 10mbps, which my original did, i'm redoing it as a constant bitrate @ 9mbps and so far it looks good, i played back a 20 minute snippet last night and it hasnt got the same issues the cq version did.

dat720
9th May 2008, 14:21
I'd love to see a Blu-Ray guide too :rolleyes:

Have another read of the guide, i have updated for BluRay the process is pretty much the same.

tyee
26th May 2008, 06:38
I'm trying to figure this out. Here is the output of eac3to for a bluray

E:\ProgramFiles\Rip\eac3to>eac3to f:
1) 00002.mpls, 00028.m2ts, 1:32:33
- h264/AVC, 1080p24 /1.001 (16:9)
- TrueHD, English, multi-channel, 48khz
- TrueHD, Japanese, multi-channel, 48khz
- AC3, French, stereo, 48khz

2) 00003.mpls, 00029.m2ts, 0:34:44
- MPEG2, 480i30 /1.001 (4:3)
- AC3, Japanese, stereo, 48khz

So you can see the titles are listed as 1) and 2) but where are the track numbers that I add to the command line for demuxing??

dat720
26th May 2008, 11:36
eac3to usage various with different titles, add a 1) on the end of your command and it will show you the tracks in title 1

tyee
26th May 2008, 18:19
Thanks, I should have realized that!

dat720
27th May 2008, 13:27
Glad i could help, it's all pretty straight forward.

asarian
1st June 2008, 11:27
Interesting guide. :) That's one aspect I love about this board: the guides.


5: E-AC3, English, 5.1 channels, 1536kbit/s, 48khz, dialnorm: -27dB, -84ms

...

5: HDDVD.ac3 -libav, tells eac3to to demux audio track 5: to a ac3 file using the libav encoder


I wonder, why did you not copy the offset of -84ms into the eac3to command also? I would convert it like this:

eac3to.exe HDDVD.mkv 5: 00001.ac3 -640 -84ms

At least, that's what I've been doing (and things seem to be synced just fine when I remux the lot). Or isn't the offset required any more when you're converting with eac3to? I suppose a -48ms differential is hard to detect anyway; but I just like to be sure.

dat720
1st June 2008, 12:57
That could be why my Transformers HD feels to be just a tad out of sync :)

I will try it again with -84ms and see how it goes, and update the guide.

Thanks for pointing it out.

pugnip
12th July 2008, 15:40
How did u go with the sync, how do you add the time if out of sync post a command line in mencoder, also when using that crop command it cuts the bottom off the movie well meet the robinsons did anyway, thanks

dat720
13th July 2008, 03:57
I couldn't get eac3to to behave the way i wanted with audio sync, so i just use AVI-Mux to manually fix the sync afterwoods, only movie i have ever had to do this with was Transfromers.

As for crop, you have to decide the best crop for your movie, the crop in the command i posted is for a 2.35:1 aspect ratio movie, and seens Meet the Robinson's is a 16/9 (1.78:1) ratio, no cropping is required at all, to find the crop value you need to use mplayer with the cropdetect filter:

mplayer.exe -vf cropdetect,scale=720:-2 -af volnorm=1 -vo gl:yuv=3 -idx Transfromers.mkv
scale=720:-2 reduces the playback to 720 pixels wide, for performance reason's and so i can see the entire frame, -af volnorm=1 this normalises the audio, just for evaluative purposes, -vo gl:yuv=3 sets the video output driver to OpenGL YUV mode 3, this is for Vista Aero, it stops Vista disabling aero when you run mplayer

mplayer will spit out lines like this:

[CROP] Crop area: X: 3..1917 Y: 135..944 (-vf crop=1904:800:10:140).
A: 997.8 V: 996.0 A-V: 1.843 ct: -0.248 0/ 0 87% 28% 9.0% 141 0
You care only about the blue text.
You simply replace the crop value in my original post for the one that mplayer gives you.

Octo-puss
24th August 2008, 19:54
Please sticky as well...

dat720
25th August 2008, 09:23
Please sticky as well...

I don't think i can, isn't that something only mods can do?

Octo-puss
25th August 2008, 09:45
that was how I meant it :)

scubasteve
29th September 2008, 04:10
Anyone run into this problem. When I try to use eac3to on my blueray disc drive it will give me the blueray disc info only when I type this. eac3to e: as you know you need to add 1) or 2) to the end of this to get the numbers of the channels you want to rip. Unfortunately when I do that I get this message "This TS/M2TS files seems to be damaged (sync byte missing" I can overcome this by ripping the entire blueray disc to my hard drive with AnyDvd and then running eac3to on that directory. Any clues as to why this happens?

dat720
29th September 2008, 06:34
Never seen this message before, are you using the most upto date version of eac3to?

dat720
29th September 2008, 08:19
A quick google just showed up this, might be useful for you.

http://forum.slysoft.com/showthread.php?p=128938

burro08
3rd October 2008, 03:15
@dat720

im gonna test out your guide sounds interesting after im done would you like me to take pics of each step?, might help illustrate it more for noobs

scubasteve
4th October 2008, 04:20
Never seen this message before, are you using the most upto date version of eac3to?
Yes using the latest version of eac3to I just downloaded it and gave it a try. It is very strange, as soon as I add the 1) in the eac3to command line I get the error but only when using my blu-ray drive. I can type eac3to e: and get a listing but with out the numbers. When I use my hd-dvd drive I have no problems. I checked out the link you mentioned and they are getting a similar error, but only on certain discs, my problem occurs on every blu-ray disc. At least I can overcome it just takes a while longer to rip first to the hard drive. I have attached images of the command windows.

SamuriHL
4th October 2008, 21:49
Yea, I was never able to determine what's going on with that. I believe it could be a weird bug in AnyDVD but without being able to give them more information to go on there's not a lot Slysoft can do to fix it. If I ever get any free time (hahaha) I'll see if I can look into it more and maybe figure out what's causing it so they can fix it.

JustABDFan
10th October 2008, 17:01
Maybe ripping the iso to harddrive produces slightly different files than the "on the fly" decryption and eac3to is picking up on that.

rica
10th October 2008, 19:36
Yea, I was never able to determine what's going on with that. I believe it could be a weird bug in AnyDVD but without being able to give them more information to go on there's not a lot Slysoft can do to fix it. If I ever get any free time (hahaha) I'll see if I can look into it more and maybe figure out what's causing it so they can fix it.

What BD discs have you met this problem; i haven't done any until now on?

SamuriHL
10th October 2008, 19:49
I don't remember now. But I know I've encountered this issue before. The OP of the linked thread said he had this issue on Nightmare Before Xmas which is one I don't have.

rica
10th October 2008, 19:59
Weird?

rica
10th October 2008, 20:27
@scubasteve,

Please give it a go with BDInfo using the same problematic BD:
http://www.cinemasquid.com/Tools.aspx

If you can open the disk, tick the first mpls and click scan and tell us what is happening?

FirstBorg
12th October 2008, 14:15
Hi!
I tried to follow this guide, but I encountered a problem. When I try to encode the files with mediacoder, I always get "no file outputed". Its a VC1 file. I tried demuxing with eac3to, and then muxing it into mkv using mkvmerge. I tried simply demuxing with tsmuxer... everytime mediacoder (newest version) cant seem to output.

Any idees please?

edit: it works when I encode to mpeg2... you think some codec is missing? at first I tried encoding to mkv using h264.

dat720
12th October 2008, 14:50
My guess is the build of mencoder that mediacoder is using is not happy with VC1 or there is something wrong with the h264 settings, also for mencoder to be able to handle VC1 properly it must have the binary codec package, not sure if mediacoder includes this package.....

rica
12th October 2008, 16:54
Hi guys,
I don't know mediacoder but if it supports VC1 input, just extract VC1 instead of making mkv since VC1mkvs are always problematic.

dat720
13th October 2008, 10:12
What do you mean by extract VC1?
VC1 is the codec, it will need to be recoded to another codec, H264 being the best alternative.

rica
13th October 2008, 17:38
I mean you can extract vc1 video directly via eac3to;
so your command will be:

eac3to input.evo output.vc1

It is just an extraction, not re-encoding...
Like this:

eac3to E: 1) 3: G:\New\video.vc1 4: G:\New\audio.a3 8: G:\New\subtitle.sup
------------------------------------------------------------------------------
EVO, 1 video track, 4 audio tracks, 6 subtitle tracks, 2:34:11
"Feature Presentation"
1: Joined EVO file
2: Chapters, 41 chapters without names
3: VC-1, 1080p24 /1.001 (16:9) with pulldown flags
4: E-AC3, English, 5.1 channels, 640kbps, 48khz, dialnorm: -27dB
5: E-AC3, French, 5.1 channels, 640kbps, 48khz, dialnorm: -27dB
6: E-AC3, Spanish, 2.0 channels, 192kbps, 48khz, dialnorm: -27dB
7: E-AC3, English, 2.0 channels, 192kbps, 48khz, dialnorm: -27dB
"Commentary"
8: Subtitle, English
9: Subtitle, English, "SDH"
10: Subtitle, French
11: Subtitle, Spanish
12: Subtitle, French, "text"
13: Subtitle, Spanish, "text"
[v03] Extracting video track number 3...
[v03] Removing VC-1 pulldown...
[a04] Extracting audio track number 4...
[a04] Removing E-AC3 dialog normalization...
[a04] Decoding with DirectShow (Nero Audio Decoder 2)...
[a04] DirectShow reports 5.1 channels, 24 bits, 48khz
[a04] Encoding AC3 <640kbps> with libAften...
[v03] Creating file "G:\New\video.vc1"...
[a04] Creating file "G:\New\audio.ac3"...
[s08] Extracting subtitle track number 8...
[s08] Creating file "G:\New\subtitle.sup"...
Video track 3 contains 221816 frames.
eac3to processing took 57 minutes, 40 seconds.
Done.

dat720
14th October 2008, 20:36
I get you now :)
And the word your looking for is Demux

rica
14th October 2008, 20:52
I used the word "extract" on purpose, do you get me now? :p

dat720
14th October 2008, 20:55
I do, and it's nice to see some people that aren't fixated on GUI's, aren't affraid to get in and do things on the command line :)

burro08
14th October 2008, 21:08
I do, and it's nice to see some people that aren't fixated on GUI's, aren't affraid to get in and do things on the command line :)

or for those that are afraid ie, me to an extent. You could try yr_eac3to_more_gui

Ps dat did u read my post about getting screan shots for u?

dat720
15th October 2008, 09:50
Oh yes i did sorry, i didn't feel it was required as the tools i specified and explained are all cli tools so pasting text is enough, if you'd like to tho your welcome, pm me i'll give you my email addy and i'll add them to the original post, with credit of course.

PS i'm just too lazy lately :) i spend all day everyday at work on a PC, i can find better things to do with my spare time... like install a PC in my new car :)

scubasteve
17th October 2008, 04:10
@ Rica
I downloaded the program you mentioned in your post and ran it on a blu-ray disc after I had tried to use eac3to on the same disc with the same problem. After running the scan on the first MPLS file as you mentioned I stopped the scan short of completion and again tried to use eac3to on the same disc. eac3to then worked properly. Very strange but if this works on all my blu-rays it will at least save me the time of ripping the disc to my hard drive first. Thank you.

FirstBorg
19th October 2008, 14:11
Hi!
I got a question. Im trying to convert a BD to a DVD. I managed to demux a stream into a vc1 file and two dts files. Since I want a pal dvd, I converted the dts files with eac3to using eac3to input.dts output.ac3 -speedup -448

correct so far?

the video, I encoded with mediacoder at the resolution of 720x576. I checked "Framerate" and set it to 25 with a check at "global". But when I muxed both together with tmpgenc, the audio is terribly out of sync. Opening both with media player classic shows, that they have not the same length. The audio is 5 minutes shorter than video, which, at the length of 125 minutes, is exactly the 4% of pal speedup. Does that mean, that, although the mv2 file says 25fps, it was not really converted to 25fps?

and another question. I tried muxing with mediacoder... I simply loaded the ac3 file in the mux tab, but at the end, there was still no audio. Do I have to enable audio in the audio tab, even if i dont want to process it, just muxing it?

thx.

rica
19th October 2008, 14:31
@scubasteve

That is what i've found:
If you leave a disk on tray for a long time, anydvd might forget it(not always but sometimes); so i suggested this method so as to remind AnyDVD that there is a disk on the tray.
So i would suggest leave anydvd in "auto start" mode always.
In case eac3to doesn't recognize the disk, you open the tray and close again and wait untill anydvd scan completed.
This time it will work.

Could you try this way if you meet a problem?

rica
19th October 2008, 14:34
Hi!
I got a question. Im trying to convert a BD to a DVD. I managed to demux a stream into a vc1 file and two dts files. Since I want a pal dvd, I converted the dts files with eac3to using eac3to input.dts output.ac3 -speedup -448

correct so far?

the video, I encoded with mediacoder at the resolution of 720x576. I checked "Framerate" and set it to 25 with a check at "global". But when I muxed both together with tmpgenc, the audio is terribly out of sync. Opening both with media player classic shows, that they have not the same length. The audio is 5 minutes shorter than video, which, at the length of 125 minutes, is exactly the 4% of pal speedup. Does that mean, that, although the mv2 file says 25fps, it was not really converted to 25fps?



You must have speedup video as well:

eac3to input.m2ts output.vc1 -speedup

EDIT:If you use subtitles; this is the method i use to synchronize:

http://forum.doom9.org/showthread.php?p=1181900#post1181900

_ _ _ _ _

FirstBorg
19th October 2008, 17:09
doesnt mediacoder speed it up when changed the fps setting?

rica
19th October 2008, 17:22
doesnt mediacoder speed it up when changed the fps setting?

Dunno mediacoder, sorry.

FirstBorg
19th October 2008, 22:53
it really seems that there is no speedup done. I tried it using eac3to input.m2ts 1:video.vc1 -speedup

doesnt work...

any suggestions to try other encoding software to convert to mpeg2?

rica
19th October 2008, 23:07
it really seems that there is no speedup done. I tried it using eac3to input.m2ts 1:video.vc1 -speedup

doesnt work...

any suggestions to try other encoding software to convert to mpeg2?

Strange, it works for me.
EDIT:i'm uploading a 25 fps BD :)

rica
20th October 2008, 00:02
doesnt work...



OK, here is a 25p BD, transcoded from DVD-HD; it must be familiar to you.
accelerated to 25p from 23.976 with -speedup option, eac3to removed pulldown as well:

http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335caa9605bd5e10aac98

scubasteve
20th October 2008, 00:52
@ rica Anydvd is in "auto start as you recommended and has been since I installed it. What you mentioned about reminding AnyDVD that there is a disk in the tray is interesting but here is an interesting tidbit. When I first load a Blu-ray into my player I get the normal AnyDVD messages that it is scanning the disk and it will be ready shortly. Then my Power DVD player opens up to try to play the movie. I close the Power DVD and then open my command window and try to use eac3to. I immediatly get the error message as soon as I add the " 1) " to the end of the command. As I mentioned before I can run the mediainfo.exe file on the blu-ray disk and then am able to use eac3to.exe normally without having to first rip to my hard drive. As soon as I take to disk out and re-insert I run into the same problem.

rica
20th October 2008, 01:03
@scubasteve,

after your first post, i tried to regenerate the issue and i've noticed in case of leaving disc for some time without making any action caused this issue, otherwise i've never met any problem.
But i wonder whether you meet the same issue with all of your discs? If so, you must renew the firmware, i suppose.