Showing posts with label Unix Linux Multimedia. Show all posts
Showing posts with label Unix Linux Multimedia. Show all posts

January 12, 2007

Playing mp3 files on a Linux system

Due to patent issues, many of the Linux distributions does not support mp3 files out of the box.
This is old news, but if you want to support for playing mp3 files, you can simply download xmms-mp3 for the xmms player, or use the excellent mplayer (movie player) from http://www3.mplayerhq.hu. The mplayer is movie player but it can use several kinds of codecs, and is usable from the command line for playing mp3 fles etc.

Make sure you download the Windows Codec Binaries and add them to your /usr/lib/codecs or what ever directory that fits your Linux system. You will need to be root user if you choose the /usr directory.

mp3 support to xmms for Fedora or Red Hat.
# yum install xmms-mp3

Command line syntax for playing mp3 files with xmms or mplayer

$ xmms file.mp3
$ mplayer file.mp3


November 21, 2006

Burning CDs in Linux Unix

Some very basic cd burning commands. Non GUI, just command line.

cdrecord - record audio or data Compact Disks or Digital Versatile Disks from a master

Let's say you have a folder with files you want to backup by burning them to a CD or DVD.
First out would be to make an iso file of the files in the folder.
Example:

$ mkisofs -r -o filename.iso folder_to_make_iso_of
(filename.iso is the iso file you will burn in the next step)
Output, something similar to this

$ mkisofs -r -o wpa.iso wpa
INFO: UTF-8 character encoding detected by locale settings.
Assuming UTF-8 encoded filenames on source filesystem,
use -input-charset to override.
Using WPA_S000.TGZ;1 for /wpa_supplicant-0.4.9.tar.gz (wpa_supplicant-0.3.11.tar.gz)
Using DRIVE000.C;1 for wpa/wpa_supplicant-0.4.9/driver_bsd.c (driver_broadcom.c)
Using DRIVE001.C;1 for wpa/wpa_supplicant-0.4.9/driver_ndis.c (driver_ndis_.c)
Using DRIVE002.C;1 for wpa/wpa_supplicant-0.4.9/driver_ndis_.c (driver_ndiswrapper.c)
Using L2_PA000.C;1 for wpa/wpa_supplicant-0.4.9/l2_packet_freebsd.c (l2_packet_pcap.c)
Using WPA_S000.H;1 for wpa/wpa_supplicant-0.4.9/wpa_supplicant_i.h (wpa_supplicant.h)
Using DRIVE003.C;1 for wpa/wpa_supplicant-0.4.9/driver_wext.c (driver_wired.c)
Using L2_PA001.C;1 for wpa/wpa_supplicant-0.4.9/l2_packet_pcap.c (l2_packet_linux.c)
Using WPA_S000.SGM;1 for wpa/wpa_supplicant-0.4.9/doc/docbook/wpa_supplicant.conf.sgml (wpa_supplicant.sgml)
Total translation table size: 0
Total rockridge attributes bytes: 17015
Total directory bytes: 30720
Path table size(bytes): 104
Max brk space used 21000
1702 extents written (3 MB)



$ su - (switch to user root)
# cdrecord filename.iso
Example:

# cdrecord wpa.iso
cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
cdrecord: Continuing in 5 seconds...
Cdrecord-Clone 2.01.01a03-dvd (i686-pc-linux-gnu) Copyright (C) 1995-2005 Jörg Schilling
NOTE: This version contains the OSS DVD extensions for cdrtools and thus may
have bugs related to DVD issues that are not present in the original
cdrtools. Please send bug reports or support requests to
http://bugzilla.redhat.com/bugzilla The original cdrtools author should
not be bothered with problems in this version.
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - Red Hat-scsi-linux-sg.c-1.85-RH '@(#)scsi-linux-sg.c 1.85 05/05/16 Copyright 1997 J. Schilling').
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'SONY '
Identifikation : 'DVD+-RW DW-Q58A '
Revision : 'UDS1'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Speed set to 1764 KB/s
Starting to write CD/DVD at speed 10.0 in real TAO mode for single session.
Last chance to quit, starting real write 4 seconds.

trackno=0
Track 01: Total bytes read/written: 3485696/3485696 (1702 sectors).


That's it!

For troubleshooting, try the --scanbus option and specify the device if you have more than one on your scsibus.

# cdrecord --scanbus (the --scanbus option, scsibus, target, lun)

Cdrecord has many options. See manpage.
$ man cdrecord

If you need to make your iso file bootable, look at the manual for mkisofs. (Several options)
$ man mkisofs
(This should not be needed if you have downloaded a live cd or a Unix Linux distribution. You should only need to burn the iso file, as is.)

August 18, 2006

Top notch movie players for Linux, MPlayer

There is of course a hole bunch of movie player for Linux/Unix/Windows/Mac OS, but the one I would like to mention in particular, is MPlayer. The latest released version of Mplayer 1.0pre8 has been released since june, and can be downloaded from Mplayers website.

Mplayer supports some many different codecs today, that you should be able to play any file that contains audio or video streams. Play avi, mpg, ogg, mp3 files, wmv .. ... ... Great codecs for divx, xvid, DVD's, VCD etc.

  • OSS (Open Sound System) - factory standard under UNIX
  • SDL (Simple Directmedia Layer) - wrapper library with support for various systems
  • ALSA (Advanced Linux Sound Architecture) 0.5/0.9/1.0 for Linux
  • SUN audio driver for BSD and Solaris8/9 users
  • SGI audio for IRIX
  • Mac OS X audio
  • Windows audio
  • NAS (Network Audio System)
  • ESD (ESound Daemon)
  • ARTS (KDE Sound System)
  • JACK (Jack Audio Connection Kit)
Installation is really simple. There are prebuilt rpm files of MPlayer for Red Hat and Fedora on the Mplayer site. Otherwise, just download the source and compile the source from scratch.

First out is to download all the different codecs. You can find the codecs at MPlayer site.
You will need to copy all codec files to /usr/local/lib/codecs

After that, you are ready to install Mplayer.

$ bunzip MPlayer-1.0pre8.tar.bz2
$ tar -xvf MPlayer-1.0pre8.tar
$ cd MPlayer-1.0pre8
$ ./configure (with your options)
$ make
$ sudo make install (if you like to copy all the compiled binaries out of the source directory )

To start MPlayer from the command line, simply

$ mplayer -vo X11 spiderman.avi -fs -zoom
(fs = full screen )

Check out the creators website for details and to download MPlayer today.

http://www.mplayerhq.hu/design7/news.html