Ubuntu Raring Audio Video Conversion

From

Jump to: navigation, search
Ubuntu Raring Audio Video Conversion
Full page | eBook Version

Contents

Audio / Video conversion

Here is a nice review of some of the applications that enables conversion and handling of these types of files. Some specific examples and suggestions are here.

Mencoder

Mencoder is part of the MPlayer set of libraries (that also uses several of the FFMPEG libraries) for audio/visual conversion, including from DVD (.vob) format to other video formats. Some examples of usage are here.

FFMPEG video / audio conversion

FFMPEG is the swiss-army knife of video and audio format conversion. It succeeds when no other program can. It is free and open source. If it not yet installed on your system as part of another package (it is used by many video/audio editors), then install it:

sudo apt-get install ffmpeg

For examples and further information, see this section.

  • FFMpeg requires that multiple restricted extra codecs be installed. This can be done in a single easy step from the command-line Terminal:
sudo apt-get install ubuntu-restricted-extras
FFMPEG GUI

WinFF is a free, GPL-licensed open source GUI frontend for FFMPEG. Install:

sudo apt-get install winff xterm

Run:

Menu -> Applications -> Sound & Video -> WinFF
Join video segments

Individual video segments (MPEG-2, for example) can easily be joined:

cat samplevideo1.mpg samplevideo2.mpg samplevideo3.mpg > samplevideo123.mpg
You can then write the resulting MPEG-2 file to a DVD and play it in most DVD players.
Split a file into segments

Any file can be split into segments using the Linux command:

split -b 1440k my_big_file

which will split my_big_file into equal segments of size 1440 kb.

Save any streaming Flash video

An easy way is to install the Video Download Helper plug-in for Firefox.

Otherwise, most Flash videos download to the /tmp directory while you watch the video, creating a randomly-named video file there (such as Flashuh4G6s). When you close the webpage, this file in the /tmp directory will be erased. After the entire video has downloaded, but before you close the webpage, copy that file (such as Flashuh4G6s) to your home directory (where it will not be erased). Of course, for this to work, you must change your Flash (or Gnash) settings to allow an unlimited buffer. While watching your Flash video, right click to bring up the Flash -> Settings window. Set the Buffer to "Unlimited."

Once you have copied the file, rename it appropriately with the .flv added to the filename. You can then watch it using VLC or Mplayer.

Here is another method that involves making a symbolic link.

Save rtmp / flv streams

flvstreamer is a command-line application to dump rtmp streams. Install:

sudo apt-get install flvstreamer

Example of usage:

flvstreamer -r "rtmp://host/dir/file.flv" -o filename.flv

If you see the following the "WARNING: Download may be incomplete, try --resume!" message, try to use the --resume option:

flvstreamer -r "rtmp://host/dir/file.flv" -o filename.flv --resume

Convert Flash video audio to mp3

Once you have downloaded flash video content (.flv) from the Internet (using the Video Download Helper plug-in for Firefox, for example), the audio component can be converted to an .mp3 file. (This will work for any type of video file, not just Flash.) For details, see this section.

2ManDVD

2ManDVD is a GUI utility for creating DVD videos. It is the successor of ManDVD. Choose the version for your architecture and install it from the 2ManDVD website. Click on the download link and select to open it with the GDebi Package Installer (default). (If you have previously installed ManDVD you must uninstall it first.) For a usage tutorial, read this 2ManDVD guide.

Run:

Menu -> Applications -> Sound & Video -> 2ManDVD

DeVeDe

DeVeDe is a program to create video DVDs and CDs suitable for home players (i.e. VCD, sVCD or CVD) from any source video file that is supported by MPlayer. Choose the version for your architecture and install it from the DeVeDe website. Click on the download link and select to open it with the GDebi Package Installer (default). For a usage tutorial, read this DeVeDe guide.

Run:

Menu -> Applications -> Sound & Video -> DeVeDe

ManDVD

ManDVD is a QT-based DVD authoring tool which accepts several different file types as input. Install:

sudo apt-get install mandvd xine-ui

DVD Author

  • For more details on creating a "commercial" (.vob) format DVD-video, see this section.
  • DVD author allows you to create menus and format your MPEG-2 videos onto a DVD disc so that you can play it in a commercial DVD player. DVD Author is a command line tool, but several GUI's exist. Install:
sudo apt-get install dvdauthor
  • To prepare an audiovideo file (e.g. an .avi file) for conversion to DVD (.vob) format authoring (using a tool like dvdauthor), it is best to convert the file to a format with MPEG-2 (avcodec) video, AC3 (lav) audio, and the MPEG-PS (A+V) container as an intermediate first. This can be done using the GUI utility Avidemux, for example. Here is the Avidemux tutorial for doing this. Details are also found here.
QDVDAuthor
  • QDVDAuthor is a Qt-based GUI for DVD Author. A package for Raring does not exist, but the Maverick package can be used.
  • Enable the Maverick multiverse repository temporarily by adding it to the Synaptic Package Manager Origin of Packages ("Other" software):
Menu -> System -> Synaptic -> Settings -> Edit Origins -> Software Sources: Other Software -> Add...
deb http://us.archive.ubuntu.com/ubuntu maverick multiverse
  • From the Get and Remove Software menu (of Synaptic), install the qdvdauthor package (and the qdvdauthor-common package if it is not automatically installed as a dependency).
  • Once the download/installation is complete, disable the Maverick multiverse repository (to prevent conflict with other Raring packages).
  • Download and install the addons:
cd /tmp
wget http://qdvdauthor.sourceforge.net/data/masks.tar.bz2 -O masks.tar.bz2
wget http://qdvdauthor.sourceforge.net/data/buttons.tar.bz2 -O buttons.tar.bz2
wget http://qdvdauthor.sourceforge.net/data/alpha_trans.tar.bz2 -O alpha_trans.tar.bz2
cd /usr/share/qdvdauthor/
sudo tar -xjf /tmp/masks.tar.bz2
sudo tar -xjf /tmp/buttons.tar.bz2
sudo tar -xjf /tmp/alpha_trans.tar.bz2 

Run:

Menu -> Multimedia -> QDVDAuthor

Follow instructions in the Quick-Start Guide:

QDVDAuthor -> Help -> Quick-Start Guide

For a tutorial on authoring DVDs, see this guide.

Other DVD authoring programs

There are several other DVD authoring programs. For additional information see the Ubuntu Community pages. Packages include:

Bombono, a GTK-based, GUI DVD authoring program. Install (requires multiverse repositories to be enabled):

sudo apt-get install bombono-dvd
  • DVDStyler is a full-featured, cross-platform DVD-authoring frontend. Install:
sudo apt-get install dvdstyler

KMediaFactory is a fast and simple KDE-based DVD authoring frontend for dvdauthor. (The DVD folders can then be burned to disc using K3b.) Install (requires multiverse repositories to be enabled):

sudo apt-get install kmediafactory

ToVid

ToVid is a collection of tools to create a DVD from a number of different video formats. A GUI is available. Install:

sudo apt-get install tovidgui tovid

Ripper X CD Ripper/Encoder

Ripper X is a GTK-based (i.e. Gnome) open source utility to rip CD audio tracks to OGG, MP3, or FLAC formats. It supports CDDB lookups.

sudo apt-get install ripperx

Asunder CD Ripper/Encoder

Asunder is a GTK-based open source CD ripper/encoder which saves to Wav, MP3, OGG, FLAC, or WavPack. Self-installing .deb packages are available here.

Audex CD Ripper/Encoder

Audex is a port to KDE4 of the KAudioCreator package used in KDE 3. It can create output for LAME (MP3-compliant), OGG Vorbis (oggenc), FLAC and RIFF WAVE. Install:

sudo apt-get install audex

Gnac (GNome Audio Converter)

Gnac (GNome Audio Converter) converts between all GStreamer supported audio formats. It is not yet part of the standard repositories. See these installation instructions.

SOX (encodes/decodes audio)

SoX is a command-line utility to convert audio formats. See this usage guide. Install:

sudo apt-get install sox

Run:

sox
Install MP3 support for SoX
  • Install the MP3 libraries (if not already installed):
sudo apt-get install libmp3lame0
  • For simple conversions, I have found FFMPEG to be easier, and FFMPEG already has mp3 support. Example:
ffmpeg -i audiofile.m4a -ab 128k -ac 2 -ar 44100 audiofile.mp3
where -ab specifies the bit rate, -ac specifies the number of channels (in this example 2-channel stereo), and -ar specifies the sampling frequency.


CDs and DVDs

Brasero (CD/DVD burner)

Brasero is a CD/DVD burning application that is now part of the Gnome desktop (but can be used with any Ubuntu derivative). If not already installed:

sudo apt-get install brasero

Gnomebaker (CD/DVD burner)

Gnomebaker has been the default CD/DVD burning application for the Gnome desktop. If not installed:

sudo apt-get install gnomebaker

K3b (CD/DVD burner)

k3b (KDE Burn Baby Burn) is the default KDE CD and DVD burning utility included in Kubuntu, but can run well in Gnome. (Due to licensing requirements, mp3 capabilities must be installed separately as the libk3b6-extracodecs package). For detailed information see this section. Install:

sudo apt-get install k3b libk3b6-extracodecs

K9copy (DVD Ripper)

K9copy is the free open source DVD backup, copying, compression, and authoring utility that requires libdvdcss. For other info, see this or this guide. You can easily create MPEG-2. MPEG-4, or DVD videos with this utility.

sudo apt-get install k9copy
  • See this section for tips on using k9copy with mencoder and NTFS DVDs.
  • Tips: At times you may not be able to copy your DVD directly from DVD to DVD. This may because you have a small imperfection in the DVD, or because the DVD was initially created with a non-standard burning method. There are two methods that can help solve this problem:
  • Copy the VIDEO_TS and AUDIO_TS folders from your original DVD directly to your hard drive. Then use k9copy (or k3b or Gnomebaker) to burn a DVD directly from these hard drive folders.
  • Use k3b (or Gnomebaker) to copy an .iso image from the original DVD to your hard drive. Then use k9copy to extract from the hard drive .iso image and then burn a DVD directly from it.

Handbrake

Handbrake is a GPL-licensed open source tool for converting DVD to MPEG-4 (iPod format) that is an alternative to k9copy. (It can handle many DVDs that k9copy cannot.) Note that Handbrake supports X264/H.264 and MP4 video encoding but no longer supports the XVID video codec. It uses the .MP4/.M4V or .MKV containers, but no longer supports the .AVI container. However, it uses a streaming algorithm that (while slower than other methods) is compatible with a large variety of encryption techniques. (Following "ripping" from a DVD, the resulting .MP4 or .MKV file can be converted to other formats, such as .AVI with XVID, using these suggestions.) Installation is from the developmental PPA archive.

sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk handbrake-cli

If you do not intend to use the command-line interface, you can skip handbrake-cli.

  • Alternatively, to your package manager you can add the custom repository:
deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu oneiric main

then install the package handbrake-gtk (and handbrake-cli if desired).

dvd::rip

dvd::rip is a DVD backup/copy program, written in GTK-based perl, that uses the transcode and ffmpeg video/audio processing and conversion tools. See the website for installation and official documentation. For other info, see this dvd::rip tutorial. Install:

sudo apt-get install dvdrip rar

Acidrip

Acidrip is a DVD backup/copy program, written in GTK-based perl, that uses the Mplayer and Mencoder video/audio processing and conversion tools (and therefore yields the best quality DVD rips to an .AVI file with XVID video, for example). See the website for installation and official documentation. Install:

sudo apt-get install acidrip

DVD Fab (DVD Ripper)

DVD Fab is the favoured DVD backup tool for today's DVD encryption methods. It must be run in Wine (since it is a Windows application). It comes as a fully featured 30-day trial, but see these instructions for fine-tuning the trial period.

DVD Playback Capability

libdvdcss

To play encrypted DVDs, the libdvdcss2 package is essential. libdvdcss2 is a simple library designed for accessing DVDs like a block device without having to bother about the decryption. More information about this package can be found at VideoLAN.

  • Add the VideoLAN repository key:
wget -O - http://download.videolan.org/pub/debian/videolan-apt.asc|sudo apt-key add -
  • Install the repository and package manually from the command-line:
sudo add-apt-repository "deb http://download.videolan.org/pub/debian/stable/ /"
sudo apt-get update
sudo apt-get install libdvdcss2
deb http://download.videolan.org/pub/debian/stable/ /
then install the libdvdcss2 package using the package manager.
  • You can install libdvdcss2 as a 64-bit .deb package (without installing VideoLAN repositories):
wget -c http://download.videolan.org/pub/debian/stable/libdvdcss2_1.2.13-0_amd64.deb
sudo dpkg -i libdvdcss2_1.2.13-0_amd64.deb
or a 32-bit .deb package:
wget -c http://download.videolan.org/pub/debian/stable/libdvdcss2_1.2.13-0_i386.deb
sudo dpkg -i libdvdcss2_1.2.13-0_i386.deb
  • As of September 2013, Medibuntu is no longer maintained. Here are legacy Medibuntu instructions which will work for only a limited period more.
  • You can install libdvdcss2 as a 64-bit .deb package (without installing Medibuntu repositories):
wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.12-0.0medibuntu1_amd64.deb
sudo dpkg -i libdvdcss2_1.2.12-0.0medibuntu1_amd64.deb
or a 32-bit .deb package:
wget -c http://packages.medibuntu.org/pool/free/libd/libdvdcss/libdvdcss2_1.2.12-0.0medibuntu1_i386.deb
sudo dpkg -i libdvdcss2_1.2.12-0.0medibuntu1_i386.deb
  • You can also install 32 bit or 64 bit Windows multimedia codecs (if you haven't already done so using ubuntu-restricted-extras):
sudo apt-get install w32codecs
or
sudo apt-get install w64codecs

libudf

Many newer DVDs use the UDF filesystem. To play them properly, also install libudf:

sudo apt-get install libudf0

Other tools are useful:

sudo apt-get install udftools libudf-dev
Personal tools
Sponsor
     Asus 1015E