VLC and Bluray discs

No-one much seems to know how to import Bluray discs using VLC (once you’ve gotten rid of the copy protection so you can actually make a backup!). So here’s how I have done it. This is all done with a recent copy of VLC on Windows. The user interface on the other versions of VLC is rather different, so your mileage will vary.

First of all, use
AnyDVD HD to remove all the copy protection from the disc. Then use “AnyDVD Ripper” (comes with AnyDVD HD) to copy the useful bits of the disc onto your PC. You’ll need a fair bit of space, a Bluray disc can require several tens of gigabytes of space.

So now, in the “STREAM” directory within the ripped copy of the disc, you’ve got a bunch of *.m2ts files. The biggest of these will be the main feature film/movie. If AnyDVD HD did its stuff, VLC will be able to play the *.m2ts directly, and you need to open the m2ts in VLC to see the codec information. Particularly, check what video codec is used (H.264 makes life easier as then you won’t have to transcode the video), and note down the audio stream ID of the first audio track, or the first AC-3 audio track. It will often be a number like 4353. Also note the bitrate (e.g. 320kb/s) and the sample rate (e.g. 48000).

VLC will by default always use the first audio track, whether that will fit into the output format you have chosen or not. The result is you often get no audio in your output file at all. So go into Tools / Preferences, and show all settings (see the bottom left corner of the dialog). In the “Input / Codecs” first page, set the “Audio track ID” to the number you noted down earlier (my example was 4353). Save the preferences.

Go into the Tools menu and select “Messages” to view the messages window. Set the “Verbosity level” to 2 and press the “Clear” button. Leave this window on the screen, you will probably need it later.

In VLC, go to Media / “Convert/Save…”. Add the m2ts file. Choose “Convert” from the Open button. Set the output filename to something ending in “.mp4”. Edit the top settings profile “Video - H.264 + AAC (MP4)” by clicking the little spanners button, and note down
all the settings, including any that are blank or 0. Return to the Convert dialog and click on the “New Profile” button (it’s to the right of the red “X” button). Enter everything you noted down, including all zeros and blanks.

In the “Video codec” page, tick “Keep original video track” if the codec of the original video was H.264. If it wasn’t, then tell it to convert it to H.264. Set the “Scale” to 1. You should copy the nitrate and frame rate from the original settings in the codec information you saw earlier.

In the “Audio codec” page, things get a little trickier. By default, VLC will always convert the first audio track it finds. If that is not “MPEG 4 Audio ( AAC )” then you will probably end up with no audio at all. By now you should have already set the audio track ID in VLC’s Preferences. So just choose “MPEG 4 Audio ( AAC )” here, and do not tick “Keep original audio track”. Set the nitrate and sample rate to the numbers you noted down earlier. Set the Channels to 2.

Save those settings and you will return to the “Convert” dialog box. Set the Destination file to wherever you want the output file to go, and make it end in “.mp4”.

Click “Start”.

It will probably race through the film, as it’s not having to transcode all the video. But when the progress bar gets to the end, it will sit there and hammer your hard disk. Let it continue, don’t press anything until the word “Streaming” has disappeared from the VLC window. Then it has finished.

Try playing your new video. If you are missing the audio, look back in the “Messages” window for any lines that mention “audio” or “a52” as that will tell you it is writing some audio. Also check the “Codec information” for your new video file and see if it wrote an audio track at all. If it didn’t, you might have the wrong audio Track ID set in the Preferences. You should get some clues as to why it didn’t work. Explaining how to fix all the problems that might arise is way beyond the scope of this document, sorry.
Comments