dready92 / 10er10

One good thing about music, when it hits you feel no pain
58 stars 11 forks source link

Files with non-ASCII characters in tags #5

Closed omigeot closed 13 years ago

omigeot commented 13 years ago

Whenever I try to upload (MP3) files with non-ASCII stuff within their ID3 tags, it ends up with a crude "Service Unavailable" on the upload page.

It might be related to taginfo, but I don't know where to look for answers.

dready92 commented 13 years ago

That's weird ! Can you do the test : upload the mp3 file somewhere on the 10er10 server, and issue the command :

taginfo /path/to/file.mp3 | utrac -t UTF-8 > tags.txt

Now open tags.txt in a powerfull text editor : does it tell you the file is in UTF-8 ? Do you have strange characters ?

Regards,

Mickael

omigeot commented 13 years ago

Woaw, seems my "anwser-by-email" just hadn't reach github. So here's the summary : I got a segfault, which seems related to charset-recognition. When I hint utrac about the input charset ('-f LATIN1') it works well.

I'm using utrace 0.3 compiled for Debian Squeeze 64bits.

dready92 commented 13 years ago

Cool so I can bugfix it !

Can you please replace the node/audioFileUtils.js with this one :

https://gist.github.com/957115

and send me the console log when you try to upload your mp3 to 10er10 ? You'll see the lines that are interesting after Please send me those linses :.

Mickael

omigeot commented 13 years ago

Here it is: https://gist.github.com/2fa3c94dd1bdd2979616 (and afterwards, a bunch a "debug" related lines).

dready92 commented 13 years ago

Can you retry with this audioFileUtils.js file ? I added a second pass in case of segfault...

https://gist.github.com/957161

Regards,

Mickael

omigeot commented 13 years ago

It worked on my usual test file (and some others), but I still managed to find one that fails. Is anything interesting supposed to end up in the console, with this version?

dready92 commented 13 years ago

Do you see lines like:

debug JOB: emit fileMeta:complete
debug sending errorResponse 503
debug { stack: [Getter/Setter],
  arguments: undefined,
  type: undefined,
  message: 'Command failed: Segmentation fault\n',
  killed: false,
  code: 139,
  signal: null }

(of course not necessary with the same "message"...) ?

omigeot commented 13 years ago

Yup. Message is "Command failed: TagLib: MPEG::Header::parse() -- Invalid sample rate.\nSegmentation fault\n"

dready92 commented 13 years ago

ouhahou, yet another problem... In this case the only workaround I got is recording the file without any meta-data...

Please test with https://gist.github.com/957271

Mickael

dready92 commented 13 years ago

On a side note, and if you got time and you're willing to help : can you try your problematic mp3s with google chrome on this app :

http://antimatter15.github.com/player/player.html

If you tell me it extract correctly the tags I will think about including the code.

Regards,

Mickael

omigeot commented 13 years ago

It doesn't extract correctly, but it degrades more or less gracefully : problematic characters are just left out (instead of the whole metadatas).

(and since my previous answer probably got lost : your latest javascript file did the trick : files are loaded ok, just without metadata. As intended)

Regards,

dready92 commented 13 years ago

Ok, cool for the fix and really thanks for the testing !

Regards,

Mickael