Grafburn cd burner - new version 0.10.1

Stuff that has yet to be sorted into a category.
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#31 Post by plinej »

Nathan, Here's a dotpup for a hacked MyBashBurn using Xdialog. This is not for everyday use because I haven't tested any of it, I just made the gui work. It has quite a few features and it may give you some ideas. When you start this dotpup from the menu it will be started from within rxvt because there are parts in the code that use echo that I need to find and convert to xdialog. The scripts depend on the tput command which isn't in puppy either so I'll attach a dotpup for that too. I really like your app better but there's alot of good code in this that may be useful.
Attachments
MyBashBurn.pup
(64.91 KiB) Downloaded 660 times
Tput.pup
(13.2 KiB) Downloaded 758 times

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

#32 Post by plinej »

Nathan, I had to edit the set_prefs script in 0.3 like this:

from:
--stdout --title "Grafburn: temp directory" --dselect $OLDTMPDIR 0 0`
to:
--stdout --title "Grafburn: temp directory" --dselect "$OLDTMPDIR" 0 0`

and

from:
--title "Grafburn: output directory" --dselect $OLDOUTDIR 0 0`
to:
--title "Grafburn: output directory" --dselect "$OLDOUTDIR" 0 0`

without the quotes I got no Xdialog popup

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

#33 Post by plinej »

One other thing I always disliked about the burniso2cd code was the line:

Code: Select all

 SCSIDRIVES="`cdrecord -scanbus 2>&1 | grep '[0-9],[0-9],[0-9]' | grep -v '*$' | tr '|' " " | tr '\t' '|' | cut -f 2,3 -d '|' | tr -s " " | tr "'" '_' | tr " " '_' | tr -s '_'`" #'
my output:

Code: Select all

0,0,0|_0)_LITE-ON_DVDRW_SHW-1635S_YS0N_Removable_CD-ROM
1,0,0|100)_WD_1600JB_External_0107_Disk
I'd change it to:

Code: Select all

 SCSIDRIVES="`cdrecord -scanbus 2>&1 | grep -i cd-*rom | grep '[0-9],[0-9],[0-9]' | grep -v '*$' | tr '|' " " | tr '\t' '|' | cut -f 2,3 -d '|' | tr -s " " | tr "'" '_' | tr " " '_' | tr -s '_'`" #'
my output:

Code: Select all

0,0,0|_0)_LITE-ON_DVDRW_SHW-1635S_YS0N_Removable_CD-ROM
That way your usb hard drives don't show up as a possible selection to burn to. It needs to be `grep -i cd-*rom` because most drives show up as cdrom but as you can see, I have one that shows up as CD-ROM.

I only mention this because I see you used that same piece of code in a couple of your scripts.

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

#34 Post by Nathan F »

The quotes around "$OLDTMPDIR" and "$OLDOUTDIR" should only be necessary with spaces in directory names, but since that's a very real possibility I went ahead and added it.

The extra parameter for the search of the drives seems like a good idea also. I was going to have a look at it myself, since on this laptop it was picking up the hard drive and any attached pendrives also. Now fixed. Thanks to plinej for both of those suggestions.

I also went ahead and added the trailing slash I was talking to MU about, seems to do no harm even though that means in my circumstance I get a double slash before the filename.

Nathan
Bring on the locusts ...

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

#35 Post by plinej »

Nathan,

This line in the grafburn script:

<action>rox /usr/local/apps/Grafburn/help.txt</action>

Does rox actually display the text file? I don't know because I actually stripped out rox and just have a script that passes rox commands to emelfm2 since so many puppy scripts utilize rox. Instead of using rox as the command would it be okay to use defaulttexteditor? Or does Rox display the text nicer? No big deal, I can just edit my rox script to take that command into account. Just curious if it was a mistake or not.

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

#36 Post by Nathan F »

I just uploaded version 0.4, with all of the above changes. This is probably the most dramatic revision to date. IMPORTANT -you should delete your rc file (~/.config/grafburnrc) if you are upgrading from a previous version.

Changes:
  • New preferences dialog, more verbose
    Added speed setting to preferences, but the setting is not used yet
    New main window
    Included help
    About button
    Fixed the bug with trailing slashes in Muppy
    Improved drive recognition
    Directory paths with spaces should now work
    Removed some old code, commented the current code a bit better in places
The main window will now have a button for audio cd creation, but that function is not yet implemented. I just wanted to get the main part of the gui knocked into place and see how it would look. I would appreciate any help you guys can offer with this since it's new ground for me. The wish list right now is to be able to encode to and from wav, mp3, ogg, flac, and cdda. Support for m4a might not be a bad idea either. I have no objections to calling external functions as long as they are already in Puppy. I'd like to get at least a small portion of this implemented before I release any more tarballs.

For the next version I may eliminate the call to burniso2cd, and just add a file selector to the burn_iso script if it is called without an argument. I may also move the choice of burner to the preferences dialog to get rid of that dialog box. I'm also thinking, on first launch the program should check if there is an rc file and if not then it should launch the preferences dialog. I also need to implement the idea of a dialog showing the commands that are about to be executed, and a way to edit them if a person wants to.

We're getting down to some heavier work on this now, so it might be a couple days before I put another tarball up. I think I'll put up a dotpup along with it next time also, for those who prefer that.

Nathan
Bring on the locusts ...

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

#37 Post by Nathan F »

Does rox actually display the text file?
No, it just uses rox as a handler. It will display the file using whatever application rox is set up to open when you click on a plain text file. I suppose I could change it, but I'm not used to people actually removing rox since it's so ingrained into Puppy.

This is off on a tangent, but since you brought up alternative file managers have you tried pcmanfm? It's pretty cool -small, pretty, and efficient. But it needs a few things Puppy doesn't have by default.

Nathan
Bring on the locusts ...

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

#38 Post by Nathan F »

One other thing, by calling rox the gui is left free while the help file is displayed, because rox exits after opening the file. I can of course get it to do that in another way, but that was one of my reasons.

Nathan
Bring on the locusts ...

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

#39 Post by plinej »

That's fine Nathan, I was just curious. I haven't tried out that filemanager you mentioned, I'll take a look at it. I'm happy with emelfm2 though. You could just do this:

<action>defaulttexteditor /usr/local/apps/Grafburn/help.txt &</action>

That way the app will still be free. This is looking really nice and I'll probably borrow some of your code for future changes on some of my apps. Looking forward to the audio cd portion.

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

#40 Post by Nathan F »

Yeah, I'll go ahead and make that change. I was thinking of that method anyway.

Interestingly enough, I was thinking of using some of your code too, or at least having a close look at it. You've done great work on pbcdripper in particular, and I need to learn how to use the command line audio tools now.

Nathan
Bring on the locusts ...

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#41 Post by WhoDo »

Nathan F wrote:I just uploaded version 0.4, with all of the above changes. This is probably the most dramatic revision to date.
And bloody luverly, too! Thanks, Nathan. Thats absolutely terrific, and suits my needs to a T.

Cheers

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Wav, Mp3 and Ogg sounds about right for starters

#42 Post by WhoDo »

WhoDo wrote:
As to other formats, I hope I'm not teaching my Grandma any egg-sucking, or exposing my own ignorance, but at a minimum I'd like it to be able to encode from mp3 to CDDA and perhaps flac, too.
That may be quite a lot. Wav, Mp3 and Ogg sounds about right for starters. Plinej is working on adding sound recording to an app he is working on - that may be worked co-operatively?

the amazing Soxgui-0.2 which converts between audio formats
is in Puppy Star (2.13)
http://www.murga-linux.com/puppy/viewtopic.php?p=85761

However for future features who knows what might well be possible (ultimately it is up to Nathans good judgement)
MODS: As I didn't write this, I suggest there may be something screwy going on! Either the board has hiccuped or someone is playing around. Probably the former. My actual post has disappeared and I've been credited with one displaying more technical expertise than I would dare to claim. Any ideas?

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

#43 Post by plinej »

Well, If Barry puts my updated ffmpeg into Puppy 2.14 it will be able to decode most of the audio formats you mentioned you want to incorporate. There is also flac support in ffmpeg but I disabled it in the most recent ffmpeg package that I posted because the flac encoding doesn't work right (the decoding is fine though). If you used ffmpeg you wouldn't have to have many lines of code since the multiple different formats going in could all be decoded to wav.

ffmpeg -i inputfile.(whatever-format) output.wav

and then burned to audio cd. Sox will also decode various formats to wav. If you look at the soxgui code you'll see I utilized sox and ffmpeg to transcode between audio formats.

Speaking of my code I really should add more comments in there so people can look at it and know right off the bat what it's doing.

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

#44 Post by Nathan F »

The fact that it refers to Puppy-2.13 by the codename (Star) makes me think the post might have been from Lobster. I bet the board is just acting screwy, hopefully it's a temporary glitch. John does have a forum set aside for posting bugs like this now, so it might be a good idea to report it to him.

Nathan
Bring on the locusts ...

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

#45 Post by plinej »

I should also add some other code that may help since you'll probably want to convert to stereo and set sampling rate to 44.1Khz when burning an audio cd.

sox input-file -c 2 -r 44100 output.wav
ffmpeg -i input-file -ac 2 -ar 44100 output.wav

Of course if the file is already stereo and 44.1Khz it wouldn't matter but just incase it isn't.

You'll have to see what the stock ffmpeg can decode since I can't remember. It may be able to decode most of those formats but my newer version will encode more formats.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#46 Post by Lobster »

Nathan F wrote:The fact that it refers to Puppy-2.13 by the codename (Star) makes me think the post might have been from Lobster. I bet the board is just acting screwy,
Nathan
Yes it was me . . .
Lobster :?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

Version 0.5 uploaded

#47 Post by Nathan F »

I just uploaded version 0.5 of Grafburn. This version implements very basic audio cd creation and encoding, with support for ogg, mp3, and wav. At some point in the future I will expand this to include flac and m4a. PlineJ will be pleased to note that it now calls the defaulttexteditor to display the helpfile rather than using rox as a handler. I also commented out some code that was giving me problems in the iso creation stage, and it now works more reliably.

The audio capabilities are quite basic, and the output is hardcoded for stereo at 44.1Khz. There are no fancy playlists or file selection dialogs, instead you just burn an entire directory of audio files, either directly or first encoding to the format of your choice. It uses ffmpeg for encoding to mp3 or wav, and sox for encoding to ogg because Puppy's stock ffmpeg cannot output ogg files. I've also edited the included help and added a changelog to it.

There is still some more work to be done on this, mainly cleaning up the dialog text and adding configuration options. I also need to come up with a better way to display feedback during the encoding stage than popping it up in rxvt, because the program is popping up too many windows now. But for my uses this is already quite usable.

I may fork this in a week or two, creating a Puppy-specific version and a Grafpup specific version. I have svg support in Grafpup's gtk and want to use svg icons in the application, and will probably include PlineJ's recompiled ffmpeg. Also the Grafpup version will reside in a different location. I may also be adding an updated gtkdialog to Grafpup in order to access the new style file selection dialog. At the point this happens I will probably stop work on the Puppy specific version, and ask that if anyone else wants to see it developed further then you are welcome to take it over.

This version comes in both unleashed and dotpup format. Uninstall any previous versions before installing, to avoid duplicate entries in the package manager.

Nathan
Bring on the locusts ...

AndyMack
Posts: 47
Joined: Thu 09 Nov 2006, 16:33

#48 Post by AndyMack »

is the burning of bin/cue files supported at all?

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

#49 Post by Nathan F »

I only know of three things that can read a bin/cue file under *nix. None are in Puppy, so I can't easily add that capability to my program. For the record you can use:

Mplayer
Cdrdao
The Cdemu kernel module (from the same guys who submitted the Mplayer patch for bin/cue)

If anyone is interested, cdrdao would probably be easiest to get running in Puppy. I have no idea if any of the current Mplayer packages have this capability or not.

Nathan
Bring on the locusts ...

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

#50 Post by Nathan F »

Another version is already in the works. I've finally figured out the right settings for burning a directory of wav's as a conventional audio cd, so the next version of Grafburn will do that. I've added several more settings to the preferences manager and started using them in the burning stage also, things like speed, device name, and sampling rate for encoding audio. Plus I'll be streamlining the process by removing extra windows and dialog boxes.

One thing I need to redesign, is the way the audio encoding stage works. Right now it pops up a new rxvt window for each one, but I want to move the function to an external script so I can just call rxvt once. I designed it the way I did so that there is a minimum of interaction, the user doesn't even have to input the format the songs are in because the program finds checks the files.

Anyway, probably two days till version 0.6, which should be well worth it. It's getting closer now to what I envision as a 1.0 release.

Nathan
Bring on the locusts ...

Post Reply