pacpl can't handle double-quote characters in title tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pacpl (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: pacpl
While using pacpl to convert a batch of .flac files to .m4a, I noticed it failing on a randomly-selected set of music files. Closer examination revealed that they were all classical music pieces whose tags I had gotten from MusicBrainz, and that the files that were failing were the pieces whose title contained double-quotes with a space character inside them. For example, the Mozart album at http://
...
Track 7: Mass No. 15 for Soloists, Chorus & Orchestra in C major, K. 317 "Coronation Mass": VI. "Agnus Dei"
Track 8: Missa solemnis No. 16 for Soloists, Chorus & Orchestra in C major, K. 337: I. "Kyrie"
...
After much poking at the problem, I have figured out what is happening. After decompressing the .flac files to .wav, pacpl is calling the following commands to encode the M4A files:
For track 7:
faac --title "Mass No. 15 for Soloists, Chorus & Orchestra in C major, K. 317 "Coronation Mass": VI. "Agnus Dei"" --track "7" --artist "Wolfgang Amadeus Mozart" --album "Masses: Mass in C minor K. 427, Coronation Mass in C major K. 317, Missa Solemnis in C major K. 337, Kyrie in D minor K. 341 (Kölner Kammerchor & Collegium Cartusianum feat. conductor: Peter Neumann)" --comment "" --year "1990-01-01" --genre "Classical" -w -q 100 "/home/
For track 8:
faac --title "Missa solemnis No. 16 for Soloists, Chorus & Orchestra in C major, K. 337: I. "Kyrie"" --track "8" --artist "Wolfgang Amadeus Mozart" --album "Masses: Mass in C minor K. 427, Coronation Mass in C major K. 317, Missa Solemnis in C major K. 337, Kyrie in D minor K. 341 (Kölner Kammerchor & Collegium Cartusianum feat. conductor: Peter Neumann)" --comment "" --year "1990-01-01" --genre "Classical" -w -q 100 "/home/
Track 8 works, but track 7 fails with the error message "Cannot encode several input files to one output file."
Because the double-quotes in the title string aren't quoted or backslash-escaped, the shell sees them as the end of the title string. If the double-quote characters contain just a single word (as in track 8, where it's the word "Kyrie") then this doesn't matter, as the shell still sees that whole title (from "Missa solemnis" to the word "Kyrie") as a single string. But in track 7, the parameter "Mass No. 15 for Soloists, Chorus & Orchestra in C major, K. 317 "Coronation Mass": VI. "Agnus Dei"" gets interpreted by the string as:
First parameter: "Mass No. 15 for Soloists, Chorus & Orchestra in C major, K. 317 "Coronation
Second parameter: Mass": VI. "Agnus
Third parameter: Dei""
And thus, faac thinks it's being asked to encode several input files (one file called Mass": VI. "Agnus and another file called Dei"") with just a single output file, and so it gives up.
Since the original files that triggered this bug for me are copyrighted, I can't upload them here. I have, however, managed to reproduce this bug using a .flac file I created myself (from a Creative-Commons licensed file downloaded from www.freesound.org), so I'll upload that file to this bug report so that the bug can be reproduced.
Changed in pacpl (Ubuntu): | |
status: | New → Confirmed |
Audio source for those two .flac files is the sound sample from http:// www.freesound. org/samplesView Single. php?id= 983. The only difference between the two files is the title tag; everything else should be identical.