LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-12-2005, 07:39 PM   #16
mariojej
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0

Am I late for a reply?

I know how to write an audio CD 'on-the-fly', without sacrificing disk space nor memory.

You just need to pipeline the 'mpg321', an mp3 decoder, and the 'cdrecord'.

Here is the code, change the dev and speed to fit your hardware.
Repeat it as many times you need.

Code:
mpg321 --cdr - music.mp3 | cdrecord -v dev=/dev/hdc speed=2 -audio -nofix -pad -
Note: change 'music.mp3' for your song; 'dev=/dev/hdc' for your cdrom device(you can also specify dev=0,0,0 which I don't like); 'speed=2' for your preferred speed.

Also, note the '-nofix' option which is VERY IMPORTANT.

When you are done, you can type the following command to close the disk:

Code:
cdrecord -v dev=/dev/hdc -fix -eject
NOTE: You will notice the message:
cdrecord: WARNING: Total disk size unknown. Data may not fit on disk.

Since the pipelined data size cannot be detected, check if there are enough space for recording all your songs properly.

Sorry, but I don't have an automated script ready.

I hope this helps.

Does anyone know some decoder for Ogg Vorbis?

Oh, sorry if I misspelled something. I am Brazilian.
 
Old 07-13-2005, 02:49 AM   #17
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Rep: Reputation: 30
its never to late to reply

would the follwing make a whole cd?

pg321 --cdr - music | cdrecord -v dev=/dev/hdc speed=2 -audio -nofix -pad -

the music file being a list of mp3s in a directory
 
Old 07-13-2005, 04:47 PM   #18
mariojej
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
I didn't tested if the cdrecord allows multiple streams pipelined.

I gonna check and post later. It will be easier to make a one step process, this also removes the need of '-nofix'.

Last edited by mariojej; 07-13-2005 at 04:51 PM.
 
Old 07-13-2005, 05:30 PM   #19
mariojej
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
I still need to check the code above. I'm here to explain about the pipelines.

A pipelined data does not uses a huge memory.

Lets use this example:
Code:
mpg321 -w - something.mp3 ... | second_program
For the mpg321, it uses an temporary buffer for the decompression, and holds the output in chunks, output the data to the stdout*(the "-" sign) and it goes to the pipeline.

* Standard Output - mostly the terminal screen.

If the second_program does not ask for the pipelined data, the mpg321 freezes and waits.

When the second_program needs more data, the mpg321 continues...

But, let's say, the second_program does not use ALL the pipelined data and exits? mpg321 must close because there is nothing to do.

Another example is:

Code:
cat /dev/hda1 | xxd | head
* xxd is only for a better output in hexadecimal. =)
The 'head' only reads the first 10 lines of data. Notice that 'cat' will not read the entire hard disk: It stops immediately. Why? The 'head' command exits when the wanted lines have been read.

An exception for this rule is: when the 'cat' returns End Of File signal prematurely(lets say a small file), head receives it and stop without accomplish his purpose(read at least 10 lines).

I hope you folks are understanding my example.

Sorry again if any misspelled phrase.
 
Old 07-13-2005, 06:28 PM   #20
mariojej
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
I tried but without progress yet.

cdrecord recognizes the data as an 'one track disc', heheh... It writed all the musics with a tape-like style.

Any suggestions?

The command I used:

Code:
mpg321 --cdr - -@ playlist | cdrecord -v dev=/dev/hdc speed=2 -audio -pad -
 
Old 07-14-2005, 06:35 AM   #21
geletine
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 213
Blog Entries: 2

Rep: Reputation: 30
you could try the nofix option, and fix it later

what happen when you enter

mpg321 --cdr - -@ playlist | cdrecord -v dev=/dev/hdc speed=2 -audio -pad -

i am not sure if you can use the @ sighn, just try plain text
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a prog for burning mp3 on cd safrout Linux - Software 28 12-20-2002 12:16 AM
Burning MP3 CDs bxb32001 Linux - Software 12 08-25-2002 10:56 PM
MP3 Burning Software? RedHatMN Linux - General 2 04-08-2002 07:00 PM
mp3/cd burning program Coproscefalo Linux - General 2 01-10-2002 03:24 AM
Burning MP3 Cdroms Raygun Linux - General 0 05-18-2001 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration