Elsewhere in PC Plus issue 314, you’ll find a feature that shows you how to transform your offline media collection into an online content library. We explain the whole process, from building the library to streaming your movies, music and photos to any of your playback devices, locally or across the internet.
The library is built using Windows, but the vast majority of the software it uses is open source, which means the procedure can be replicated and even improved upon if you replace Windows with Linux. With a Linux solution you’ll have a more configurable setup that uses the latest cutting-edge software and is better suited to your needs.
As with many Linux projects, the only downside is effort. You’ll need to manually edit and add things that might be bundled automatically with Windows executables. But that’s part of the adventure, and it lets you tackle the problem and create a perfect solution using free software alone.

Handbrake is a great encoding tool. You’ll need to add a PPA before you can install it onto Mint, but the installer will handle the dependencies.
Installing Handbrake
If you’re in the UK, you can’t duplicate most CD, DVD or Blu-ray discs without the consent of the copyright holder. Although it seems that this law is about to change to allow fair use format shifting similar to the laws in the US, the legal position on making a personal copy is still something you should be wary of.
Plenty of video formats and discs don’t have this restriction though, and there are places in the world that don’t have the same copyright laws, so there are still plenty of legitimate reasons for transcoding one format to another. You’ll find many tools that promise to do the job in the average package manager – look at the dozens of search results for ‘dvd rip’, for instance – but one tool you won’t find, for some reason, is Handbrake.
Handbrake is the best piece of encoding software we’ve come across, which is why it’s so surprising there’s no default package for either Ubuntu or Mint. We’re going to install Handbrake onto Mint, so we have to jump through several extra hoops, the first of which involves adding something called an Ubuntu PPA. PPAs are personal package archives belonging to Ubuntu contributors rather than the official repositories, and they’re a great source of cutting-edge software.
They have an advantage over downloading a static binary or building your own version because when the maintainer updates the PPA, your local package will update too, just as they would were you to update packages from Synaptic. They’re also relatively easy to add and install packages from. To install Handbrake, for example, type the following into the command line:
sudo add-apt-repository ppa:stebbins/handbrake-snapshotssudo apt-get updatesudo apt-get install handbrake-gtk
These commands will add John Stebbin’s package archive (PPA) to your list of repository sources, then update the package database with any new packages and finally install the latest version of Handbrake with the GTK GUI. The other advantage of a PPA installation is that the installer will also handle all dependencies, so you won’t need to worry about grabbing the correct suite of codecs for Handbrake to use – they’ll be installed automatically. You can then launch the application from the main menu.
Encode your data
The first thing you need to do when you run Handbrake initially is select a ‘source’ – the location from which Handbrake takes its input. The application will accept many different input formats, including lots of video codecs, the raw data from a DVD drive, copies of the ‘VIDEO_TS’ folder and even an ISO image of the disc. By default, it won’t circumvent copy protection, so you’ll need to solve this problem separately.
After you’ve added a source, you’ll have to wait a few moments while Handbrake scans the media. It’s looking for chapter and title information so that you can choose between the main feature or additional media on a disc, for example. And choosing which element of the source you want to encode is the next step. If your source is a DVD, use the dropdown ‘Title’ menu to select which video source from the disc to encode.

Handbrake accepts a wide range of file formats, including data ripped from DVDs. It will also output files in codecs for most playback devices.
By default, Handbrake chooses the longest one, which is nearly always the main title. You can also choose to encode a range of chapters. The most important option comes after selecting the media to encode, and that’s the codec you want to use for the output file. This will depend on the device you’ll be using to play the resulting file, and Handbrake includes several excellent presets.
If you’ve got an iPhone, iPad or Android device for example, click ‘Devices’ in the preset list and select a profile. If you’re going to stream the resulting video to a Linux laptop, netbook or PC, we recommend selecting ‘Regular | Normal’ as the preset, then changing the video format (container) to ‘MKV’. This should ensure maximum compatibility with most Linux players.
Fine-tune the codecs
Although the presets are the best option if your device is listed, there’s plenty of flexibility if you’re planning to encode a movie for streaming to another PC. You might want to change the output resolution, for example. This can be accomplished through the ‘Picture settings’ window, which also shows a preview of the changes you’re making to the original file. You can adjust the crop amount and the end resolution, but if you want to make manual changes you will need to select ‘Off’ for anamorphic and disable the ‘Optimal for source’ checkbox.
Back in the video tab of the main window, the RF slider adjusts the video quality of the output file, where high values decrease the file size and the quality. You typically only need to make small adjustments.You should also make some adjustments to the audio panel. By default, if your source is a DVD, the ‘Normal’ preset will pass through the surround audio data to the end file.

There’s plenty of scope for fine-tuning Handbrake’s output for another PC. You can adjust video and audio, balancing quality with file size.
This is perfect if you’re going to play the video on a device that’s digitally connected to an amplifier (through HDMI or SP/DIF, for example), because each discrete audio channel will be left untouched. Surround codecs like AC3 can be difficult to play back on portable devices. For maximum compatibility, we recommend choosing MP3 (Lame), which almost any device can handle. When you’re happy with the setup, click on the ‘Start’ button to initiate the conversion and watch the progress bar to see when the task will finish.
Create a media server
Now we’ve got a collection of files we want to stream, it’s time to set up a server for them. For a simple solution, you could use Samba to share a folder with your other machines. This folder could then be mounted and files accessed just as they would locally. There are even several apps for Android and iOS phones that can access content on a Samba share, but if you want to include a device like a PlayStation 3 or UPnP compatible client, or watch from a web browser, you’ll need to look for a more serious solution.
The best we’ve found is called MediaTomb, and can be installed from Mint through the package manager. After installation, you’ll need to first edit its configuration file before you can access the web interface that makes managing your content easier.

MediaTomb is the best media server we’ve come across, and like all the tools we’ve used here, it’s free. Install it though the Mint package manager.
From the command line, type sudo nano /etc/mediatomb/config.xml. Don’t be intimidated by the size of this file, you only need to change a couple of things to get it to work. The first is to change the ‘no’ in <ui enabled=“no” to ‘yes’, and the second is to enable ‘accounts’ so you can log in. This is a good idea anyway, especially if you plan to stream your collection across the internet.
If you’re going to stream to a PS3, uncomment the lines indicated by the configuration file.Save the configuration file (using [Ctrl]+[X] from nano), and type sudo /etc/init.d/mediatomb restart to force Mediatomb to stop, read the new config file and launch again. You can now point a browser on the same machine at http://localhost:49152 and you’ll see the login window. The username and password are ‘mediatomb’, unless you changed this in the configuration file. You’ll then find yourself looking at the blank database of content held within MediaTomb.
Click the ‘Filesystem’ button and navigate to your media. You can add single files and entire directories with the buttons on the top right. And the same is true of any photos or music files you have. Format permitting, MediaTomb will ad them all to its database, and you can check to make sure content has been added from the database view in the browser window.
Streaming the content
You can now access your content from any machine on the same network. There are several ways to do this, the easiest being via a web browser. You will need the IP address of the machine running the server software (use the network panel applet, or type ifconfig on the command line), to replace ‘localhost’ from the previous step with the browser URL. You can then log in and access your content the same way. Clicking a file will play it if your browser supports the codec, or download the fi le if not. If you right-click and copy a file’ URL, you can then paste it into a media player that accepts network access. VLC is the best example, because it can stream content from a URL.

VLC Media Player will stream your content directly from a URL. It plays the vast majority of codecs without the need for additional codec packs./p>
MediaTomb’s best feature is the ability to act as a UPnP server so that any other UPnP client should be able to automatically discover your media and play it back, as long as it supports the codecs you’ve chosen. If not, you can use its configuration file to transcode formats on the fly. There are many UPnP clients, but you can check everything is working from VLC. With the Linux version, instead of pasting a URL into the network setup page, open the playlist window from the View menu. Within the media browser on the left, click on ‘Local network’ followed by ‘Universal plug’n’play’. This will update the playlist on the right with a list of local UPnP servers, including your MediaTomb device. Click this to browse its content and double-click on a file to play.
This feature is taken from PC Plus Issue 314 – on sale now. To view the expanded feature, as well as more fantastic articles, tutorials and reviews, click here to buy the digital version of PC Plus issue 314 now. You can also subscribe to PC Plus or buy PC Plus Magazine back issues.
Leave a Reply
You must be logged in to post a comment.