logo Sign In

Linux OOT re-master HOWTO

Author
Time
I've been experimenting with various methods to get a widescreen transfer from the DVD's ever since I purchased on the September 12, 2006 release. If you do not rightfully own a copy, then you have no business doing this. The following information is for educational purposes only. I'll take no responsibility for any damages you incur to hardware, software. Nor will I take any responsibility for you breaking the law.

This is the method I used for all three methods. I experimented for countless hours with denoising, de-interlacing, telecine filters, and several other video filters, mostly with horrible results. I tried ffmpeg, transcode, and mencoder. I tried front-end rippers such as dvd::rip. I was bound and determined to get a decent looking transfer of these movies. If you want the best possible results, don't mess with video filters. You can get a DVD-compliant widescreen transfer that looks really great, using this method. There may be better ways to do this. This worked for me, and it was simple and quick enough to get the results I wanted.

First you need to get an exact copy of the movie to hard disk. It's better to work on video from a fast read source than straight from the DVD. You could run into timing and synchronization issues, doing this straight from DVD. You DON'T want mplayer to start dropping frames hard while your encoding, or your final cut will probably skip in the DVD player. We dump the video to hard disk like so:

mencoder -oac copy -ovc copy -vf harddup -o sw4.avi dvd://3

This means copy the audio stream, copy the video stream, do a hard duplication without frame dropping, output to an avi container, read from title 3.

Next we want to get crop, scale, and output a DVD compliant MPEG stream

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf crop=704:272,scale=720:368,expand=720:480,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:acodec=ac3:abitrate=192:aspect=16/9 -o sw4.mpg sw4.avi


This lavcodec which is native to mplayer and mencoder is the plugin we're using to encode. Output format is mpeg, with mpeg options specified as DVD format. Video filters used are to crop off 104 pixels from the top and bottom (black bars), and 8 pixels from the left and right (edges look pretty noisy on the DVD). Then we scale up to 720x368 and use expand to put digital black bars up to 720x480. You still get black bars, but it's a compromise, if you scale up too much you are most likely going to lose it in quality. We don't want that. This gives a nice matte black background for subtitles to be rendered on as well. If you actually have a panavision aspect television, this probably won't be suitable. It will be suitable for 16x9 aspect televisions.

Note the end of the video filter chain has hard duplication, again we don't want any dropped video frames. Lavc video options are codec mpeg2video, max Variablie Bit Rate 9800, Average VBR 5000. Keyint is the maximum interval between keyframes (larger for better quality, lower for better seek precision), it's one at the cost of the other with the keyint value, you can't have both. Buffer size in kbit DVD has to be 1835. Aspect is 16/9, note we didn't scale up to 720x480 and set it to 2.35:1 (apparently Panavision/CinemaScope is not acceptable in the DVD standard). Lavc audio options are audio codec AC3, and Audio Bitrate 192.

I then extracted the subtitles and went through over 3,000 lines and painstakingly checked every line to get subtitles for my movies. I don't know of any way to do subtitles for DVDs on Linux other than converting everything to picture, then text then using spumux to re-multiplex the text subs back into your mpeg stream. Perhaps there is an easier way to do this. The particular method I used for subbing can be followed in this tutorial

I know you can find subtitles online at various websites, I didn't use them. I won't list them here. If you want mine, guaranteed to have mistakes in the larger textsubs, I might post a link to them.

At this point you can multiplex your subtitles with spumux, and author that DVD compliant MPEG to a DVD. Use dvdauthor to author the mpeg, a basic xml structure should get the job done. Spumux'ed subs will be automatically detected by dvdauthor.

Write the authored directory (assumes directory named STAR_WARS) to DVD with the command.
growisofs -dvd-compat -Z /dev/dvd -dvd-video STAR_WARS


Feel free to say I'm wrong about any of this. Sure, there are improvements could be made. You could normalize the audio, adjust the picture gamma, do some denoising. It wasn't worth my time and effort. In most cases, it only degraded the quality. I did not want to spend any more time on this, this was valuable time I could spend watching the movies
Author
Time
Originally posted by: atomic-penguin
(note we didn't scale up to 720x480 and set it to 2.35:1)


This is also outside the DVD specifications, it only supports 4x3 and 16x9.
Author
Time
Yeah, I believe you are correct. I tried doing a 2.35:1 MPEG and dvdauthor refuses to author a non-compliant MPEG stream. It seems you must letterbox panavision/cinescope in a 16:9 box.
Author
Time
I just got a new TV, (high definition widescreen LCD) recently. This method has resulted in star fields flashing during high-motion sequences. It's only visible on this television, it was not noticable on my previous television. Other than that, the picture looks really great on this TV. I don't know if scaling is the culprit, or if interlacing is causing this. I may experiment with this some. I will re-edit my original post to reflect the best results that I come up with.
Author
Time
Anyone running linux will also want to check out cinelerra (Sinny-Lerra not signlerra ) it is an absolute must for anyone interested in Video on the unix platform, and it is of course free!
http://heroinewarrior.com/cinelerra.php3