Bugzilla – Bug 7963
Bitrate limiting does not work with non-latin files
Last modified: 2009-07-31 10:20:05 UTC
Created attachment 3284 [details] Server log file When trying to play a flac track with non-latin characters in its name (cyrillic), the streaming fails if the player is configured for bitrate limiting. If the same flac file is renamed to some latin-only name, the streaming works. If the original file is played on a player with no bitrate limiting configured, it also works. Server log file is attached (with player.source debug enabled). The version is: SqueezeCenter Version: 7.0.1 - 18806 @ Wed Apr 16 00:21:43 PDT 2008 - Windows Server 2003 - EN - cp1251 Server IP address: 192.168.11.6 Perl Version: 5.8.8 MSWin32-x86-multi-thread MySQL Version: 5.0.22-community-nt
Reproduced on Mac OS X as well. Would this one be for you Michael?
very likely related to bug 7815 - transcoders don't work with non-latin stuff. Never got an answer on the other bug.
Yuly/Steven - could you please give the following patch a try? Index: /Users/mh/Documents/workspace/trunk/server/Slim/Player/TranscodingHelper.pm =================================================================== --- /Users/mh/Documents/workspace/trunk/server/Slim/Player/TranscodingHelper.pm (revision 19159) +++ /Users/mh/Documents/workspace/trunk/server/Slim/Player/TranscodingHelper.pm (working copy) @@ -19,6 +19,7 @@ use Slim::Utils::Misc; use Slim::Utils::OSDetect; use Slim::Utils::Prefs; +use Slim::Utils::Unicode; our %commandTable = (); our %binaries = (); @@ -342,7 +343,10 @@ if ( $command =~ /mov123/ && $fullpath =~ /^http/ ) { $filepath = $fullpath; } - + + $filepath = Slim::Utils::Unicode::utf8decode_locale($filepath); + $fullpath = Slim::Utils::Unicode::utf8decode_locale($fullpath); + $command =~ s/\$FILE\$/"$filepath"/g; $command =~ s/\$URL\$/"$fullpath"/g; $command =~ s/\$RATE\$/$sampleRate/g;
Did not work for me:(
what's your locale?
CP-1251
Steven would you see if the patch works for you?
The patch is working for me on OSX, but not on Windows. I don't know what's wrong here, have tested any conversion possible, but somehow it just doesn't work :-(.
Michael, could it not working on Windows be related to the 8.3 name equivalents function enabled for bug 2475?
Just spent a few hours on this bug, but 8.3 didn't come to my mind... thanks for the hint - will give it a try!
Yuly - as you're on Windows, could you please give the following patch a try? Index: D:/eclipse/trunk/server/Slim/Player/TranscodingHelper.pm =================================================================== --- D:/eclipse/trunk/server/Slim/Player/TranscodingHelper.pm (revision 19226) +++ D:/eclipse/trunk/server/Slim/Player/TranscodingHelper.pm (working copy) @@ -342,7 +342,12 @@ if ( $command =~ /mov123/ && $fullpath =~ /^http/ ) { $filepath = $fullpath; } - + + if (Slim::Utils::OSDetect::OS() eq 'win') { + require Win32; + $filepath = Win32::GetShortPathName($filepath); + } + $command =~ s/\$FILE\$/"$filepath"/g; $command =~ s/\$URL\$/"$fullpath"/g; $command =~ s/\$RATE\$/$sampleRate/g; This is basically using 8.3 filenames instead of the full names which is working around non-latin character issues. Seems to be working for me.
Works for me too! Thanks!
Wow, thanks for the quick feedback - only had time to get lunch :-). Change 19234 - utf8decode non-latin file names on non-Windows systems, or use the DOS 8.3 name on Windows instead
Verified fixed in 7.0.1 - 19251
Michael - this fix breaks transcoding of remote streams which use $FILE$ in their transcoding command (I expect mov123, wmadec and know alien) I suggest we only do the file munging if $filepath is a local file. Can you test your problem cases for this. See forums http://forums.slimdevices.com/showthread.php?t=47039&page=4
Created attachment 3322 [details] only manipulate local file names/paths Triode - can't test this, as AlienBBC doesn't work on this box (for whatever reason). Would it work for you?
I don't have a windows system to test on either at present, but I believe it will fix the problem. Assuming it fixes your original problem then I suggest committing it.
change 19421 - do not munge remote stream URLs, but only change when playing local media files
Verified Fixed with SqueezeCenter Version: 7.0.1 - 19422
Bitrate limiting is broken again with accented characters after change 19663 for bug 8118 on Mac OS X. Will test with Win XP.
With a fresh install of SqueezeCenter 7.0.1 I am no longer able to reproduce on Mac OS X. Even going back and doing a fresh install of a version before change 19234 I am no longer able to reproduce. I'm stumped.
Closing again since I can no longer reproduce but will keep an eye on it.
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1 Please try that version, if you still see the error, then reopen this bug. To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html
Reduce number of active targets for SC