RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Burn your music files from any format to audio CD using command line

Do you need a GUI to be able to create and burn your favorite music tracks on a standard audio CD which then can be used by any CD player? The answer is no ! GUI is for losers ! Right? :-) Let's see how hard it is to burn an audio CD with a cdrecord linux command. What is needed:

  • CD burner - audio files in mp3, ogg, acc or wav format
  • cdrecord
  • ffmpeg
  • normalize-audio

Install all prerequisites:

# apt-get install cdrecord ffmpeg normalize-audio libavcodec52

In our scenario we have a selection of MP3 and OGG files from different albums stored in a single directory called burn:

ls ~/burn/
03.Come As You Are.mp3  
07 - Crystal Mountain.mp3 
09-We Who Are Not as Others.mp3
Lemuria_-_05_-_Lemuria.ogg

Since all files are taken from a different locations / albums the chance that they all have a different volume settings is very high. To make them volume uniform we use a normalize-audio command. Normalize normally works only on wav files so first we need to convert all files to wav.

NOTE: if names of your files contain a space use this command to replace space with _:

$ for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done

Convert all files to wav format:

$ for i in $( ls ); do ffmpeg -i $i $i.wav; done

The following step can be omitted but it is recommend to normalize-audio all files to equalize sound volumes:

NOTE:use normalize-mp3 ornormalize-ogg to normalize non-wav audio files

$ normalize-audio -m *.wav

OUTPUT:

Computing levels...
 Lemuria_-_05_-_Le 100% done, ETA 00:00:00 (batch 100% done, ETA 00:00:00)
Applying adjustment of 4.15dB to 03.Come_As_You_Are.mp3.wav...
 03.Come_As_You_Ar 100% done, ETA 00:00:00 (batch  22% done, ETA 00:00:00)
Applying adjustment of -0.91dB to 07_-_Crystal_Mountain.mp3.wav...
 07_-_Crystal_Moun 100% done, ETA 00:00:00 (batch  52% done, ETA 00:00:01)
Applying adjustment of -0.82dB to 09-We_Who_Are_Not_as_Others.mp3.wav...
 09-We_Who_Are_Not 100% done, ETA 00:00:00 (batch  75% done, ETA 00:00:01)
Applying adjustment of -1.37dB to Lemuria_-_05_-_Lemuria.ogg.wav...
 Lemuria_-_05_-_Le 100% done, ETA 00:00:00 (batch 100% done, ETA 00:00:00)

We are almost there. In the next step we need to identify our CD/DVD burner block device file name:

$ wodim --devices

OUTPUT:

wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0  dev='/dev/scd0'     rwrw-- : 'TSSTcorp' 'CD/DVDW SH-S183L'
-------------------------------------------------------------------------

take a note of the block device file path. Which in this case is /dev/scd0. As a final step we can burn all audio wav files with cdrecord.

$ cdrecord -v -nofix -eject dev='/dev/scd0' -audio -pad *.wav

All done. Your music CD is ready to use. Please not that -nofix cdrecord's option will instruct a cdrecord to not to close a CD disk session, which allows us to put more tracks on the disc if required. If you wish to close a CD session you can do it with a following command:

$ cdrecord -v -fix -eject dev='/dev/scd0'

Share this linux post:

Submit Burn your music files from any format to audio CD using command line in Delicious Submit Burn your music files from any format to audio CD using command line in Digg Submit Burn your music files from any format to audio CD using command line in FaceBook Submit Burn your music files from any format to audio CD using command line in Google Bookmarks Submit Burn your music files from any format to audio CD using command line in Stumbleupon Submit Burn your music files from any format to audio CD using command line in Technorati Submit Burn your music files from any format to audio CD using command line in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download