LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-07-2006, 10:21 PM   #1
Tylerious
Member
 
Registered: Feb 2005
Location: USA
Distribution: Gentoo
Posts: 72

Rep: Reputation: 15
Rip/Encode to Ogg/Tag script?


I'm looking for a way to rip my CDs to Ogg complete with tags from CDDB from the command line. What I'm using right now is, for example:

cdparanoia 1 - | oggenc - -q 3 -o 01\ Ashes.ogg

I can do this for every track and then edit the tags in amaroK, but I'm sure there's a simpler way. I just have an older computer, so I'd prefer a command line utility as opposed to a GUI tool.

Anybody know of a better way to do this?
 
Old 03-07-2006, 11:30 PM   #2
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
Check out LAME's terminal commands.
 
Old 03-08-2006, 05:39 PM   #3
Tylerious
Member
 
Registered: Feb 2005
Location: USA
Distribution: Gentoo
Posts: 72

Original Poster
Rep: Reputation: 15
I'm not encoding to mp3; I'm encoding to Ogg. Lame's no good for that, right?

I've come across CRIP (http://bach.dynet.com/crip/index.html). I think I'll use that unless anybody has a better suggestion. Thanks anyways, though.
 
Old 05-05-2006, 08:42 AM   #4
Caysho
Member
 
Registered: Sep 2002
Location: Perth Australia
Distribution: OpenWRT, debian, Ubuntu
Posts: 135
Blog Entries: 18

Rep: Reputation: 15
Rip audio CD directly to Ogg

Was going to start a new thread, but my question is almost the same, so I'll continue this one

I just found a scipt called cd2ogg that will rip a CD directly to ogg.
I'm running it through one now, and it's quite nice, though my box is a bit slow.

One thing I would like to do is rip an entire CD to a single file (mp3, ogg, etc), but I haven't found a way to do it yet. I figure this would mean no tags, but that's ok.

The crip site is not available for me (connection refused), so I can't check it out.

WRT lame, I have found some google references to an ogg mode in lame, but I doubt it's worth using.
 
Old 05-05-2006, 12:55 PM   #5
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 30
Quote:
Originally Posted by Caysho
One thing I would like to do is rip an entire CD to a single file (mp3, ogg, etc), but I haven't found a way to do it yet. I figure this would mean no tags, but that's ok.
cdparanoia can rip an entire cd to 1 file (I believe it will by default if you don't specify batch mode).

P.S. Thanks for the cd2ogg link, just what I needed.
 
Old 05-05-2006, 08:10 PM   #6
Caysho
Member
 
Registered: Sep 2002
Location: Perth Australia
Distribution: OpenWRT, debian, Ubuntu
Posts: 135
Blog Entries: 18

Rep: Reputation: 15
From what I can tell, cdparanoia won't do any encoding on the fly. I figure there's a way to do it with pipes on the command line, but that's a bit beyond me.

Edit: just looked at the processes while ripping a CD:

cdparanoia -e -q -d /dev/cdrom -w 6 -
oggenc -Q --comment=comment=encoded by cd2ogg 2.4.18 -d 1996 -G rock -t Track -N 6 -l CDTitle -a Band -b 192 - -o file.ogg

[names removed to protect the innocent ]

According to the man pages, cdparanoia output is going to stdout and oggenc is reading from stdin. Given this, this script does indeed do a direct rip to ogg.
Can anyone confirm ?

Last edited by Caysho; 05-05-2006 at 08:54 PM.
 
Old 05-06-2006, 02:40 AM   #7
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 30
Yeah, looks like it does, so you could just pipe those commands together to rip on the fly. If you don't specify any track numbers to cdparanoia, it will rip the entire cd.
 
Old 05-06-2006, 03:44 AM   #8
Caysho
Member
 
Registered: Sep 2002
Location: Perth Australia
Distribution: OpenWRT, debian, Ubuntu
Posts: 135
Blog Entries: 18

Rep: Reputation: 15
ok, I'm trying this:

Code:
cdparanoia -e -q -d /dev/cdrom - | oggenc -b 192 - -o file.ogg
But this gives:

Code:
Sending all callcaks to stderr for wrapper script
ERROR: Input file "(stdin)" is not a supported format
Am I missing something obvious ?

Edit:
This works -
Code:
cdparanoia -vqs "1-15" - | oggenc -q 7 - -o file.ogg
The error I was getting was due to not supplying any track information, so there was no data from stdin and oggenc was complaining about that.

Last edited by Caysho; 05-06-2006 at 06:19 AM.
 
Old 05-06-2006, 06:23 AM   #9
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 30
Oops, sorry, my mistake, you need to specify the tracks to rip. I thought it defaulted to the entire cd if you didn't but apparently that is not the case. You can use "1-" to specify the whole cd, so a simple modification should suffice:

Code:
cdparanoia -e -q -d /dev/cdrom 1- - | oggenc -b 192 - -o file.ogg
 
Old 05-06-2006, 06:41 AM   #10
Caysho
Member
 
Registered: Sep 2002
Location: Perth Australia
Distribution: OpenWRT, debian, Ubuntu
Posts: 135
Blog Entries: 18

Rep: Reputation: 15
Yes
I've changed the
-b 192 to
-q 7
because I've been reading that ogg vorbis is inheritly vbr and specifying a bit rate is a bit pointless.
Specifying a quality setting means that the incoming bit rate is irrelevant.

Ogg processing certainly consumes CPU ;p
 
Old 05-07-2006, 07:24 AM   #11
Caysho
Member
 
Registered: Sep 2002
Location: Perth Australia
Distribution: OpenWRT, debian, Ubuntu
Posts: 135
Blog Entries: 18

Rep: Reputation: 15
Quick script to convert flac to mp3 is at
http://www.oreillynet.com/cs/user/view/cs_msg/55968
I changed it to convert to ogg vorbis:

Code:
#!/bin/bash

FILES=$(ls *.flac | cut -d '.' -f1)

for i in $FILES; do
echo converting: $i.flac
flac -sdc $i.flac | oggenc -q7 - -o $i.ogg
done
 
Old 01-16-2007, 02:17 PM   #12
fang2415
Member
 
Registered: Jan 2007
Posts: 159

Rep: Reputation: 15
Obviously this thread is way out of date, but in case anybody else like me Google-stumbles upon it:

I think a script called abcde (an acronym for A Better CD Encoder) might be the best solution for the problem. From apt-cache show:

Quote:
A frontend program to cdparanoia, wget, cd-discid, id3, and your favorite Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+(Musepack) encoder (defaults to oggenc). Grabs an entire CD and converts each track to the specified formats and then comments or ID3-tags each file, with one command.

With abcde you can encode several formats with one single command, using a single CD read operation. It also allows you to read and encode while not on the internet, and later query a CDDB server to tag your files.
Works dynamite for me so far. (Although I don't think it will convert FLAC to Vorbis -- Caysho's script looks good for that.)
 
Old 02-26-2007, 11:05 PM   #13
tread
LQ Newbie
 
Registered: Feb 2007
Posts: 29

Rep: Reputation: 15
Quote:
Originally Posted by Caysho

Code:
#!/bin/bash

FILES=$(ls *.flac | cut -d '.' -f1)

for i in $FILES; do
echo converting: $i.flac
flac -sdc $i.flac | oggenc -q7 - -o $i.ogg
done
This is probably out of date, but using find is simpler.
Code:
find . -name "*flac" -exec oggenc -q 7 {} \;
Edit: this works for me on Ubuntu Edgy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Grip Won't Rip + Encode dingledoink Linux - Software 7 09-25-2005 09:01 PM
Rip and encode cd Linuxkundi Mandriva 3 05-10-2005 06:49 AM
How do i encode to .ogg? BmxFace Linux - Software 7 02-04-2004 09:46 AM
Christmas rip and encode nut Thulemanden Libranet 1 12-27-2003 12:35 AM
command line cd rip and encode Scruff Linux - General 6 10-01-2003 11:30 PM


All times are GMT -5. The time now is 09:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration