Friday, August 12, 2011

Burning files to a video DVD in Linux

There are essentially two ways to store video files. The first is to burn them as files and the second is to convert them to a video DVD format and burn them that way. I am going to presume the reader knows enough about computers to realise what hardware is necessary. If this is not the case then it is best to learn more about computers before proceeding.

Installation of the software of choice varies depending on the installed distribution. Some distributions require the user satisfy dependencies where as others will handle the dependencies automatically.

The first method is the simplest. There are several programs which can be used for this purpose. Indeed the user can in the, worst case perform direct writes to the DVD burner. Programs such as K3B and Brasero are up to the task. My personal favourite is K3B because there are more options, such as verification of the burned DVD, and is slightly more user friendly.

Although it is possible to burn files from several different areas across file systems and networks, it is generally a good idea to gather the files into one place. This way it is possible to burn them as directories containing the video files. This is useful if there are a number of unrelated video files going on to a single DVD.

The second method is a bit more involved. It involves transcoding the videos to a form acceptable to DVD players, generating at least one menu (unless only one video is planned for the DVD), and finally generating an ISO image of a DVD containing the altered files. There are fewer alternatives for this method than the first. I have tried two and found the simplest to be a program called DeVeDe.

One of the dependencies is a program called mencoder. This is part of the mplayer program. The mencoder program may need to be installed separately. Other programs will use ffmpeg or transcode for the same purpose.

DeVeDe provides a good amount of compression by itself. It is possible to change the bitrates of the audio and video components of the video file. Most file formats will tell the program the original values for the video. Others will not. Generally it is a good idea not to use values larger than the original values because nothing will be gained by doing so.

The most common settings to change would be the quality settings (this affects the video) and the audio settings (stereo versus 5.1 Dolby). Trial and error on specific players is the only way to determine what the optimal settings are.

Depending on the computer used there are additional settings in the lower left (click the '+' sign) which will allow multi-core extensions to be used. In the same group of settings the user can determine how far along they want the creation of the disk to proceed.

Menu settings are in the middle near the bottom. They are pretty much self explanitory.

There is a lot of general advice. If the target display device is an old style 4:3 TV there are problems with the width of the subtitles in many anime videos. Specifically those which are referred to as 'hard subs' will often go from edge to edge. This is not a problem with the newer 16:9 TVs. The method to correct this is to use mencoder separately to resize the video and put black bars around the border before using DeVeDe. Currently most subtitles are 'soft subs'. This allows the user to manipulate the width of the subtitles. I suggest a width of 80% so the viewer will not lose part of the subtitle to the plastic at the edge of the screen. If the user is like myself (in need of strong corrective lenses) they may want to put a black border around the subtitles for easier reading. The form factor value is a floating point number in the range of 0 to 10. The larger the number the thicker the border. If there are multiple subtitle streams it is best to set the subtitle ID as an extra parameter in the advanced settings.

Some MKV files pose a problem for the July/August 2011 version of mencoder. Although the files will play more or less properly outside DeVeDe, they will not play properly within it. There are two major problems. The first is the subtitles stay on the screen until the next subtitle appears. The second is the audio and video get out of sync. The first is corrected by using the MKV demuxer instead of the default. The second is corrected by telling the encoder not to skip video frames and to correct the synchronisation every '0' seconds.

Here is a sample of what I use as extra parameters in the advanced options for encoding to a 4:3 TV using an MKV file as a source. These need to be done in order.

-sid 1 -subwidth 80 -ffactor 10 -noskip -mc 0 -demuxer mkv

An alternative would be to put the following configuration file into the '~/.mplayer/mencoder.conf' file...


# mencoder configuration file at ~/.mencoder/mencoder.conf

# Subtitle stuff. For 4:3 TV 80% of the screen. 10 pixels around subs.

subwidth=80

ffactor=10

# Uncomment the line below for proper display of MKV subs. Use this here if no menu is planned.

#demuxer=mkv

# Sync audio and video

skip=NO

mc=0


Apart from the demuxer line, the rest don't do any harm to the video.



0 Comments:

Post a Comment

<< Home