From sam at liddicott.com Sat Jun 3 03:07:05 2006 From: sam at liddicott.com (Sam Liddicott) Date: Sat Jun 3 03:08:45 2006 Subject: [mp3togo] file format suggestion In-Reply-To: <20060529140328.GA23710@puddle.ca> References: <447AE87C.2080606@liddicott.com> <20060529140328.GA23710@puddle.ca> Message-ID: <44815F49.30404@liddicott.com> Maybe mp3togo could use mplayer (if installed), thus: mplayer -ao pcm:file=TEMPFILE.wav otherformat.ra to convert from unknown file formats to wav, and then carry on from there. BBC radio7 provide .ra and .wmv streams, and this feature would make it so much easier to handle those. Sam From sim at puddle.ca Sat Jun 3 08:05:56 2006 From: sim at puddle.ca (sim) Date: Sat Jun 3 08:06:14 2006 Subject: [mp3togo] file format suggestion In-Reply-To: <44815F49.30404@liddicott.com> References: <447AE87C.2080606@liddicott.com> <20060529140328.GA23710@puddle.ca> <44815F49.30404@liddicott.com> Message-ID: <20060603150556.GA4152@puddle.ca> On Sat, Jun 03, 2006 at 11:07:05AM +0100, Sam Liddicott wrote: > Maybe mp3togo could use mplayer (if installed), thus: > > mplayer -ao pcm:file=TEMPFILE.wav otherformat.ra I have mplayer, but I didn't know about that feature. That sounds really useful. > to convert from unknown file formats to wav, and then carry on from there. > BBC radio7 provide .ra and .wmv streams, and this feature would make it > so much easier to handle those. I've also been thinking about using wget or urllib to handle URLs in playlists. These tweo features would go together well. I think I found my weekend project, thanks Sam. > Sam -- sim From sam at liddicott.com Sat Jun 3 10:08:54 2006 From: sam at liddicott.com (Sam Liddicott) Date: Sat Jun 3 10:10:00 2006 Subject: [mp3togo] file format suggestion In-Reply-To: <20060603150556.GA4152@puddle.ca> References: <447AE87C.2080606@liddicott.com> <20060529140328.GA23710@puddle.ca> <44815F49.30404@liddicott.com> <20060603150556.GA4152@puddle.ca> Message-ID: <20060603170854.13AE1F8AA002@sam.liddicott.com> sim writes: > On Sat, Jun 03, 2006 at 11:07:05AM +0100, Sam Liddicott wrote: >> Maybe mp3togo could use mplayer (if installed), thus: >> >> mplayer -ao pcm:file=TEMPFILE.wav otherformat.ra > > I have mplayer, but I didn't know about that feature. That sounds > really useful. > >> to convert from unknown file formats to wav, and then carry on from there. >> BBC radio7 provide .ra and .wmv streams, and this feature would make it >> so much easier to handle those. > > I've also been thinking about using wget or urllib to handle URLs in > playlists. These tweo features would go together well. > > I think I found my weekend project, thanks Sam. > >> Sam very good. i actually use mplayer to download the real streams anyway. strangely the mp3 is twice the size me the real file but i did convert to wav manually first. thanks again. i was able to listen to Mort on my SPV. sam From justus at ryoohki.net Sat Jun 3 10:41:10 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Sat Jun 3 10:42:49 2006 Subject: [mp3togo] file format suggestion In-Reply-To: <20060603170854.13AE1F8AA002@sam.liddicott.com> References: <447AE87C.2080606@liddicott.com> <20060529140328.GA23710@puddle.ca> <44815F49.30404@liddicott.com> <20060603150556.GA4152@puddle.ca> <20060603170854.13AE1F8AA002@sam.liddicott.com> Message-ID: <4481C9B6.3030806@ryoohki.net> Sam Liddicott wrote: > sim writes: >> On Sat, Jun 03, 2006 at 11:07:05AM +0100, Sam Liddicott wrote: >>> Maybe mp3togo could use mplayer (if installed), thus: >>> mplayer -ao pcm:file=TEMPFILE.wav otherformat.ra gstreamer can do similar things with gst-launch. It might be nice to try to support as many decoders as possible, if we find them installed. > strangely the mp3 is twice the size me the real file but i did convert > to wav manually first. That's what I would expect. Real Audio is frequently encoded at 16 kbps, whereas the default mp3togo lame encoding is much, much higher. From justus at ryoohki.net Mon Jun 5 13:02:40 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Mon Jun 5 13:05:03 2006 Subject: [mp3togo] pycheesecake Message-ID: <44848DE0.7060105@ryoohki.net> I saw pycheesecake[1] this morning, which is an attempt to grade Python packages based on 3 indices -- installability, documentation, and code "quality". I was curious to see what it would say if I ran it again mp3togo. Here were the scores: Installability - 92% Documentation - 16% Code - 0% Overall - 30% I haven't looked into it much but I think the 0% for the code is because pylint hates it when you use tabs in python programs so it gives mp3togo a rating of -2.06 out of 10 (I didn't know you could go negative!). If you tell pylint that tabs are perfectly fine it gives a rating of 8.09 out of 10. I wouldn't take it too seriously but it does offer a nice, concrete set of areas for easy improvement as mp3togo matures. [1]: http://pycheesecake.org/ From justus at ryoohki.net Tue Jun 6 16:01:52 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Tue Jun 6 16:03:56 2006 Subject: [mp3togo] fix for --save-config Message-ID: <44860960.1040504@ryoohki.net> The current option --save-config doesn't work. The problem is it uses the file "~/mp3togo" which doesn't exist. os.path.expanduser needs to be called if you want to use ~ like that. The following patch adds that and also moves the default config location to a more unix-friendly .mp3togo so it is hidden. -------------- next part -------------- A non-text attachment was scrubbed... Name: saveopts.diff Type: text/x-patch Size: 950 bytes Desc: not available Url : http://puddle.ca/pipermail/mp3togo/attachments/20060606/2dc6ef18/saveopts.bin From sim at puddle.ca Tue Jun 6 22:57:14 2006 From: sim at puddle.ca (sim) Date: Tue Jun 6 22:57:16 2006 Subject: [mp3togo] Version 0.5.3 Released Message-ID: <20060607055714.GA29406@puddle.ca> I've released mp3togo version 0.5.3 Thanks to Justus Pendleton for the config file bugfix. I know it used to work, I guess that's what I get for choosing my own defaults. The test cases use temporary config files so they didn't catch this one either. Sam, I've not forgotten your realaudio suggestion. I got as far as having to install win32 libraries and got distraught. It is a good idea though and I will implement it. I spent the weekend learning PyGTK and as of this morning have a rough, but working, GTK front end for mp3togo. This is the last major component I plan to add and it is coming along nicely. I also discovered a bug in cluster.py that relies on a test script that only exists on my system. I suppose no one else has tried the cluster mode yet. It is pretty cool, but I suspect there are more bugs lurking. The GTK interface is built to use cluster nodes, so the bugs should start to appear. It turns out the cluster code is also useful for running concurrent tasks on the same machine. Maybe I'll have a SMP box to try it on one day. I'm really more of a 'Beowulf cluster of old junk' kind of a guy myself. I'm hoping to have the GUI put together by the weekend. I'll see if I can get some code checked in tomorrow. -- sim From justus at ryoohki.net Wed Jun 7 10:00:26 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Wed Jun 7 10:02:30 2006 Subject: [mp3togo] Version 0.5.3 Released In-Reply-To: <20060607055714.GA29406@puddle.ca> References: <20060607055714.GA29406@puddle.ca> Message-ID: <4487062A.3040207@ryoohki.net> sim wrote: > I've released mp3togo version 0.5.3 > > Thanks to Justus Pendleton for the config file bugfix. I guess I wasn't fast enough in changing my mind about the fix :) Instead of calling os.path.expanduser in options.py:save_config_file I think it probably makes more sense to just call it in the Options.__init__ method so that an absolute path is always accessible and no other code has to worry about handling the tilde. Although I guess it is working now and both the save and read are doing expanduser. From sim at puddle.ca Wed Jun 7 11:31:58 2006 From: sim at puddle.ca (sim) Date: Wed Jun 7 11:32:04 2006 Subject: [mp3togo] Version 0.5.3 Released In-Reply-To: <4487062A.3040207@ryoohki.net> References: <20060607055714.GA29406@puddle.ca> <4487062A.3040207@ryoohki.net> Message-ID: <20060607183158.GA31088@puddle.ca> On Wed, Jun 07, 2006 at 11:00:26AM -0600, Justus Pendleton wrote: > I guess I wasn't fast enough in changing my mind about the fix :) > Instead of calling os.path.expanduser in options.py:save_config_file I > think it probably makes more sense to just call it in the > Options.__init__ method so that an absolute path is always accessible > and no other code has to worry about handling the tilde. > > Although I guess it is working now and both the save and read are doing > expanduser. That's good thinking. On thing about keeping the literal the way it is is so that user entered options don't magicaly change, even if the changed form is equivalent. load_config had a call to expanduser() already, but I wrapped the literal in __init__ in a call to absfile() which is available in conf. This will give an absoulute path for the default, but leave user chosen options alone until it is time to use them. -- sim From sim at puddle.ca Wed Jun 7 18:17:02 2006 From: sim at puddle.ca (sim) Date: Wed Jun 7 18:17:11 2006 Subject: [mp3togo] GTK interface source code added to repository Message-ID: <20060608011702.GA31827@puddle.ca> I've added some new code to the repository. The gui mode can be invoked with mp3togo -X. It runs and converts files, but it is still incomplete and fairly ugly. I posted the script I use to invoke mp3togo from the code in a source tree. It's just a hack and will need to be modified with the path to your source tree. The script is called test-mp3togo and can be found here: http://puddle.ca/mp3togo/tools The interface has been designed using glade 2. The xml interface description lives in lib/mp3togo.glade it needs more work. The package installs it to /lib/mp3togo/mp3togo.glade this would be /usr/lib/mp3togo/mp3togo.glade on a Debian system. I'm pretty sure this is right, but I've not been able to find any examples of how other programs handle this. I haven't tried to install it yet. If mp3togo is started with a different name (eg. test-mp3togo) it assumes it is running from within a source tree and looks for the glade file in ../lib/mp3togo.glade relative to the path of the mp3togo.conf module. This is to make it easy to test a source tree, but may be removed from distributed code. I'd appreciate any feedback on the new GUI. Happy hacking, -- sim From ekkikrist at yahoo.com Sat Jun 10 18:04:57 2006 From: ekkikrist at yahoo.com (Mike) Date: Sat Jun 10 18:08:03 2006 Subject: [mp3togo] Decoding ogg: Failed. Message-ID: <20060611010456.GB30002@yahoo.com> Hello list, I need some help debugging mp3togo-0.5.3. When I attempt to decode ogg files, the process fails. I was able to find out what via ps aux |fgrep ogg123 what command is being executed. When I run that command, I do not get any errors. I think the problem occurs after ogg123 completes execution...what's the next step mp3togo takes? I was afraid this may be some problem with /tmp so I also tried with -w ~/tmp and failed :( I'm using debian sarge and the mp3togo deb package from puddle.ca. Would it make any difference if I installed the tar.gz ? $ /usr/bin/python -V Python 2.3.5 Any suggestions? Have a great weekend, - Mike From reallifesim at gmail.com Sat Jun 10 18:46:48 2006 From: reallifesim at gmail.com (sim) Date: Sat Jun 10 18:49:07 2006 Subject: [mp3togo] Decoding ogg: Failed. In-Reply-To: <20060611010456.GB30002@yahoo.com> References: <20060611010456.GB30002@yahoo.com> Message-ID: On 6/10/06, Mike wrote: > Hello list, Hi Mike, > I need some help debugging mp3togo-0.5.3. > > When I attempt to decode ogg files, the process fails. I was able to > find out what via ps aux |fgrep ogg123 what command is being executed. > When I run that command, I do not get any errors. > > I think the problem occurs after ogg123 completes execution...what's > the next step mp3togo takes? > > I was afraid this may be some problem with /tmp so I also tried with > -w ~/tmp and failed :( > > I'm using debian sarge and the mp3togo deb package from puddle.ca. > Would it make any difference if I installed the tar.gz ? I have had this very problem on my brother's machine also running sarge. Ubuntu users have reported similar problems with my Debian package. The package is built on my testing machine (etch). I suppose I should set up a build system on a sarge machine and offer a Debian Stable package as well. In the meantime, you could try the .tar.gz as that has been reported as working by the Ubuntu users. Another thing you could try is building your own .deb from the sources. You should be able to run 'debian/rules build-package' from the directory the tarball unpacks to. This is the method I used to build a lame package from source. I'll see if I can get my hands on a sytem running Stable to build the package on. I would be interested in hearing if it works for you. > $ /usr/bin/python -V > Python 2.3.5 > > Any suggestions? > Have a great weekend, You too, thanks for the report. > - Mike -- sim From ekkikrist at yahoo.com Sun Jun 11 01:22:12 2006 From: ekkikrist at yahoo.com (Mike) Date: Sun Jun 11 01:25:30 2006 Subject: [mp3togo] Decoding ogg: Failed. In-Reply-To: References: <20060611010456.GB30002@yahoo.com> Message-ID: <20060611082033.GA32030@yahoo.com> On Sat, Jun 10, 2006 at 06:46:48PM -0700, sim wrote: > I have had this very problem on my brother's machine also running > sarge. Ubuntu users have reported similar problems with my Debian > package. > > The package is built on my testing machine (etch). I suppose I > should > set up a build system on a sarge machine and offer a Debian > Stable > package as well. > > In the meantime, you could try the .tar.gz as that has been > reported > as working by the Ubuntu users. > > Another thing you could try is building your own .deb from the > sources. You should be able to run 'debian/rules build-package' > from > the directory the tarball unpacks to. This is the method I used > to > build a lame package from source. > > I'll see if I can get my hands on a sytem running Stable to > build the > package on. > > I would be interested in hearing if it works for you. > -- > sim I tried building the package with setup.py and with debian/rules ... both of them "failed" to decode ogg... Then I thought maybe it was python 2.3, so I installed python2.4 and python2.4-dev and tried again. It still doesn't work for me. mp3togo thinks that decoding ogg failed. What's it doing at that point? How is it checking for the wav file? - Mike From mjh at elsabio.demon.co.uk Mon Jun 12 15:25:47 2006 From: mjh at elsabio.demon.co.uk (Mark J Hewitt) Date: Mon Jun 12 15:33:51 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> Message-ID: <448DE9EB.9050203@elsabio.demon.co.uk> Sim, Sorry for delay - just got back from the US. I am trying out 0.5.3, and this is the log I see: [mjh@tardis workspace]$ mp3togo -o /workspace/resampled -v 9 -t .2go -d 3 /music/collection/classical/*/* ogg123 binary found at /usr/bin/ogg123 lame binary found at /usr/bin/lame faad binary found at /usr/bin/faad oggenc binary found at /usr/bin/oggenc normalize-audio binary not found mpg321 binary found at /usr/bin/mpg321 dcop binary found at /usr/bin/dcop flac binary found at /usr/bin/flac metaflac binary found at /usr/bin/metaflac Third party module: xmms is not available. Doing without Third party module: ogg.vorbis found Third party module: ID3 found 'normalize-audio' binary not found. Normalization disabled. mp3togo 0.5.3 or 'p' to pause, or 'q' to quit (1/668) /music/collection/classical/3_Gymnopedies_&_Other_Piano_Works/01-Satie,Erik=Gymnop?die_No._1=Pascal_Rog?.ogg: Creating dirs: Done. Decoding ogg: Done. 1s elapsed. Encoding mp3: 94% ##################Exception exceptions.UnicodeEncodeError: in > ignored Encoding mp3: Done. 12s elapsed. Tagging: Done. Total time this track: 14s (2/668) /music/collection/classical/3_Gymnopedies_&_Other_Piano_Works/02-Satie,Erik=Gymnop?die_No._2=Pascal_Rog?.ogg: Creating dirs: Done. Decoding ogg: Done. Encoding mp3: 88% Exception exceptions.UnicodeEncodeError: in > ignored Encoding mp3: Done. 10s elapsed. Tagging: Done. Total time this track: 11s (3/668) /music/collection/classical/3_Gymnopedies_&_Other_Piano_Works/03-Satie,Erik=Gymnop?die_No._3=Pascal_Rog?.ogg: Creating dirs: Done. Decoding ogg: Done. Encoding mp3: 94Exception exceptions.UnicodeEncodeError: in > ignored Encoding mp3: Done. 10s elapsed. Tagging: Done. Total time this track: 11s If you think it might help, I could send you one of these ogg files to see if you can reproduce the problem. I wonder if it may be because this is a 64 bit platform? Or perhaps because my locale is em_GB? Mark J Hewitt. sim wrote: > I have just posted mp3togo 0.5.1 > > This release adds a command line option '--no-tags' that disables file > tagging. The unicode exception thrown by ID3 is now caught, which will > prevent mp3togo from rolling back the track, but will not tag the > output file in case of error. > > This isn't exactly a bug fix, but it is more robust behaviour in the > face of failure. I'm not sure what I can do to properly fix this bug > as I'm not able to recreate it. With any luck, it will disappear in > the tagging subsystem overhaul. > > I hope this solves your problem Mark, or at least gets you listening > to your music. If not, please let me know. > > The new release is available from the website here: > http://puddle.ca/mp3togo/download.html > > From justus at ryoohki.net Mon Jun 12 15:46:46 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Mon Jun 12 15:49:18 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: <448DE9EB.9050203@elsabio.demon.co.uk> References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> Message-ID: <448DEED6.80808@ryoohki.net> Mark J Hewitt wrote: > If you think it might help, I could send you one of these ogg files to > see if you can reproduce the problem. > > I wonder if it may be because this is a 64 bit platform? > Or perhaps because my locale is em_GB? Doubtful but possible; most likely it is a problem somewhere in ID3.py. If you put the ogg up somewhere (yousendit.com as an example) then someone can take a look at it and verify the source of the problem. From justus at ryoohki.net Mon Jun 12 15:53:07 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Mon Jun 12 15:55:39 2006 Subject: [mp3togo] Decoding ogg: Failed. In-Reply-To: <20060611082033.GA32030@yahoo.com> References: <20060611010456.GB30002@yahoo.com> <20060611082033.GA32030@yahoo.com> Message-ID: <448DF053.2070108@ryoohki.net> Mike wrote: > doesn't work for me. mp3togo thinks that decoding ogg > failed. > > What's it doing at that point? How is it checking for > the wav file? I believe that it simply invokes ogg321 in a subprocess. When that subprocess exists it goes on to the next step. You could try instrumenting the tasks.py:Task.run code or putting a breakpoint in there and seeing what is going on. Presuming, of course, that you are comfortable with debugging code. Somewhere around line 286 there is an os.execvp which is where I think ogg321 is actually being invoked. You could check its return code, etc. From reallifesim at gmail.com Mon Jun 12 17:32:35 2006 From: reallifesim at gmail.com (sim) Date: Mon Jun 12 17:35:02 2006 Subject: [mp3togo] Decoding ogg: Failed. In-Reply-To: <20060611082033.GA32030@yahoo.com> References: <20060611010456.GB30002@yahoo.com> <20060611082033.GA32030@yahoo.com> Message-ID: Thanks for trying my suggestions Mike. I've got my brother's Debian Stable box set up for testing and I am able to recreate this bug. What is happening is the ogg123 subprocess is catching a signal from somewhere and dieing. I'm not sure why yet, but I'm hot on the trail. Interestingly, version 0.4.1 fails in the same way, but the decoded wav file is left behind in /tmp and on a second attempt at decoding the file it succeeds. Version 0.5.3 cleans up the temp file correctly and always fails. On my brother's machine this only happens with ogg input files, all other supported types work fine. I have only had reports of this bug on debian stable systems, it is possible it is a bug in the vorbis-tools package, but it is much more likely my bug. I'll try the ogg123 binary from my Etch machine and see if that works. I'll do my best to fix this up as soon as I can, this is a fairly serious issue. On 6/11/06, Mike wrote: > On Sat, Jun 10, 2006 at 06:46:48PM -0700, sim wrote: > > I have had this very problem on my brother's machine also running > > sarge. Ubuntu users have reported similar problems with my Debian > > package. > > > > The package is built on my testing machine (etch). I suppose I > > should > > set up a build system on a sarge machine and offer a Debian > > Stable > > package as well. > > > > In the meantime, you could try the .tar.gz as that has been > > reported > > as working by the Ubuntu users. > > > > Another thing you could try is building your own .deb from the > > sources. You should be able to run 'debian/rules build-package' > > from > > the directory the tarball unpacks to. This is the method I used > > to > > build a lame package from source. > > > > I'll see if I can get my hands on a sytem running Stable to > > build the > > package on. > > > > I would be interested in hearing if it works for you. > > -- > > sim > > I tried building the package with setup.py and with > debian/rules ... both of them "failed" to decode ogg... > > Then I thought maybe it was python 2.3, so I installed > python2.4 and python2.4-dev and tried again. It still > doesn't work for me. mp3togo thinks that decoding ogg > failed. > > What's it doing at that point? How is it checking for > the wav file? > > - Mike > -- sim From reallifesim at gmail.com Mon Jun 12 18:00:10 2006 From: reallifesim at gmail.com (sim) Date: Mon Jun 12 18:02:44 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: <448DE9EB.9050203@elsabio.demon.co.uk> References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> Message-ID: Hi Mark, Comments inline: On 6/12/06, Mark J Hewitt wrote: > Sim, > > Sorry for delay - just got back from the US. Nice, I hope you had a good trip. > I am trying out 0.5.3, and this is the log I see: > > [mjh@tardis workspace]$ mp3togo -o /workspace/resampled -v 9 -t .2go -d > 3 /music/collection/classical/*/* > ogg123 binary found at /usr/bin/ogg123 > lame binary found at /usr/bin/lame > faad binary found at /usr/bin/faad > oggenc binary found at /usr/bin/oggenc > normalize-audio binary not found > mpg321 binary found at /usr/bin/mpg321 > dcop binary found at /usr/bin/dcop > flac binary found at /usr/bin/flac > metaflac binary found at /usr/bin/metaflac > Third party module: xmms is not available. Doing without > Third party module: ogg.vorbis found > Third party module: ID3 found > 'normalize-audio' binary not found. Normalization disabled. > mp3togo 0.5.3 > > or 'p' to pause, or 'q' to quit > > (1/668) > /music/collection/classical/3_Gymnopedies_&_Other_Piano_Works/01-Satie,Erik=Gymnop?die_No._1=Pascal_Rog?.ogg: > Creating dirs: Done. > Decoding ogg: Done. 1s elapsed. > Encoding mp3: 94% ##################Exception > exceptions.UnicodeEncodeError: at 0x2aaaaecb4b90> in 0x2aaaaecb4a28>> ignored > Encoding mp3: Done. 12s elapsed. > Tagging: Done. > Total time this track: 14s > ---8<--- Rest of tracks snipped Hmm, I can see that the exception no longer stops the program, I fixed that at least. Does it produce output files? are they tagged? This is a bit of a head scratcher, as you are decoding ogg files, the ID3 object shouldn't even be instantiated until the tagging step. The tags are read from ogg files using the ogg.vorbis module and stored in an internal dictionary until it is time to write them out. This failure seems to be occuring during the decode step. Are you running an SMP or Dual core system? > If you think it might help, I could send you one of these ogg files to > see if you can reproduce the problem. That would be a big help, I'd be in much better shape if I could reproduce the problem. You are welcome to send one of the failing files to sim@puddle.ca > I wonder if it may be because this is a 64 bit platform? I thought those elapsed times seemed pretty small! I can't see that being a problem, but I could be wrong. The program uses a thread to monitor the subprocess, so it might be a concurrency issue, I've not written much threaded code, I wouldn't be surprised if I've screwed it up somehow. > Or perhaps because my locale is em_GB? I doubt this would be a problem. The unicode error seems to be a definite clue though. I had a quick look through the ID3 code when you first reported this bug, but nothing jumped out at me. > Mark J Hewitt. There is certainly something strange going on here. I'll study the code and see if I can figure out where this exceptional ID3 object is coming from. Things almost seem to be happening out of order here. Maybe you could try mp3togo with the new --no-tags option and see if that also fails. It's no solution, but it might provide more clues. I'd like to get this and the Debian Stable bug resolved before I continue work on the PyGTK front end. Oh, a few versions ago I switched the default --file-tag option to '.2go' from '-PORTABLE-' as it seemed much prettier, so you needn't use the -t option. Thanks again for the bug report Mark. > sim wrote: > > I have just posted mp3togo 0.5.1 > > > > This release adds a command line option '--no-tags' that disables file > > tagging. The unicode exception thrown by ID3 is now caught, which will > > prevent mp3togo from rolling back the track, but will not tag the > > output file in case of error. > > > > This isn't exactly a bug fix, but it is more robust behaviour in the > > face of failure. I'm not sure what I can do to properly fix this bug > > as I'm not able to recreate it. With any luck, it will disappear in > > the tagging subsystem overhaul. > > > > I hope this solves your problem Mark, or at least gets you listening > > to your music. If not, please let me know. > > > > The new release is available from the website here: > > http://puddle.ca/mp3togo/download.html > > > > > -- sim From reallifesim at gmail.com Mon Jun 12 20:10:28 2006 From: reallifesim at gmail.com (sim) Date: Mon Jun 12 20:12:56 2006 Subject: [mp3togo] Decoding ogg: Failed. In-Reply-To: References: <20060611010456.GB30002@yahoo.com> <20060611082033.GA32030@yahoo.com> Message-ID: Ok, I've sorted this one out. ogg123 was getting a SIGHUP somehow just before finishing decoding the file. I'm not exactly sure why, but I found a fix. I changed mp3togo to use oggdec (also part of the vorbis-tools package) instead of the more general ogg123. Everything works the same except now ogg files do not fail on Debian Stable systems (at least, not on mine). The new package (version 0.5.4) is available on the website: http://puddle.ca/mp3togo/dist Mike, please let me know if this does not work for you. Thanks, -- sim From reallifesim at gmail.com Mon Jun 12 20:13:19 2006 From: reallifesim at gmail.com (sim) Date: Mon Jun 12 20:15:52 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> Message-ID: Mark, I've changed the decoder that mp3togo uses to oggdec, this fixes a probably unrelated bug with Debian Stable systems, but could make a difference for you. The new version is 0.5.4 and is on the download page on the website. Please let me know if this works. -- sim From mjh at elsabio.demon.co.uk Thu Jun 15 13:46:56 2006 From: mjh at elsabio.demon.co.uk (Mark J Hewitt) Date: Thu Jun 15 13:54:35 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> Message-ID: <4491C740.6030102@elsabio.demon.co.uk> Sim, Well, I'm afraid 0.5.4 does not work. I have also ascertained that I have some ogg files that encode and tag successfully, and others that do not. I have also discovered that --index also fails in a similar way for those files that fail to tag, and this code is a little easier to trace through. Of course despite many more years than I'm going to admit in software development, I'm not particularly competent with python, but I'll learn it and see if I can find the problem. In the meantime, here are two small ogg files: one that succeeds and one that fails - I would be interested to see if the same happens for you. My current guess is that the accented character (? in this case) is not being handled correctly because maybe the code expects ASCII or something equally non-international when this is probably written to the ogg comments in UTF-8 or Unicode. (35/668) /music/collection/classical/Airs_de_Cour/18-Ballard,Robert=Entr?e_de_luth_-_instrumental=Catherine_King,Jacob_Heringman_,Charles_Daniels.ogg: Creating dirs: Done. Decoding ogg: Done. Encoding mp3: Done. 7s elapsed. Writing index: Failed. Cleaning up. Undo: Writing index Undo: Cleaning Undo: Encoding mp3 Undo: Decoding ogg Undo: Creating dirs Undo: Start Total time this track: 7s (36/668) /music/collection/classical/Airs_de_Cour/19-Ballard,Robert=Courante_-_instrumental=Catherine_King,Jacob_Heringman_,Charles_Daniels.ogg: Creating dirs: Done. Decoding ogg: Done. 1s elapsed. Encoding mp3: Done. 11s elapsed. Writing index: Done. Tagging: Done. Total time this track: 13s Mark sim wrote: > Mark, > I've changed the decoder that mp3togo uses to oggdec, this fixes a > probably unrelated bug with Debian Stable systems, but could make a > difference for you. > > The new version is 0.5.4 and is on the download page on the website. > > Please let me know if this works. > From justus at ryoohki.net Thu Jun 15 16:12:49 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Thu Jun 15 16:15:42 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: <4491C740.6030102@elsabio.demon.co.uk> References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> <4491C740.6030102@elsabio.demon.co.uk> Message-ID: <4491E971.4080407@ryoohki.net> Mark J Hewitt wrote: > My current guess is that the accented character (? in this case) is not > being handled correctly because maybe the code expects ASCII or > something equally non-international when this is probably written to the > ogg comments in UTF-8 or Unicode. The same thing happens here when I create an ogg with similar names. There are two problems both related to handling of unicode. I see below that you have --index turned on. Until mp3togo gets fixed you can work around the issue by removing --index from your invocation and adding --no-tags. Provided, of course, that you can live without id3 tags in your output files. Otherwise you'll have to wait :) The first problem is the index file that mp3togo can optionally generate, which can only handle ascii tags. Fixing this is probably just as simple as changing the couple of calls in tags.py that handle the index file to use python's unicode file open function: >>> import codecs >>> ifile = codecs.open(indexname, 'a', 'utf-8') I'm still looking into the second problem. > (35/668) > /music/collection/classical/Airs_de_Cour/18-Ballard,Robert=Entr?e_de_luth_-_instrumental=Catherine_King,Jacob_Heringman_,Charles_Daniels.ogg: > > Creating dirs: Done. > Decoding ogg: Done. > Encoding mp3: Done. 7s elapsed. > Writing index: Failed. Cleaning up. > Undo: Writing index > Undo: Cleaning > Undo: Encoding mp3 > Undo: Decoding ogg > Undo: Creating dirs > Undo: Start > Total time this track: 7s From reallifesim at gmail.com Thu Jun 15 16:23:11 2006 From: reallifesim at gmail.com (sim) Date: Thu Jun 15 16:26:02 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: <4491C740.6030102@elsabio.demon.co.uk> References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> <4491C740.6030102@elsabio.demon.co.uk> Message-ID: Thanks Mark, On 6/15/06, Mark J Hewitt wrote: > Sim, > > Well, I'm afraid 0.5.4 does not work. I wasn't really expecting it to, just hoping. I've reproduced the problem with the sample files. I don't have much time to look at it tonight, but I should be able to fix it now that I can recreate the bug. With a bit of luck, I'll have something for you in the next couple of days. -- sim From justus at ryoohki.net Thu Jun 15 16:42:55 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Thu Jun 15 16:45:59 2006 Subject: [mp3togo] Re: mp3togo 0.5.0 In-Reply-To: <4491E971.4080407@ryoohki.net> References: <4478801B.7020709@elsabio.demon.co.uk> <447945EA.3030707@elsabio.demon.co.uk> <448DE9EB.9050203@elsabio.demon.co.uk> <4491C740.6030102@elsabio.demon.co.uk> <4491E971.4080407@ryoohki.net> Message-ID: <4491F07F.9020804@ryoohki.net> Justus Pendleton wrote: > >>> import codecs > >>> ifile = codecs.open(indexname, 'a', 'utf-8') > > I'm still looking into the second problem. This is more of the same, only within ID3.py. mp3togo could either convert the tags before giving them to ID3.py or fix ID3.py to open the mp3 file with the convert library. From reallifesim at gmail.com Mon Jun 26 19:56:12 2006 From: reallifesim at gmail.com (sim) Date: Mon Jun 26 20:04:07 2006 Subject: [mp3togo] mp3togo 0.5.5 released. Unicode issue resolved. Message-ID: Mark and List, I've changed mp3togo to use the eyeD3 tagging library in preference to ID3. The eyeD3 library is a fair bit newer and handles the Unicode tags properly. I've also incorporated Justus' fix to the index file function, it now writes Unicode to the index file properly. The Debian package will install python-eyeD3 if it is not already present. Users of the tarball will have to install it themselves. It is available here: http://eyed3.nicfit.net/ Mark, the sample files you sent me now work properly on my system. Please let me know if you have any more trouble. Sorry for the delay in fixing this, it only took a few hours, but I got an old motorbike two weeks ago and much of my free time since has been spent getting black under the fingernails, making my apartment smell like old gear oil and burning up lots of highway miles. I have squashed quite a few bugs with my helmet visor though. Thanks, -- sim From mjh at elsabio.demon.co.uk Wed Jun 28 03:01:48 2006 From: mjh at elsabio.demon.co.uk (Mark J Hewitt) Date: Wed Jun 28 03:09:39 2006 Subject: [mp3togo] Re: mp3togo 0.5.5 released. Unicode issue resolved. In-Reply-To: References: Message-ID: <44A2538C.20902@elsabio.demon.co.uk> Sim, Yep, Unicode tags now work - thanks. I've still seen a few failures - I'll see if I can figure those out myself. When I was a student, we had a house where the front door opened into the front room, followed by a short corridor through to the back room. A UK terraced house, if that means anything to you! That front room usually had at least one and sometimes three reclining motorbikes, always trays of sump oil and "spare parts" everywhere. Ah! That brings back memories! Mark. sim wrote: > Mark and List, > I've changed mp3togo to use the eyeD3 tagging library in preference to > ID3. > > The eyeD3 library is a fair bit newer and handles the Unicode tags > properly. I've also incorporated Justus' fix to the index file > function, it now writes Unicode to the index file properly. > > The Debian package will install python-eyeD3 if it is not already > present. Users of the tarball will have to install it themselves. It > is available here: > > http://eyed3.nicfit.net/ > > Mark, the sample files you sent me now work properly on my system. > Please let me know if you have any more trouble. > > Sorry for the delay in fixing this, it only took a few hours, but I > got an old motorbike two weeks ago and much of my free time since has > been spent getting black under the fingernails, making my apartment > smell like old gear oil and burning up lots of highway miles. > > I have squashed quite a few bugs with my helmet visor though. > > Thanks, > From mjh at elsabio.demon.co.uk Wed Jun 28 15:00:04 2006 From: mjh at elsabio.demon.co.uk (Mark J Hewitt) Date: Wed Jun 28 15:07:58 2006 Subject: [mp3togo] Re: mp3togo 0.5.5 released. Unicode issue resolved. In-Reply-To: References: Message-ID: <44A2FBE4.2090908@elsabio.demon.co.uk> Sim, A couple of trivial fixes in about the same number of lines: 1) Ogg files with no GENRE comment were not tagged 2) a divide by zero error 3) A symbol reference error to "time". diff mp3togo/conf.py~ mp3togo/conf.py 23c23,25 < import sys, os --- > import sys > import os > import time 277c279 < for i in range(5): --- > for i in range(1, 6): diff mp3togo/tags.py~ mp3togo/tags.py 106c106,107 < self._tags = copytags(info) --- > self._tags = copytags(info) > self._tags['GENRE'] = [self._tags['GENRE'] or ''] Mark sim wrote: > Mark and List, > I've changed mp3togo to use the eyeD3 tagging library in preference to > ID3. > > The eyeD3 library is a fair bit newer and handles the Unicode tags > properly. I've also incorporated Justus' fix to the index file > function, it now writes Unicode to the index file properly. > > The Debian package will install python-eyeD3 if it is not already > present. Users of the tarball will have to install it themselves. It > is available here: > > http://eyed3.nicfit.net/ > > Mark, the sample files you sent me now work properly on my system. > Please let me know if you have any more trouble. > > Sorry for the delay in fixing this, it only took a few hours, but I > got an old motorbike two weeks ago and much of my free time since has > been spent getting black under the fingernails, making my apartment > smell like old gear oil and burning up lots of highway miles. > > I have squashed quite a few bugs with my helmet visor though. > > Thanks, > From gedik at pronas.dnip.net Wed Jun 28 13:17:10 2006 From: gedik at pronas.dnip.net (Lukas Grygera) Date: Wed Jun 28 20:15:33 2006 Subject: [mp3togo] File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap Message-ID: <200606282217.10933.gedik@pronas.dnip.net> Any idea where is problem? ~ $ mp3togo -o /tmp -v 5 --no-normalize /mnt/fat/mp3/pajamix/Offspring/Offspring\ -\ Americana.mp3 ogg123 binary found at /usr/bin/ogg123 lame binary found at /usr/bin/lame faad binary found at /usr/bin/faad oggenc binary found at /usr/bin/oggenc normalize-audio binary not found mpg321 binary found at /usr/bin/mpg321 dcop binary found at /usr/kde/3.5/bin/dcop flac binary found at /usr/bin/flac metaflac binary found at /usr/bin/metaflac Third party module: xmms is not available. Doing without Third party module: ogg.vorbis found Third party module: ID3 found mp3togo 0.5.5 or 'p' to pause, or 'q' to quit (1/1) /mnt/fat/mp3/pajamix/Offspring/Offspring - Americana.mp3: Creating dirs: Done. Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap self.run() File "/usr/lib/python2.4/threading.py", line 422, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.4/site-packages/mp3togo/task.py", line 226, in eatout wpid, status = os.waitpid(pid, os.WNOHANG) OSError: [Errno 10] No child processes my OS: Portage 2.1-r1 (default-linux/x86/no-nptl, gcc-4.1.1, glibc-2.3.6-r4, 2.6.16-suspend2-r7 i686) ================================================================= System uname: 2.6.16-suspend2-r7 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.6.15 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: 0.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 Best regards Lukas From reallifesim at gmail.com Wed Jun 28 20:53:24 2006 From: reallifesim at gmail.com (sim) Date: Wed Jun 28 21:01:30 2006 Subject: [mp3togo] Re: mp3togo 0.5.5 released. Unicode issue resolved. In-Reply-To: <44A2FBE4.2090908@elsabio.demon.co.uk> References: <44A2FBE4.2090908@elsabio.demon.co.uk> Message-ID: Mark, I'm glad mp3togo is working better for you. Thanks a lot for the fixes. They are in the pipeline for release. I have another bug report to try and fix and I'll get a new version out. Where are you getting these files? Firefox crashed twice trying to download the sample you sent me. Mozilla finally managed it. I guess my computer is not very well internationalized. On 6/28/06, Mark J Hewitt wrote: > A couple of trivial fixes in about the same number of lines: > > 1) Ogg files with no GENRE comment were not tagged On my machine setting the GENRE to "" wasn't enough. I changed the default value to 'Other' and that worked. > 2) a divide by zero error This was a stupid mistake on my part, thanks for catching it. > 3) A symbol reference error to "time". Another dumb mistake, again thanks. -- sim From justus at ryoohki.net Wed Jun 28 21:01:17 2006 From: justus at ryoohki.net (Justus Pendleton) Date: Wed Jun 28 21:09:44 2006 Subject: [mp3togo] File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap In-Reply-To: <200606282217.10933.gedik@pronas.dnip.net> References: <200606282217.10933.gedik@pronas.dnip.net> Message-ID: <44A3508D.6070405@ryoohki.net> Lukas Grygera wrote: > (1/1) /mnt/fat/mp3/pajamix/Offspring/Offspring - Americana.mp3: > Creating dirs: Done. > Exception in thread Thread-1: > Traceback (most recent call last): > File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap > self.run() > File "/usr/lib/python2.4/threading.py", line 422, in run > self.__target(*self.__args, **self.__kwargs) > File "/usr/lib/python2.4/site-packages/mp3togo/task.py", line 226, in eatout > wpid, status = os.waitpid(pid, os.WNOHANG) > OSError: [Errno 10] No child processes This is usually what happens when the pid doesn't exist. Perhaps mpg321 died before mp3togo got around to the waitpid? What happens when you run mpg321 -v -w /tmp/tmp.wav ..../Americana.mp3 From reallifesim at gmail.com Wed Jun 28 21:32:07 2006 From: reallifesim at gmail.com (sim) Date: Wed Jun 28 21:40:11 2006 Subject: [mp3togo] File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap In-Reply-To: <200606282217.10933.gedik@pronas.dnip.net> References: <200606282217.10933.gedik@pronas.dnip.net> Message-ID: On 6/28/06, Lukas Grygera wrote: > Any idea where is problem? [error message snipped] Hi Lukas, Thanks for your interest in mp3togo. Could you try a couple of things for me? First, try to run mpg321 by hand to see if it can decode the mp3 on your system: $ mpg321 -v -w /tmp/test.wav /mnt/fat/mp3/pajamix/Offspring/Offspring\ -\ Americana.mp3 If that works, start your python interpreter and check the output of os.uname(): $ python Python 2.3.5 (#2, Mar 6 2006, 10:12:24) [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> print os.uname()[0] Linux If you get something other than 'Linux' as output, please let me know what it is. Otherwise, could you send me a copy of the failing file? If I can reproduce the problem, I might be able to solve it. Do all files fail for you or is it just this one? Thank you, -- sim From reallifesim at gmail.com Wed Jun 28 23:36:41 2006 From: reallifesim at gmail.com (sim) Date: Wed Jun 28 23:44:46 2006 Subject: [mp3togo] mp3togo 0.5.6 released Message-ID: I've released mp3togo version 0.5.6 This fixes a problem with input ogg files that have no genre tags. Also fixed is a divide by zero error and a symbol error in a printing routine. Thanks to Mark Hewitt for the report and fixes. -- sim