Jump to content
xisto Community
abdo1405241556

What Is Linux Introduction to Linux

Recommended Posts

"Linux" generally refers to an open-source Unix-clone operating system based on the Linux kernel, written from scratch originally by Linus Torvalds and other smart people from across the web. Although the linux kernel, which interfaces with a computer's hardware, is the core of the operating system, many other programs are needed to form a complete operating system.
Various commercial and non-commercial groups produce Linux-based operating systems containing the kernel, all necessary programs, and an installer. These different versions of linux are referred to as distributions.

There are hundreds of distributions available, with hundreds of different target applications and philosophies on software. There is also much more information available about getting started with linux/unix than is within the scope of this AV faq. Some excellent places to get started learning about distributions are http://forums.xisto.com/no_longer_exists/ , http://forums.xisto.com/no_longer_exists/ , and http://iso.linuxquestions.org/ .

2. I've heard that linux is a very technical operating system. Will it be too difficult for me?

With many of the modern user-friendly distributions, such as Mandrake or Fedora, a great deal of technical knowledge is not needed to install and use software. Good sites to find general guides and answer your questions:

http://forums.xisto.com/no_longer_exists/ (Great community forums, newbie-friendly)
http://www.tldp.org/ (extremely in-depth HOW-TOs and FAQs)
http://www.linux-tutorial.info/
http://linuxsurvival.com/

Whenever you hit a problem, you should first check any available documentation for the software involved and search the forums here and some of the sites mentioned above. Linux software in general is quite well documented, most programs include manuals or 'man-pages' which can be accessed as follows:
Code:
man commandname
For Example
man mplayer displays the manpage for mplayerAlso take a look in /usr/doc/ for readmes and other included documentation.

Note: Keeping with common bash nomenclature, in all parts of this FAQ, a command preceded by a '$' prompt indicates that the command should be run from a terminal as a user, and a '#' prompt indicating the command should be run as root.

3. Can I keep windows on my computer and still use linux?

Virtually all modern linux distributions are windows-aware and will detect your windows partition and allow you to dual-boot your PC (meaning you will see a menu when you turn on your PC to choose linux or windows). Linux installers will install a 'bootloader' (a pre-OS software that allows you to boot different operating systems) as part of the installation process. You'll need to install windows first and then linux in order to dual-boot since windows' bootloader will overwrite the bootloader that allows you to dual-boot.

4. What about installing software under linux?

Although this FAQ is not meant to be a guide to using linux, much of the questions we discuss will require new software, so we will quickly reference the three major ways of installing software:
Package distribution: Virtually all linux distributions use some soft of package system, such as RPM (Redhat & many others), DEB (Debian), or TGZ (Slackware). A packaging system is meant to be an easy way of installing software, similar to windows installers. A package file consists of the compiled software and files required, and a script to tell the package managing software how and where to install the files. Most distributions have both command-line and GUI interfaces to their packaging system. Check the documentation for your distribution for how to install packaged software. To install from commandline for the most common package formats:
Code:
rpm: # rpm -i packagename.rpm (see 'man rpm' for more help)
DEB (debian): # apt-get install packagename (see 'man apt-get')
Slackware TGZ: # installpkg packagename.tgz (see 'man installpkg', 'man pkgtool')
Gentoo (portage): # emerge packagename (see 'man emerge')Binary archives: Some software is distributed pre-compiled in binary packages, common extensions are .tar.gz or .tar.bz2. To install such software, simply extract the archive:

tar xvjf name.tar.bz2 or
tar xvzf name.tar.gz

and move the contents of the archive to your desired location. If the software is required to be in a specific location, check the documentation for the software.

Source distributions: Much of the software we will be using for AV conversions is distributed in source form, in which you download the source code for a program and compile it yourself. To compile software, you will need to install the development software included with your distribution (such as gcc, g++, make, autoconf, libtool, etc. - different software requires different tools). Then simply untar the source archive in whatever directory you prefer to keep your source code (a common choice is /usr/local/src). Instructions for building the source code are included normally in the root of the archive in the INSTALL file, but the most common method of compiling is a three command method, executed from the root of the source directory:

./configure (checks for the required software and headers)
make (builds and links the software)
make install (copies the compiled software and libraries to the appropriate directory)

If any of the steps failed, check the error message, it will usually tell you what is missing or what went wrong. To perform the final step, you will most likely need to be root (su command).


Do I need to do any extra setup for audio / video output?

Since we already assumed you have an up and running linux installation, you most likely won't have to do any work in this area. Most modern distributions automatically configure X and audio for you, and there is a host of information on the web for configuring X.

As far as audio goes, there are many different audio architectures available. We recommend choosing a distribution that uses ALSA (the advanced linux sound architecture) by default since it is the most powerful sound system and supports the most hardware. If your distribution doesn't include it, check out Q19 of the AC3 FAQ or this gentoo ALSA guide.

2. What is a good audio/video player for linux?

There are many excellent AV players available for linux, the three most popular are mplayer, videolan's VLC, and xine. Binary packages of these players are included in most distributions.

Since mplayer is one of the most versastile players, includes mencoder, one of the best transcoding softwares, and is one of the easiest players to build from source, we'll mention how to install mplayer here:

1.) Install any applicable libraries/codecs you want to use with mplayer first. For basic operation you'll probably want libavcodec, xvid, and some win32 binary codecs (for formats without open source libraries). Download one of the binary codec packs from the mplayer homepage (for example extralite.tar.gz) and extract it to /usr/local/lib/codecs/. If you're compiling from CVS (recommended) make sure to check out the libavcodec source for copying into the mplayer source directory:
Code:
$ cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg/libavcodecFor more information on the involved software see http://mplayerhq.hu/DOCS/HTML/en/install.html and http://forums.xisto.com/no_longer_exists/ .

2.) Download mplayer source code from http://www.mplayerhq.hu/homepage/design7/dload.html . The recommended version is always the latest CVS (mplayer-current.tar.bz2) Although binary packages from mplayer are available for many systems, it is usually better to compile from source since mplayer will be optimized for your processor, and the installation will detect what codec and AV output libraries are present on your system. Unpack the tarball in your directory of choice:
Code:
$ tar xvjf mplayer-current.tar.bz2Or if you want to use CVS for quicker future updates:
Code:
$ cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer co mainDon't forget to copy the libavcodec directory we checked out earlier into the 'main' directory.

3.) Configure mplayer by running ./configure from the root of the mplayer directory. './configure --help' will show you some configuration options, and you may want to add support for the GUI and for large files:
Code:
$ ./configure --enable-gui --enable-largefilesAfter running this script will tell you which codecs and output libraries have been detected, check through the list to make sure everything you need has been detected. You can then build and install mplayer and mencoder:
Code:
$ make
# make install4.) Be sure to read over the mplayer manpage ( I know it's enormous) to become familiar with its control. You can add options to the mplayer config file (default /usr/local/etc/mplayer/mplayer.conf) rather than specifying them on the commandline. My mplayer.conf looks like this: (specify dvd drive location, alsa audio driver, and try S/PDIF output before others)
Code:
ao=alsa
dvd-device=/dev/hdc
ac=hwac3,In order to run the GUI you'll need to put a skin in '/usr/local/share/mplayer/Skin/default' (download & install a skin from the homepage, unpack, and rename the folder to 'default') and a default sub font in '~/.mplayer/subfont.ttf'.

Now you should be set to play with mplayer and encode with mencoder. You can find lots more information on all these topics in the mplayer documentation ( http://mplayerhq.hu/DOCS/HTML/en/ ) and the mplayer manpage ('man mplayer').

3. What about a good audio player for linux?

Two good winamp-like players for linux are XMMS and beep-media-player (a fork of XMMS with an updated interface). One or both of these is included with many distributions.

Like winamp there are a host of input and output plugins available for XMMS. You can get the source for these at the xmms homepage or from your distribution's repositories (in the case of gentoo, debian, or other distros with vast repositories).

A newer audio player that is gaining much popularity is amaroK. amaroK features a gstreamer interface, an advanced media library, highly configurable interface, cover art downloading plugin, and much more.

Please note that some distros such as Redhat/Fedora do not include an mp3 decoder with XMMS due to legal reasons. In this case you need to install an mp3 plugin, check out rpm.livna.org for RPMs of this and other packages omitted from the Fedora/Red Hat distribution.

4. What options do I have for playing DVDs under linux?

Many distributions include some sort of DVD capable player in their main repository. Please note that as with MP3, some distributions do not include CSS-decrypting capable players due to legal reasons. As above rpms can be found at rpm.livna.org, or you can install your own player.

A full mplayer install as noted above will be dvd-capable (although mplayer does not support menues at this time) and you can play dvds through the GUI or by the command
Code:
mplayer dvd://1 -dvd-device /dev/hdcIn this example the dvd device is /dev/hdc, you'll need to specify the device via CLI or config file unless the device is the mplayer default /dev/dvd.

Videolan's VLC is another good choice for dvd playback, you can find binaries on their homepage or source install instructions here.

Two other common DVD players are xine and ogle.

4B. How can I playback an ISO image of a DVD on my hard drive?

You can easily mount the iso and then play it back as if it is a mounted DVD disc, for example:
Code:
# mkdir /mnt/dvd_image
creates the mountpoint directory

# mount -o loop -t udf /path/to/image.iso /mnt/dvd_image
mounts the ISO image /path/to/image.iso on the /mnt/dvd_image directory

$ mplayer dvd://1 -dvd-device /mnt/dvd_image
Plays the mounted image with mplayer

$ vlc --dvd /mnt/dvd_image
Plays the mounted image with VLC5. How can I playback audio in multichannel or over S/PDIF?

For S/PDIF, you'll first need to set up the appropriate ALSA settings by running alsamixer (assuming your distro uses ALSA, see Q1 above) and unmuting the S/PDIF output. PCM audio will automatically be played over s/pdif, to play passthrough DTS or AC3 you'll need to specify this setting in the player. In mplayer this is done with the '-ac hwac3' or '-ac hwdts' switches, in VLC the settings can be found in the audio section of the preferences.

For analog multichannel you'll again need to set up the appropriate outputs in alsamixer and you can then specify '-channels 6' in mplayer.

6. How can I play video content over my tv-out in linux?

You'll first want to configure X to run your Tv-out as a second xineramascreen (dual head configuration). There are many guides on the internet for this configuration based on different video card manufacturers, see this LQ wiki page for some starter information. After this is set up you can specify the xineramascreen for playback in mplayer via the '-xineramascreen #' switch or in vlc by the '--x11-xineramascreen #' switch.


Virtualdub and VFW codecs for windows are great. Is there anything like this for linux?

avidemux2 is an advanced native linux video editing and encoding tool with a GUI interface very similar to virtualdub's. It supports many video codecs and output formats. Unlike virtualdub for windows it is more difficult for codecs to be supported in avidemux, however since it is not VFW based it is free to be much more versatile as far as output formats and advanced video codecs. avidemux supports more codecs and formats with every release and is a great application to get started with encoding video under linux.

Some people have successfully gotten virtualdub working under wine; however, keep in mind that virtually all of virtualdub's tools (aside from proprietary codecs) can be used in native linux apps.

2. What native tools are available for general purpose encoding?

GUI (graphical interface) Tools
avidemux2: easy virtualdub-like interface, many filters, codecs, and formats are supported.
dvd::rip: A GUI frontend to transcode, built-in DVD ripper, supports many different codecs and output formats.
acidrip: a DVD encodeing frontend based on mplayer/mencoder.
drip: A DVD to DIVX conversion application, supports MSMPEG4, OpenDivx, XviD for video, MP3 audio, has problems with some NTSC DVDs.
CLI (command-line interface) Tools
mencoder: The encoding application paired with mplayer, supports a vast amount of input formats, processing filters, and output codecs, although output container formats are currently limited to AVI and MPEG output format. See here for a tutorial on the command line interface.
transcode: a suite of CLI utilities for transcoding video and audio based on a modular structure. Supports many codecs and containers. See the wiki for command line help.
ffmpeg: a complete recording, converting and streaming solution, based on libavcodec/libavformat. Supports most of the codecs supported by mplayer as well as a few more container options


Share this post


Link to post
Share on other sites

How can I rip a DVD to my hard drive under linux?

 

There are several simple dvd-ripping tools available. vobcopy can be used. First you'll want to mount your dvd (assuming the mount point is /mnt/dvd and is set up in your /etc/fstab):

Code:

$ mount /mnt/dvdThen you can rip the main title using vobcopy:

Code:

vobcopy -i /mnt/dvdThis will rip the main title only, similar to IFO-mode in DVD Decrypter. if you want to rip the entire disc preserving structure, use

Code:

vobcopy -i /mnt/dvd -m.You can also use dvdbackup from the dvd-create project to rip dvds in a similar fashion.

 

2. How can I backup a DVD using fast (compressed-domain) transcoding, like DVDShrink?

 

StreamDVD is a native linux application for transcoding DVDs on the fly. Its advantages are that it does not require the dvd to be ripped, demultiplexed, transcoded, and remultiplexed, rather it reads directly from the DVD and writes a valid DVD vob to standard out that can be piped to dvdauthor. It also has a good quality accurate transcoding engine. Its disadvantages are that it does not handle full discs or menus, but does single titles only. StreamDVD's usage is quite easy (as quoted from the documentation):

 

When using dvdauthor to build the dvd structure, you can generate a new dvd with only one step. You can pass the complete streamdvd commandline (followed by a '|') to the -f switch in dvdauthor.

i.e.: lets say your dvd drive is accessable at /dev/dvd, the saving directory is /movies/movie1 and you want to backup title 1, all chapters with 1st video and 1st audio track:

 

Code:

dvdauthor -t -o /movies/movie1 -f 'streamdvd -i /dev/dvd -t 1 -s 0xe0,0x80 |'After that, build the missing ifo files with:

 

Code:

dvdauthor -T -o /movies/movie1Note that this also requires dvdauthor to be installed, available in many distributions.

 

At this time streamDVD does not internally support chapters or subtitles. However you can use spumux from the dvdauthor project to mux subtitles, but this will require a full copy of the DVD to your hard drive and more time. As far as chapters go if you extract the chapter points they can be specified in the dvdauthor step, but must be determined beforehand.

 

You can also encode with streamdvd via the lxdvdrip script.

 

Additionally, DVDShrink works fairly well under wine, see the section on wine and windows programs emulation for more information.

 

3. How can I fully reencode a DVD, like DVD-RB under windows?

 

Unfortunately there is currently no full-disc DVD reencoder comparible to DVD-RB under linux. As far as main movie only reencoding, there are two major mpeg2 encoding libraries (libavcodec and mpeg2enc from the mjpegtools) and many frontends for encoding with both (mencoder, transcode, lxdvdrip, avidemux2, dvd::rip).

 

4. How can I manually reencode a DVD to DVD-5 or SVCD?

 

If you're looking for a GUI application, dvd::rip is a great graphical frontend. It can perform the full encoding process for you and even burn SVCDs directly. It's also a good starting point if you want to encode via CLI to get an idea of the steps involved.

 

For CLI reencoding, there are several steps, and a full guide is outside the scope of this FAQ. But here's a primer on the basic steps: first, rip the DVD to your hard drive as described in question 1 of this section. You can then use mencoder to reencode the video and audio simultaneously, using the -of mpeg switch to output to the MPEG container format. If you're encoding to SVCD remember to reencode the audio to MP2. If you're converting to DVD and want subtitles, demux them from the DVD by using spuunmux from the dvdauthor project, which can then be muxed with your MPG using spumux. Finally create your image file by using vcdimager for (S)VCD's or dvdauthor for DVDs.

 

5. What options are there for authoring a DVD under linux?

 

dvdauthor is a full featured dvd authoring toolkit supporting many different DVD options. The command line interface is fairly easy to use for simple authoring tasks and dvdauthor also supports XML configurations for advanced projects. There are also GUI frontends available, check out dvdstyler and qdvdauthor.

 

6. Are there any advanced DVD/IFO editors available?

 

PGCEdit by r0lZ is a Tcl/Tk IFO editor that runs natively under linux. The (very simple) installation instructions are available on r0lZ's homepage, and in recent versions the preview will be enabled if you have wine installed (make sure Preview > Use Preview is enabled).

 

VobBlanker by jsoto, although a native windows program, emulates very well under wine. In recent versions, the preview will work correctly if the overlay is disabled (Settings > More Settings > Check "Do Not Use Overlay").

 

 

What programs to I need to setup to rip and encode video from my camcorder?

 

The basic libraries you'll want are libdv (DV-format decoding library), libraw1394(IEEE-1394/firewire hardware access library), and libavc1394 (AVC control library, so you can play and pause your camera via computer control).

 

Please note that many broken libraw1394 packages do not properly setup the /dev/raw1394 device. If you encounter problems when running dvgrab, kino, or other DV capturing programs regarding the raw1394 interface, try the following commands to create the /dev/raw1394 device:

Code:

# /bin/mknod -m 600 /dev/raw1394 c 171 0

# /bin/chown root:root /dev/raw1394You can also create this device by running 'make dev' from the libraw1394 source tree.

 

2. What programs can I use to capture/edit DV video?

 

After the above mentioned libraries are installed, you can use dvgrab to capture DV video via commandline or kino for a graphical interface (kino is a nice video editor as well).

 

Using dvgrab from commandline is fairly easy and intuitive. A good way to start is to connect your camera to your IEEE1394 port and start by running

Code:

dvgrab -i --format dv2 output.aviThis will start dvgrab in interactive mode (type ? to see camera controls) using type-2 AVI as output. See 'man dvgrab' for more information.

 

Kino is also a great choice for a graphical capturer/editor - its interface is rather intuitive and easy to use.

 

3. What programs can I use to further process / encode my DV video?

 

The mjpegtools provide a set of useful command line apps for processing DV (and other) video. The tools are set up so that they can be used in a pipe sequence for video processing. For example you can use lav2yuv to decode DV video to YUV, yuvscaler to resize the video, and mpeg2enc to encode to mpeg-2 video (all these apps are part of the mjpeg suite). 'man mjpegtools' will give you a good tutorial for using the different utilities. mjpegtools also includes the lav2mpeg bash script utility to automate the encoding steps for you for different targets (vcd,svcd,mpeg1/2). Note that you'll need to make sure your version of mjpegtools is compiled with DV video support (using libdv) in order to encode DV. If you're compiling from source, you can add the '--with-dv' option to mjpegtools' configure script. See 'man mjpegtools' and http://mjpeg.sourceforge.net/ for more help.

 

Additionally, when configured with libdv support, mplayer/mencoder can be used to play, filter, and transcode DV video to any of mplayer's supported codecs.

 

What programs to I need to setup to rip and encode video from my camcorder?

 

The basic libraries you'll want are libdv (DV-format decoding library), libraw1394(IEEE-1394/firewire hardware access library), and libavc1394 (AVC control library, so you can play and pause your camera via computer control).

 

Please note that many broken libraw1394 packages do not properly setup the /dev/raw1394 device. If you encounter problems when running dvgrab, kino, or other DV capturing programs regarding the raw1394 interface, try the following commands to create the /dev/raw1394 device:

Code:

# /bin/mknod -m 600 /dev/raw1394 c 171 0

# /bin/chown root:root /dev/raw1394You can also create this device by running 'make dev' from the libraw1394 source tree.

 

2. What programs can I use to capture/edit DV video?

 

After the above mentioned libraries are installed, you can use dvgrab to capture DV video via commandline or kino for a graphical interface (kino is a nice video editor as well).

 

Using dvgrab from commandline is fairly easy and intuitive. A good way to start is to connect your camera to your IEEE1394 port and start by running

Code:

dvgrab -i --format dv2 output.aviThis will start dvgrab in interactive mode (type ? to see camera controls) using type-2 AVI as output. See 'man dvgrab' for more information.

 

Kino is also a great choice for a graphical capturer/editor - its interface is rather intuitive and easy to use.

 

3. What programs can I use to further process / encode my DV video?

 

The mjpegtools provide a set of useful command line apps for processing DV (and other) video. The tools are set up so that they can be used in a pipe sequence for video processing. For example you can use lav2yuv to decode DV video to YUV, yuvscaler to resize the video, and mpeg2enc to encode to mpeg-2 video (all these apps are part of the mjpeg suite). 'man mjpegtools' will give you a good tutorial for using the different utilities. mjpegtools also includes the lav2mpeg bash script utility to automate the encoding steps for you for different targets (vcd,svcd,mpeg1/2). Note that you'll need to make sure your version of mjpegtools is compiled with DV video support (using libdv) in order to encode DV. If you're compiling from source, you can add the '--with-dv' option to mjpegtools' configure script. See 'man mjpegtools' and http://mjpeg.sourceforge.net/ for more help.

 

Additionally, when configured with libdv support, mplayer/mencoder can be used to play, filter, and transcode DV video to any of mplayer's supported codecs

 

What MPEG-4 codecs are available for encoding under linux?

 

MPEG-4 ASP / MPEG-4 Part 2 codecs

XviD - High-quality advanced GPL MPEG-4 ASP codec, included in many distributions, fast and excellent quality. Supported in mplayer, ffmpeg, transcode, dvd::rip, and many other applications

libavcodec - MPEG-4 ASP is one of the codecs supported by the libavcodec library, very fast and highly configurable, good quality, the range of options can be a bit intimidating to linux newbies at first. Supported in mplayer, ffmpeg, transcode, and many other applications

OpenDivx / ProjectMayo / divx4linux - various Early DivX codec implementations for linux, not nearly as good as xvid or libavcodec, supported in mplayer and others

MPEG-4 AVC / H.264 / MPEG-4 Part 10 codecs

x264 - GPL H.264 / AVC codec, probably the best open-source H.264 encoder, fast, early in development but becoming more advanced very quickly, available in mencoder, VLC, or its native commandline interface.

2. What's the easiest way to backup a DVD to mpeg-4?

 

dvd::rip is a full featured GUI for DVD ripping and supports many different codecs and audio formats. Also see the 'General Encoding' section above for more GUI links.

 

If you want to go through the process yourself, check out Mosu's DVD transcoding guide for a great walk through of all the steps involved. A quicker overview by Nico is available here.

 

How can I mux and playback matroska (MKV, MKA) files?

 

mkvtoolnix, the matroska toolkit builds natively under linux (both GUI and CLI interfaces), providing an easy way to create matroska files from many different codecs. See the mkvtoolnix homepage above for links to binaries and sources.

 

Playback of matroska files is supported in mplayer, VLC, and other players.

 

See the matroska FAQ for general matroska information.

 

2. How can I mux and playback MP4 container format files?

 

gpac provides an advanced MPEG-4 toolkit, including the MP4Box information and muxing tool and the Osmo4 MP4 player. ASP, AAC, and MP3 can be muxed using MP4Box. Note that MP4Box also removes packed bitstream and other AVI hacks from MPEG-4 in AVI.

 

mpeg4ip provides open source encoding, muxing, playback, and streaming tools for MP4. AVC, HE-AAC, LC-AAC, ASP and other formats can be muxed using mp4creator included with mpeg4ip.

 

MP4 playback is also supported in mplayer and VLC.

 

See the MP4 FAQ for more information on the MP4 container format.

 

3. How can I mux and playback OGM container format files?

 

OGMTools is a native linux tool supporting creation of, extraction from, and information about OGM files.

 

OGM is supported for playback in mplayer, VLC, and others.

 

See the OGM FAQ for more information on the OGM container format.

 

 

KpeX

View Public Profile

Visit KpeX's homepage!

Find More Posts by KpeX

 

23rd March 2005, 03:45 #9 | Link

KpeX

Moderator

 

 

 

 

 

Join Date: Jun 2003

Location: Great Lakes, USA

Posts: 1,433 Part 8 - Audio Encoding

 

--------------------------------------------------------------------------------

 

See the Audio FAQ for general audio information.

 

1. What applications can I use for CD-Audio ripping (digital extraction) and encoding?

 

cdparanoia is currently the most accurate native linux ripping tool available. Its commandline interface is fairly easy to use, but it is also available in several GUIs.

 

grip is a fully featured graphical CD-ripper that has built-in cdparanoia support, ID3 tag support, and can be configured to encode virtually any format you want.

 

2. Is there a good audio editor available?

 

audacity is an open source audio editor that supports recording, conversion, and editing of ogg vorbis, MP3, and WAV audio, and supports a vast array of audio filters and plugins. Source and binary packages are available on their homepage.

 

3. What tools can I use to extract an audio track from AVI/MKV/MP4?

 

AVI:

AVIdemux2: Graphical interface

avi2raw: A tool included with the mpeg4ip package, use with the --audio switch

mplayer: can be used for AVI and other formats with the -dumpstream option

MKV:

mkvextract: included with the mkvtoolnix package, can demux almost any matroska stream

MP4:

mp4creator: part of the mpeg4ip package, use with the -extract=trackid option

MP4Box: included with the GPAC project, see 'MP4Box -h extract' for information

4. What encoders are available for various audio formats?

 

Lossy Formats

MP2:

toolame

MP3:

lame: highest quality MP3 encoder

Ogg Vorbis:

vorbis-tools: available under most distributions

AAC:

FAAC: Freeware Advanced Audio Coder

MPC:

musepack-tools: the official MPC encoder

AC3:

libavcodec includes an AC3 encoder, available in ffmpeg and others

Lossless formats

Wavpack: Advanced lossless encoder featuring a unique hybrid mode. CLI encoder is available under *nix.

FLAC: Free Lossless Audio Codec, one of the best and most supported lossy formats. CLI encoder builds under *nix, plugins available for xmms, amarok, and more.

 

5. How can I play AC3/DTS over S/PDIF (digital) output?

 

All the popular players for linux (xine, mplayer, vlc) include AC3 decoding support 'out of the box'. For s/pdif output, your player will need must also be ALSA (advanced linux sound architecture) compatible. Steps to using alsa are as follows:

 

1. Make sure your sound card is supported by checking alsa-project.org.

 

2. Make sure your kernel has alsa support compiled in. ALSA is the default sound architecture in the 2.6.x kernels, and many 2.4 kernels shipping with distributions are compiled with alsa built-in.

 

3. Install software & set up your soundcard: make sure you have the alsa-driver, alsa-lib and alsa-utils installed (may be called something else in different distributions) and run alsaconf. You will be prompted to select your soundcard. If you have no error messages, then run alsasmixer to set your default levels. Make sure to activate the S/PDIF output if you wish to use it. On my card, this is referred to as "IEC958 output".

 

4. Install a player with alsa support. The simplest way to see if mplayer has alsa support is to type 'mplayer -ao help' and see if alsa is one of the choices. If your mplayer does not contain alsa support, simply build mplayer from source, and if you have alsa-lib (+ alsa-lib-devel on some platforms) mplayer will detect and compile in alsa audio out support. Then add a '-ao alsa' to your playback command or your mplayer.conf file, and the alsa output will be used. To playback AC3 over spdif, you'll also need to add a '-ac=hwac3' switch to your commandline. Alternatively you can add 'ac=hwac3,' to your mplayer.conf file (note the comma after hwac3), which will cause mplayer to try ac3 pass through first on any file and then other codecs.

 

http://www.linuxdvb.tv/documentation/ac3sound.html

http://forums.xisto.com/no_longer_exists/

http://liba52.sourceforge.net/

 

6. How can I losslessly raise the volume of my MP3/OGG/WAV audio?

 

MP3: MP3Gain supports analysis and lossless gain of MP3 files

Ogg Vorbis: vorbisgain calculates a replaygain value and stores it in the header of OGG files

WAV: normalize can be used to normalize WAV audio

7. How can I split my MP3/OGG/WAV audio?

 

Try mp3splt for MP3 or OGG audio or wavsplit for WAV audio.

 

Do I need to set up any special kernel options to enable CD/DVD burning?

 

If you're running a fairly recent kernel, probably not. Older kernel versions required scsi-emulation to be set up for the drives, but recent versions support direct ATAPI/IDE access. If you're using a 2.6.x version kernel, you almost certainly are ready to go. An easy way to test if direct ATAPI access is available is to install cdrecord (mentioned below) and issue the command

Code:

$ cdrecord -dev=ATAPI -scanbusIf your drives are mentioned in the scan output, you're ready to go.

 

2. How can I burn CDs/DVDs under linux?

 

Burning Software:

GUI:

xcdroast: an easy to use graphical front end for the cdrtools and cdrecord-prodvd. Originally based on the SCSI emulation interface to IDE, so it can be a quite unresponsive interface at times.

k3b: A KDE-based burning frontend, similar interface to Nero. Slightly more user friendly than xcdroast but has fewer options. However, in most cases it is much faster and more useful (uses dvd+rw-tools for dvd burning and ide-cd access).

CLI:

cdrtools: A helpful cd burning toolkit, includes mkisofs for creating images. Example commandlines:

Code:

# mkisofs -dvd-video -V MY_VOLNAME -o dvdvideo.iso /path/to/video/

Creates a DVD-Video image called dvdvideo.iso with

volume name MY_VOLNAME from the /path/to/video/ folder

# cdrecord -dev=/dev/hdd -dao image.iso

burns the imagefile image.iso in Disk-At-Once mode to the /dev/hdd drivecdrecord-proDVD: The DVD-enabled version of cdrtools, requires a (freely available) key for images over 1 gig. Syntax is similar to cdrtools.

dvd+rw-tools: A DVD burning kit that includes support for both DVD+R and DVD-R and changing the booktype of DVD+ media. Example commandline:

Code:

# growisofs -Z /dev/hdd=image.iso

burns the imagefile image.iso to the drive /dev/hdd2B. How can I get the media code (disc identifier) of a blank DVD+/-R?

 

Once again the dvd+rw-tools are helpful in this regard - the command

Code:

$ dvd+rw-mediainfo /dev/dvdwhere /dev/dvd is your DVD drive containing the media in question will spit out among many other pieces of information the media identifier code of the DVD blank.

 

3. What linux applications support dual layer DVD discs?

 

Although I haven't personally tested it, the dvd+rw-tools mentioned above support dual layer discs (as well as k3b, which is a frontend for the dvd+rw-tools).

 

4. What linux applications support booktype / bitsetting?

 

Recent version of the dvd+rw-tools (mentioned above) support dvd-rom booktype modification for both DVD+R and DVD+RW media. Bitsetting command line examples:

Code:

# dvd+rw-booktype -dvd-rom -media /dev/hdd

Set the booktype of a DVD+RW disc to dvd-rom

 

# dvd+rw-booktype -dvd-rom -unit+r /dev/hdd

if issued before burning, this command instructs

the drive at /dev/hdd to set the booktype to dvd-rom

(blank media must be in drive)5. How can I create / play XCDs?

 

mode2cdmaker can be used to create 800MB xcd images from any media content. Make sure not to use the -s switch when creating XCD images (the default under some windows GUIs) because using only one track will render the XCD unreadable under current linux drivers. An example commandline is:

Code:

$ mode2cdmaker -m moviefile.mkv -v MY_TITLE -e DAT -o myimage

Creates an imagefile with basename myimage and volume ID

MY_TITLE adding moviefile.mkv as a form-2 file with an

extension of .DAT for mode 2 files.To playback an XCD, simply issue the mplayer command:

Code:

$ mplayer vcd://2 -cdrom-device /dev/hdcwhere /dev/hdc is the device file of the CD-ROM drive that contains the XCD. Mplayer should auto detect the file format.

 

Despite all these great native linux applications, there's still some windows app I want to use. What can I do?

 

wine is an open source implementation of the Windows API on top of linux and X. The developers would prefer you think of it not as an emulator but as a compatibility layer for running windows programs. Wine is still in heavy development and considered pre alpha software, keep that in mind when problems occur.

 

Installing Wine

 

Many distributions now include binary wine packages; however, I strongly recommend compiling it from source; on every box I've installed it on a source installation works better. Make sure the development packages from your distribution have been installed, and then you can either download the latest wine snapshot from here and untar it:

Code:

$ tar xvzf wine-20xxxxxx.tar.gz

$ mv wine-20xxxxxx wineor check out the latest CVS of wine:

Code:

$ export CVSROOT=:pserver:cvs@cvs.winehq.org:/home/wine

$ cvs login

$ cvs checkout wineThe password is 'cvs' (no quotes). Later when you want to update your source, you can just enter the command:

Code:

$ cvs update -PAdfrom the wine source directory.

 

You'll now have a wine/ directory (either from tarball or CVS) containing the wine source code. Wine is always in heavy development and is still considered alpha software, keep that in mind.

 

Now, from the wine directory, run

Code:

$ ./tools/wineinstallThis will first configure wine and then ask you if you want to build wine, su root, and install wine. Enter 'yes' and then sit back and wait while wine compiles. After it's finished wine will ask you for your root password, enter it and wine will be installed.

 

Wine will then ask if you want to create a ~/.wine/config file; say yes. The wine installer will then search for an existing 'real' windows installation on your hard drive, and ask if you want to use it for the wine install. Saying 'yes' to this option usually causes lots of problems, it's usually much stabler and safer to say 'no' and wine will create a clean install. Wine will then ask you where you want to put your 'fake' C:\ drive, you can stick with the default ~/.wine/drive_c.

 

Now your wine install should be complete. You can test it by running the wine-built in 'notepad' command. If a window that looks something like windows notepad.exe pops up, you're in good shape.

 

Configuring Wine

 

Now before we install any programs, we'll need to modify our config file and set up our wine virtual devices. Open up the ~/.wine/config file we created earlier, and scroll down to the '[Version]' section. The emulated Windows version that works best depends onthe application used. nt40 works well for many dvd-based apps. If you change this line make sure you uncomment it (remove the semicolon at the start). The start of your version section might then look something like this:

Code:

[Version]

; Windows version to imitate

"Windows" = "nt40"This is the only change I normally make in my config. If you read through the rest of the file the rest of the options are fairly self explanatory. Save and close the file.

 

We'll now need to set up wine to recognize our hardware. Change to the ~/.wine/dosdevices/ directory:

Code:

$ cd ~/.wine/dosdevices/Virtual wine drives in this section are set up with symbolic links. To set up a drive linking to a directory, use a symbolic link like a: If the directory is the mount point for a device, link to the mount point with b: and the device file with b:: For example, to set up a virtual drive at c: pointing to a folder /path/to/folder on your hard drive, execute the command

Code:

$ ln -s /path/to/folder c:To set up a virtual drive at d: pointing to a drive /dev/hdc mounted on /mnt/cdrom, execute the commands

Code:

$ ln -s /mnt/cdrom d:

$ ln -s /dev/hdc d::Set up links in this fashion for all drives you want to access for wine. My dosdevices directory looks like this:

Code:

$ ls -l ~/.wine/dosdevices/

a: -> /mnt/floppy/

a:: -> /dev/fd0

c: -> ../drive_c/

d: -> /d

g: -> /mnt/dvd

g:: -> /dev/hdc

h: -> /mnt/dvdrw

h:: -> /dev/hdd

z: -> /You can test if these drives have been set up properly by running notepad again and checking if you can read files in the various drives. Now we should be all set to install programs.

 

2. What applications work well under wine?

 

This is not a black and white question, it depends on your config, your kernel, your wine version, and possibly other factors. The best place to start when you encounter problems with a specific app is to start researching. Some good places to research wine problems:

A better wine vintage

Wine installation & using DVD Shrink / DVD Decrypter

What programs work for you in wine?

wine application database

google

Share this post


Link to post
Share on other sites

Thanks, abdo.
Very interesting topic.
Do not forget to mention your sources. Some of us are not familiar with doom9, so you should mention that your topic comes from :
http://forum.doom9.org/showthread.php?s=&threadid=91894
You are welcome commenting and copying informations coming from elsewhere, Internet is the world of free knowledge for everyone.
Simply, do not forget to put between quotes the texts coming from somewhere else, and to mention where it comes from.
For instance, say the following :
As Yordan proudly mentionned several times in this forum,

please be polite toward other forummers, especially towards the authors of some info you mention.

Today I inserted the quotes for you, next time do not forget to do it by yourself.Else, the admins here will think that you are trying to cheat with the forum credits system, and this makes them mad. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.