gpRip cd ripper

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

gpRip cd ripper

#1 Post by Nathan F »

This little app I wrote is for ripping audio cd's onto your hard drive, much like RipperX or PBcdripper. However this one does a few things the others don't, and probably skips a few things they already handle. This is in a very ealry prototype stage but should be pretty easy for anyone to use.
Features:
  • * Fetches album info from a cddb server and automatically inserts the Artist, Album, Title, and Genre information for all tracks.
    * Put's the output files into a subdirectory named for the album, inside another subdirectory named for the artist.
    * Automatically names all the tracks based on the above info.
    * Rips to wav and mp3, flac if flac is installed, or ogg if oggenc is installed (part of VorbisTools).
    * Unlike PBcdripper it pipes cdparanoia right into the encoder without outputting a wav first. Saves a bit of space and time.
    * Completely graphical with progress bars rather than terminal screens.
Image
There is an included preferences tool which allows you to set up some basic options, but for the most part everything is kept extremely simple. My inspiration was SoundJuicer, clean as possible without a bunch of confusing options on the main window. But there is a little bit of a tradeoff probably when compared with PBcdripper, in terms of the total nuimber of options (PBcdripper can do a bit more, gpRip focuses on the basics). Also there are a few things which are unfinished like output to a single track, or extra meta comments in the files. I tested it pretty thoroughly before uploading though, with all four formats, and got flawless results each time.

To do the cddb lookups the program requires the cdstatus binary, which I'm putting up here with it. This is only 46K so very little impact.

I'll be out of pocket a lot starting a few days from now, taking the family on an extended camping trip. So if you have any questions or comments best to get them in soon.

Nathan
Attachments
gprip-0.6.pet
(104.17 KiB) Downloaded 633 times
Last edited by Nathan F on Tue 26 Jun 2007, 21:42, edited 5 times in total.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#2 Post by plinej »

Looks good Nathan. I'll give it a try over the next couple of days.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#3 Post by Nathan F »

I found one bug in the script that does the actual rip, hadn't noticed it before because the disks I tested with were small (~less than ten songs). Anyway, if there were more than ten tracks then the names of track 10 and above were appended to the name of track 1. Line number 28 of the script "/usr/local/apps/Media/gpRip/ripcli" should be changed from:

Code: Select all

 TRACKNAME="`cat $HOME/.config/tmp/trackinfo.txt | grep "Track${TRACK}" | cut -f 2 -d '='`"
to:

Code: Select all

 TRACKNAME="`cat $HOME/.config/tmp/trackinfo.txt | grep "Track${TRACK}=" | cut -f 2 -d '='`"
I'll make version 0.2 available soon.

Nathan
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#4 Post by Nathan F »

I found another issue, minor though it is. In order for this to function prope3rly you have to have a .cdstatus file in you home directory, which specifies "default_first_match=yes". The problem only comes up if there are multiple matches found in the cddb lookup, but this forces it to default to the first one (which is usually right anyway).

I wrote the helpfile this evening, and I'll upload version 0.2 tomorrow sometime.

Nathan

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#5 Post by Nathan F »

I uploaded 0.2 to the top thread. This mainly fixes a couple bugs, but it adds a fully populated help page as well and also puts in a comment tag (of your choice), date (ogg and flac only) and has a new logo. The cdstatus package is updated as well to include a preferences file. You can also just create a .cdstatus file in your home directory (/root) that says

Code: Select all

default_first_match=yes
It should hopefully be smooth sailing now.

Nathan
Bring on the locusts ...

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

Looks interesting, Nathan. I'd use it to convert audio book CDs to mp3, to listen to on my mp3 player. I didn't see that the mp3 conversion can be set for 32 kb/s mono, which is what I use. Also, some audio book CDs have 99 tracks. I can't imagine why, but there it is. I haven't seen any with more than 99. Can your program handle that many?

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#7 Post by Nathan F »

Flash -

You can change the bitrate in the preferences dialog. Just open the program and then from the menubar at the top choose Options > Preferences. The quality settings are on the second tab. You will want to change the bitrate to 32 using the drop down box, and uncheck the "Stereo" button for mono output. I just noticed the program is not restarting like it is supposed to after running the preferences dialog, so you will have to either close it and restart or press the "Rescan" button so that the new settings will take effect.
Also, some audio book CDs have 99 tracks. I can't imagine why, but there it is. I haven't seen any with more than 99. Can your program handle that many?
Theoretically that should be no problem, but that means you will have a very large window in order to handle 99 entryboxes for track titles. This is a situation I hadn't really anticipated. The most tracks I've seen on a CD before is 45, which would admittedly cause a bit of the same problem but only by about half. Let me stew on it for a while. Perhaps the gui could be rearranged a bit if you have more than, say 20 tracks. Problem is that could make the code a lot more complex.

At some point in the future if I can figure out how to pipe into ffmpeg from stdin I'm going to probably get rid of the oggenc dependency. The only problem I can see with that is then I also have to figure out how to tag the resulting files, or else just mention to the user that if they want tagged ogg files they will have to install VorbisTools to get oggenc.

Nathan
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#8 Post by Nathan F »

Version 0.3 uploaded. Changes:
* Fixed the annoying newline in the album name field.
* Fixed an error causing artist names to be truncated when more than one cddb record is found
* Implemented simple m3u playlist creation when ripping a cd

Nathan
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#9 Post by Nathan F »

There was a bug causing typed in song titles to be ignored. While I was fixing that I enabled spaces in song titles, just in case somebody felt like doing so. New version (0.4) is now uploaded.

Nathan
Bring on the locusts ...

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#10 Post by zigbert »

Nathan.
Tried GpRip today, and I have to say:
I have never ripped this easy!!!!!!

We have an idiom in Norway - "Much wants More". I am very pleased, but still want even more. So here my wish. It would been nice to set the format of output filenames. In GpRip the output format is like '1-Name_Of_Song.mp3', while I have to rename it to 'Name of artist - Name of song.mp3'.

Thank you!
Sigmund
Last edited by zigbert on Sun 03 Jun 2007, 16:51, edited 1 time in total.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#11 Post by Nathan F »

I considered implementing that in the preferences, but kept it simple for the time being. It wouldn't take too much code to get it done but sorry to say my time is very limited for a while. I'll get it done sometime since it has been requested, but it will probably be quite a while before I can.

Thanks for the feedback,
Nathan
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#12 Post by Nathan F »

I uploaded 0.5, which has about three important changes. The progress bar which pops up while the tracks are ripping now says which track is being ripped, and a couple other things depending on the situation. I've also made it possible to change the format of the track names, via the preferences dialog, like Zigbert suggested. And I added something that should have been there the whole time - a Cancel button to stop the rip.

The messages in the progress bar are nice, althought it could still be better. I found that if the script feeding the bar (using gtkdialog3) echoes a line of text that text will appear in the bar itself, which is needless to say very useful to both the developer and end user. But I still think it needs more feedback.

The track title naming still isn't perfect, as I'm sure I probably left off a few combinations that some users might prefer. Let me know if you have any requests in this area and I will get them into the next release. Also, I want to have a preference for whether or not to have spaces in the filenames and paths, or to replace spaces with an underscore. But that, of course, will complicate things further and I make no guarantees about when it might appear.

I have a few other ideas as well but the above should be enough to keep me occupied for a while.

Nathan

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#13 Post by jcoder24 »

Suggestion: A checkbox next to each track so you can decide which track(s) you want to rip.

Question: Is anything other than lame required for encoding mp3? Whenever I try ripping to mp3 gprip indicates that its ripping and finishes in seconds. When inspecting the output dir all I see is a m3u file.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#14 Post by Flash »

Nathan, maybe I should have mentioned this in my post above: the tracks on an audio book CD are not normally named, only numbered in sequence. Just to clarify: some audio books are composed of as many as 18 CDs, and each CD can have as many as 99 tracks (I haven't seen a CD with more tracks.)

A useful thing (for me) would be the ability to place the tracks of all the CDs from a book into one directory, with the tracks numbered in correct sequence. My mp3 player could then play all the tracks of the book without further instructions from me. I have a Windows-based program which combines tracks and numbers them, but haven't seen a way to do it in Linux.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#15 Post by Nathan F »

Suggestion: A checkbox next to each track so you can decide which track(s) you want to rip.
That's already on my todo list, but it's a tad bit tricky as I'll have to assign variables to each checkbox and we don't know how many tracks there are going to be when I code it. But I do have a method worked out in my head for it.
Question: Is anything other than lame required for encoding mp3? Whenever I try ripping to mp3 gprip indicates that its ripping and finishes in seconds. When inspecting the output dir all I see is a m3u file.
Do me a favor and run it in a terminal, just use "gprip" and let's see what is causing it. For mp3 the only thing that should be required is Lame, but something else could be throwing it off.
A useful thing (for me) would be the ability to place the tracks of all the CDs from a book into one directory, with the tracks numbered in correct sequence. My mp3 player could then play all the tracks of the book without further instructions from me. I have a Windows-based program which combines tracks and numbers them, but haven't seen a way to do it in Linux.
That's a toughie, but I bet I could find a way given enough time. I think the easiest way would be to allow the user to set the track number manually. A little intervention required on the part of the user, but once ripped no problem at all really.

What I've been working on now is a refinement of the way the files are named. Rather than a combobox with a few format choices (Track-Artist-Title, etc.) I've changed the preferences to have a checkbox for each possible componenet of the filenames, ei one for Track, one for Artist, one for Album, and one for Title. There is also a checkbox to allow or disallow spaces in the filenames now. Untick "Allow spaces in filenames" and all spaces will be converted to underscores. Tick it and the filenames now appear sort of like this:
1 - the artist - the album - the song.ogg
As opposed to this:
1_-_the_artist_-_the_album_-_the_song.ogg
Also affects the directory names similarly.

I'll be working on it from time to time and try to get at least one or two good refinements out maybe every other week. I'm just swamped so any more than that probably won't be possible.

Nathan
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#16 Post by Nathan F »

Flash -

I just had a though on your management issue, at least for the time being. Easytag can alter both the filenames and tags of your music files, although combining tracks is not supported. I know there is at least one Puppy package for it somewhere on this forum.

I think an external management tool might also be in order, something that can combine any number of tracks if need be, rename the files, and write the tags as the user directs. Any thoughts? Might be a worthwhile project.

For now I believe you can combine using Audacity, not sure about Soxgui because I'm away from my own computer right now. There are probably more programs which can split mp3's than there are which can combine them.

When I get the option working to output a single track it could be combined with the ability to number the tracks manually to do what you are talking about. I'll bump that up on my agenda as well.

Nathan
Bring on the locusts ...

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#17 Post by zigbert »

Thanks

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#18 Post by jcoder24 »

I've attached the logs from running gprip0.5 (in console) in Grafpup 2.00 (pfix=ram).
Attachments
gprip-log.tar.gz
(1.42 KiB) Downloaded 337 times

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#19 Post by Nathan F »

I uploaded a new version as things stand right now. This only implements the new filename conventions, including allow/disallow spaces. I'm working on the other things I mentioned now.

jcoder24 - I'm examining the log files you sent now. According to what I am seeing you have set "misc" as the genre and lame is deciding that is not a valid tag to write, so lame is refusing to do it. I didn't know lame would do this, but I guess I should change things somewhat. I think I might change the entry box to a combobox, and have the user select the genre from a list. That way it will be impossible to fill in an illegal value. Any thoughts? Or is there some option I can pass to lame to get past this restriction maybe?

Nathan
Bring on the locusts ...

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#20 Post by Nathan F »

Ahh, I found this on tag errors with lame. Apparently I can pass the --ignore-tag-errors option to lame and it will just substitute the offending tag with "Other". I could do this, but it would be annoying to some when they find all their tracks are labeled as "Other" rather than the custom tag they typed in. Perhaps a combination of the two approaches, use the above mentioned combobox but make it editable, with a note in the help file stating that custom mp3 tags will be changed to "Other"?

Anyway, it's fixable apparently. Also there's a list of supported genres here, if you care to peruse it until I create a more user-proof version. As I understand it, lame can use any of the genre's listed at the bottom of that page.

Nathan
Bring on the locusts ...

Post Reply