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 > Linux, Mac OS X, & Co

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th January 2010, 05:59   #1  |  Link
Turtleggjp
Registered User
 
Join Date: Apr 2006
Posts: 225
Using MEncoder to transcode Blu Ray movies

I've transcoded a few Blu Ray movies already in the Windows world, so I know a lot of the basics about Ripping and decrypting (I use AnyDVD HD). I will still plan on using Windows for the "prep work," but I am interested in moving the "grunt work" over to Linux. Reasons are:

1. I like Linux, and I would like to learn how to do more things there.
2. I heard that the 64-bit version of x264 has a good speed improvment in Linux.

The system I will be doing this with is a Core2 Duo Wolfdale 3.16 GHz with a GeForce 9400 motherboard, so it is not only nice and powerful (ok, it's no Core i7), but it is also VDPAU capable. Ideally, I would like to use Mencoder, and decode the source using one of the VDPAU decoders, maybe do some simple cropping, and then encode it to MPEG4-AVC using x264. This seems to be possible, but I just wanted to verify before I dive into it. Some simple command line examples would be great. Also, can this all be done using 64-bit code? I know I may have to build MPlayer/MEncoder myself, so I'm willing to do that if needed. Thanks for your advice.

Matt

P.S. I mentioned "prep work" earlier. I know how to get the video into a .mkv file using eac3to or a stripped down .m2ts file using tsMuxeR (both in Windows). Which container format works better as input for MEncoder?
Turtleggjp is offline   Reply With Quote
Old 18th January 2010, 09:35   #2  |  Link
fangorn
Registered User
 
Join Date: Jun 2008
Posts: 42
Hi,

Nowadays you can do everything needed for BluRay conversion in 64bit linux. I am using .ts or .mkv containers mostly. makemkv and tsMuxeR are both avaliable on linux and work quite well.

Also I created a collection of scripts for video conversion.

It is centered around full batch capability, so it makes no difference if you start one conversion job or hundred in a row. There are quite a few options, but you have to provide them at startup or the scripts assume something sensible.

I dont have experience with SUP subtitles though. But I will have to look into it. My scripts can handle vobsub and text format subtitles already and if possible should either support SUP or convert it in the future.

The scripts (and documentation) can be found here: http://forums.gentoo.org/viewtopic-t...ighlight-.html

In your case you need blu2mkv. It depends on two other scripts presented there and a quite recent version of mencoder, x264, ffmpeg. I use the svn/git versions usually.

Last edited by fangorn; 18th January 2010 at 10:22. Reason: forgot something
fangorn is offline   Reply With Quote
Old 18th January 2010, 11:34   #3  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by Turtleggjp View Post
Ideally, I would like to use Mencoder, and decode the source using one of the VDPAU decoders, maybe do some simple cropping, and then encode it to MPEG4-AVC using x264.
Currently VDPAU can only be used for playback. Reading the output back to main memory for further processing is not supported by FFmpeg and MEncoder. This would be interesting when using hardware deinterlacing for 1080i, or when downscaling, but in most cases the gained CPU time is negligible compared to H.264 encoding.
nm is offline   Reply With Quote
Old 18th January 2010, 18:22   #4  |  Link
cord-factor
Registered User
 
Join Date: Jan 2008
Location: Kharkov, UA
Posts: 105
Maybe you should use DumpHD and ffmpeg instead...
__________________
Gentoo linux
cord-factor is offline   Reply With Quote
Old 20th January 2010, 07:17   #5  |  Link
derrensmiths
Registered User
 
Join Date: Jan 2010
Posts: 3
Hi,
Why we are using DumpHD and ffmpeg instead...
derrensmiths is offline   Reply With Quote
Old 20th January 2010, 22:15   #6  |  Link
cord-factor
Registered User
 
Join Date: Jan 2008
Location: Kharkov, UA
Posts: 105
Transcode of BD is not realtime process (it's not a video capture), therefore mplayer's VDPAU is useless. However, the only format that mencoder has fully support on output is avi (for HD avi is not so good). ffmpeg supports more formats and is preferable for this.
Moreover, the BD can be encrypted, in this case DumpHD is only software, that can read/dump it /AFAIK/.
__________________
Gentoo linux
cord-factor is offline   Reply With Quote
Old 21st January 2010, 01:15   #7  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by cord-factor View Post
Transcode of BD is not realtime process (it's not a video capture), therefore mplayer's VDPAU is useless. However, the only format that mencoder has fully support on output is avi (for HD avi is not so good).
MEncoder can output H.264 elementary streams or they can be extracted from AVI before muxing to some more suitable container (with separately encoded audio). But as you said, ffmpeg or using x264 directly is a good alternative if there's no need for MEncoder's filters. HandBrakeCli is also pretty nice.

Quote:
Moreover, the BD can be encrypted, in this case DumpHD is only software, that can read/dump it /AFAIK/.
There's MakeMKV. The beta is still free as in beer and it handles BD+.
nm is offline   Reply With Quote
Old 21st January 2010, 10:31   #8  |  Link
fangorn
Registered User
 
Join Date: Jun 2008
Posts: 42
@cord-factor
i tried using ffmpeg multiple times - for exactly the multiple output containers it supports. But in the end I always had problems automating it. And I was not able getting my hands on the rules, what is necessary if input has one, two or more audio streams, zero, one or more subtitle streams, videotext streams from HDTV, and other features. Even for the most simple case (extract video and default audio stream and copy to new file) I could not get a working solution that is independent of the input.

Do you have a working command line/script for ffmpeg usage that I could start with? My scripts work for that usage cases that I intended them for, but I have some more usage cases that I am quite stuck atm. Especially concerning HDTV rips, that I plainly speaking cannot process atm.

Or is there an advanced tutorial that I have missed? All the stream mappings I found are very basic and I did not find switches to "ignore <type> streams" and so on.
fangorn is offline   Reply With Quote
Old 21st January 2010, 17:51   #9  |  Link
cord-factor
Registered User
 
Join Date: Jan 2008
Location: Kharkov, UA
Posts: 105
I am not sure about HDTV (I haven't it yet). But as for .m2ts (BDRemux) I did transcode different streams separately.
__________________
Gentoo linux
cord-factor is offline   Reply With Quote
Old 22nd January 2010, 11:59   #10  |  Link
fangorn
Registered User
 
Join Date: Jun 2008
Posts: 42
Yeah, I tried that too, but ended up with sync problems 50% of the time.

That is why I use mencoder with AVI container as intermediate. It only has sync problems with DTS audio from HD sources, but I found a way around it.

And I have created a script to handle AVI sources and transmux it to several output containers (MKV, MP4, TS, M2TS) optionally joined with external audio streams, subtitles, chapter data, cover art (MKV only). Also it reencodes audio automatically if the existing format is inapropriate for the selected container/x264-preset. This one comes in really handy.
fangorn is offline   Reply With Quote
Old 24th January 2010, 15:47   #11  |  Link
cord-factor
Registered User
 
Join Date: Jan 2008
Location: Kharkov, UA
Posts: 105
Quote:
Originally Posted by fangorn View Post
Yeah, I tried that too, but ended up with sync problems 50% of the time.

That is why I use mencoder with AVI container as intermediate. It only has sync problems with DTS audio from HD sources, but I found a way around it.

And I have created a script to handle AVI sources and transmux it to several output containers (MKV, MP4, TS, M2TS) optionally joined with external audio streams, subtitles, chapter data, cover art (MKV only). Also it reencodes audio automatically if the existing format is inapropriate for the selected container/x264-preset. This one comes in really handy.
Aha, if the source has LPCM audio there is no problems with a-v sync. But if it has any 'VBR' audio, loss of sync occurs fairly often. I sussually extract such audio to PCM stream, encode video (audio is copying), encode audio (video is copying), and then mux streams to mkv.
But it is the easy step, the hard one is to get the content from disk correctly (it is not always possible, from my experience ).
__________________
Gentoo linux
cord-factor is offline   Reply With Quote
Old 25th January 2010, 09:09   #12  |  Link
fangorn
Registered User
 
Join Date: Jun 2008
Posts: 42
Yeah, recoding Audio would be an option, but I have my problems with that. ;-)

Normally I just copy whatever comes by.

I was looking into reencoding audio using mencoder and other programs for avi2mkv, but I never tested it thoroughly (concerning more than sync issues). OK, for mobile devices the sound quality is a minor issue, but my scripts are designed for archiving mainly.

Regarding "get the content from disk correctly" I am not that fundamentalistic. If everything else fails, there is always the option of virtualbox, windows and the proper software.

Last edited by fangorn; 25th January 2010 at 09:11.
fangorn is offline   Reply With Quote
Old 26th January 2010, 13:07   #13  |  Link
cord-factor
Registered User
 
Join Date: Jan 2008
Location: Kharkov, UA
Posts: 105
offtop/flood
__________________
Gentoo linux
cord-factor 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 12:57.


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