Bugzilla – Bug 2985
WMA transcoded to WAV truncated (not gapless)
Last modified: 2009-09-08 09:30:54 UTC
WMA VBR files transcoded to WAV for streaming are truncated by a fraction of a second. I'm not sure if this only happens when there is another track in the playlist or not. It happens on both the Squeezebox and Softsqueeze.
"Before you file a new bug, please do the following: 1. Try the latest stable nightly build of SlimServer and see if the bug is still there. " this is filed as 6.2.1, have you tried 6.2.2? also, let us know if you do find a difference when the song is followed by another song, or set to stop at the end of that song.
Yes, I have tried 6.2.2. It is still broken. In fact on my setup (even wired) 6.2.2 doesn't fill its buffer properly so its completely unusable but even ignoring that its still got this bug. I'll have to get back to you about what happens when its set to stop at the end of a track when I have another weekend to waste.
thanks. can you also attach the file that best highlights this bug for your case?
Created attachment 1142 [details] Track A only (first time)
Created attachment 1143 [details] Track A (second time)
Created attachment 1144 [details] Track A and Track B (some audio is missing)
Created attachment 1145 [details] Track A and Track B (as it should be)
The actual track in question would also be useful, since it will be needed to replicate the bug and verify a fix.
Sam - can you attach one of the WMA files in question to this bug? Thanks.
More from Sam: Okay, I've uploaded the two files. You have to look pretty carefully at the track change. These tracks are the same ones I used to produce the screenshots (attached to bugzilla posting). You might find the trace is flipped vertically (negated). No idea why. These files also show up bug 2944 where dropouts appear in the audio when streamed native to the Squeezebox (despite 100% buffer fullness).
Created attachment 1224 [details] Test files from Sam
Richard - I think this is right up your alley.
We are starting to theorize that this may be the same as bug 2095. It can be unmarked as a dupe if that turns out to not be the case. *** This bug has been marked as a duplicate of 2095 ***
I am not sure what we were smoking in that meeting, but there are enough comments in bug 2095 that this decision now seems insane to me. However it probably IS a dupe of bug 3926 that Kevin put in yesterday.
*** Bug 3926 has been marked as a duplicate of this bug. ***
But since ths is a transcoding problem, should it really be assigned to you, Richard?
Well Chris as I know nothing about how the transcoding works in slimserver, I'd suggest that I am not the right person for this one :)
Here are sample files from Bug 3926. There are 2 WMA Lossless files and 2 FLAC files, which were created using the same conversion command SlimServer uses. The FLAC files are truncated. This points to a bug within wmadec.
Created attachment 1459 [details] 2 WMA Lossless and 2 FLAC transcoded from the WMA files
Dean, to whom should this bug be assigned?
Is this a Squeezebox1 or 2/3? WMA VBR should be decoded natively on SB2/3. If it's a SB1 issue, then the problem is in wmadec.
AFAIK this bug is specifically about transcoding, so it is a problem with wmadec.
Any update on this bug? It is making my 300GB worth of WMA useless as it consists mostly of classical music... If anyone needs more samples, I will be very happy to provide.
WSLam - are you using an SB1, or SB2/3 devices? Do you have an option in Settings -> File Types for: WMA (built-in) ? If so, WMA will be decoded natively on the Squeezebox. Thanks
I believe WS is using WMA Lossless... WS--can you confirm?
(In reply to comment #24) > WSLam - are you using an SB1, or SB2/3 devices? > > Do you have an option in Settings -> File Types for: > > WMA (built-in) ? > > If so, WMA will be decoded natively on the Squeezebox. > > Thanks > I am using SB3 now. Under File Types, as suggested in a forum thread, I have already tried diff settings. As long as I can get sound, then something get cut off. I have tried diff combination already. Am I right to say that you guys still don't know what is going on? And yes, I am using WMA Lossless.
Created attachment 1484 [details] screenshot showing workaround settings WS, I was able to get perfect playback of the files from the original poster by setting Slimserver -> Server Settings -> File Types as shown in the attached screenshot. But you say this doesn't work for you? That's very unusual, because using the default settings (for instance, with the Windows Media FLAC wmadec/flac box checked) the "wmadec" program running on the PC is doing the WMA decoding, but if you use the workaround in my screenshot, the Squeezebox firmware is doing the decoding. Even my proposal works for you, this still indicates a real bug in our wmadec program, which I am easily able to reproduce, but its priority will be lower since a workaround exists. If this workaround definitely does not work for you, could you please upload a couple of sample files that illustrate the bug? It is likely to be a caused by a different problem than Sam was encountering.
Andy points out to me that the files from Sam are NOT lossless, and that lossless decoding is not supported in the firmware.
Christopher, Following the settings you provided in your screenshot, like Sam has told you, does not work. WMA Lossless files do not play.
I urge you guys to try out the first samples I submitted. I know the music is not to everyone's taste, but the two consecutive files clearly demonstrates how the last moments of track 1 got cut off and then went onto track 2. The 'orignal' correct version can be heard by converting the WMA Lossless files to FLAC. You have all the info you need to attack this bug.
It's now clear to me there are several issues here. 1) the firmware decoder does not support wma lossless (bug 2565). 2) wmadec, which is the program that transcodes WMA files for Slimserver, doesn't decode properly. I can reproduce this bug here. This kind of bug is often referred to as a problem with "gapless" playback, and I've edited the summary to make it easier to search for, and to remove the mention of VBR. This bug seems to affect all kinds of WMA files. 2a) for customers wanting to listen to WMA lossy files, there is a workaround: switch to using the player's built-in decoder by using the workaround I describe in comment 27. The original poster of this bug falls into this category. 2b) for customers wanting to listen to WMA lossless files, there is still a bug, and I agree it is 'major'.
I think Chris' summary is correct. The issue is with WMA Lossless. Who would be the person to assign to fix this bug?
WS - I have a possible fix for this issue. Are you comfortable editing files, or should I put this in a nightly for you to test? Thanks.
Created attachment 1507 [details] New compile of wmadec.exe Ok - I've attached a new wmadec.exe Additionally, you'll need to edit the 'covert.conf' file. Everywhere you find wmadec, add -w to the command line. Write out the file, and restart SlimServer.
ping
It's much better in the sense that there's clearly not a big chunk of song missing, but there's still a bad 'pop' at the transition between the tracks. I'll have a closer look to try to determine cause of the pop more clearly. Also: 1) Scanning doesn't work. This could be considered a regression of bug 3643. Hitting FWD mutes the sound and the display says 2x or 4x or whatever, but the progress bar doesn't move forward, and no sound is heard. When I hit 'play' to return to playing mode the song does not continue playing. If I hit 'play' a second time, playback begins. If I do this, the time display gets messed up as well. At the end of the track, the display will show -00:00 seconds remaining for a while until the track actually ends. Let me know if you want me to reopen 3643. 2) I noticed a strange noise (like a decompression artifact) and playback stopped at one point and did not advance to the next track.
Looking at a recording of the played-back audio, there is still a chunk of audio missing. Looks like very close to .035 sec (1549 +/- 1 samples)
Subject: Re: WMA transcoded to WAV truncated (not gapless) Ok - that's about the same as I saw too. It seems to be hit-and-miss, as sometimes the decoded output is bit-perfect, other times the tail end is chopped off. I may build wmadec with the latest Windows Media SDK to see if that makes a difference.
I just had another look at the original WMADEC, and it looks like that bad boy threw out a whopping quarter of a second, so whatever you did has made a big improvement. (11000 samples down to 1549 samples) But it's not quite enough.
just for my notes since the files aren't versioned: the old wmadec.exe was 57344 bytes. The new wmadec.exe that I tested with was 98304 bytes.
Unfortunately I've not been able to make any progress on this - I'll be doing some more tests & debugging after 6.5.0 is released.
(In reply to comment #40) > just for my notes since the files aren't versioned: the old wmadec.exe was > 57344 bytes. The new wmadec.exe that I tested with was 98304 bytes. > The copy of wmadec I have in my 6.50 installation folder is only 56k... so that is the OLD version! Where can I get the new one? I am having a LOT of problems with WMA Lossless (which is ALL I have). On top of the end of the track being cut off. I am not sure if it is appropriate to add other symptoms that I believe are also related to WMA here... I have been emailing with support about another problem: I just went through more deductions to try to nail down the problem. It surely is happening, randomly but never fails to happen. Two problems (ONLY with WMA Lossless, when I convert to FLAC, the problems disappear) A) Music just stops, usually with a leading burst of pink noise B) Ocassional burst of pink noise This is what I have observed. 1) I enabled the Show Buffer Fullness meter, so I can make sure the SB3 is not running out of data. And it's not. Buffer showed 100% when music stopped. 2) Simultaneously, I was watching the Server PC. Network connection is stable. No disconnection. 3) The DAC did not drop signal... because a) the DAC has a 'lock' light and it remained 'on' when the music stops. b) I looked at the Spectrum Analyzer, and surely enough, the analyzer stops jumping around. 4) Hitting Play again on the remote rebuffers the song and the SB3 starts to play again. 5) I still get ocassional burst of white noise in the middle of a song. Again, I checked the buffer meter, and it's always full, or at like 96 to 98% range. This is *on top* of the end of the songs being cut off. If my diagnosis is correct, I hope that wmadec gets fixed as a top priority! Thanks.
I checked my version of wmadec after seeing Chris has a new compilation of the wmadec.exe. Very odd. My version of wmadec.exe is dated 2005 Nov 14, File size is 56kB. I immediately asked my friend and see the file size and date of his 6.3.1 installation. His version is also 56kB, but it is dated July 17, 2006. I am now trying out Chris's 96kB version. Will report. Question is how did the 14 Nov 2005 version got into my computer and why wasn't it overwritten when I upgraded to 6.50?
The dates on files often get "touched" or changed to the current date depending on how the files were moved on to your machine. This is due to fact that the date is something the operating system (or rather, the filesystem) keeps track of. That information is not in the data of the file. So WMADEC files that are 57344 bytes (you can get the exact size by right-clicking on the file and selecting "properties") are going to be the older version, no matter what the date says. Since the fix Dan made didn't solve the problem 100% and we were already into the testing cycle for 6.5.0, we decided not to include the new WMADEC attached to this bug. I know Dan is continuing to work on this problem, and he'll update the bug with his progress.
I have tried the new 96kB wmadec and the one that comes with 6.5. *all the problems* I described still persist: 1) random burst of pink noise. very random. I usually hear it once over a 30 to 60 mins duration 2) musics stops. again, random. the longest it went for without stopping is about 2 hours for me. but it always stop at some point. 3) end of songs cut off. this always happen. not random.
I have done another 10+ hours of testing. With a clean install of 6.5, and Chris's new wmadec.exe, I can play close to 180mins (if I am lucky) before the music stops. Please note that my music are usually very long, not the usual 3 mins songs. I have WMAL files up to 45 mins... Anyway, if it matters at all, my SS is running on a AMD machine.
Created attachment 1574 [details] wma dec compiled against WMSDK 11 WS - Can you try this copy of wmadec? Thanks
(In reply to comment #47) > Created an attachment (id=1574) [edit] > wma dec compiled against WMSDK 11 > > WS - Can you try this copy of wmadec? Hi Dan, Just tried the latest wmadec. 1) The random burst of pink noise seems to be happening less. But still happens. very rarely, maybe once every 45 mins or so. I am just letting music play in the bkg, so this is not very scientific. 2) I managed to play for about 2 hours without stop. But yes, it still stops. 3) The end of the track is still chopped off, no difference from before. I rebooted the machine after I copy the new copy of wmadec just to make sure it's not loaded in memory and is still running off the old wmadec. Question, could this be a problem other then wmadec? Because I clearly recalled this NOT being a problem when I first got into SB2/SB3. Has the FLAC enc been modified? Or is there a component that controls how the wmadec works with the FLAC encoder?
I realized the previous examples are too long... so I am attaching two consecutive files that should be played continuously. These are much shorter... When part01 goes to part02, you will clearly hear something is missing in the WMA version. Whereas, the FLAC version (included), is fine.
Created attachment 1576 [details] WMA Lossless + FLAC of the same tracks
It is possible that the problem is something other than wmadec.exe Out of curiosity, how many WMA Lossless files do you have? I'm still looking into this.
Created attachment 1597 [details] New working wmadec.exe WS - Try this wmadec.exe (it will need to be renamed). This is working 100% for me. You'll need to revert the earlier changes to convert.conf - those are bogus.
(In reply to comment #51) > It is possible that the problem is something other than wmadec.exe > > Out of curiosity, how many WMA Lossless files do you have? > > I'm still looking into this. > 1127 albums with 10797 songs by 1247 artists It's pretty serious. Pure WMA Lossless. (In the middle of transcoding into FLAC, taking 7 days...)
(In reply to comment #52) > You'll need to revert the earlier changes to convert.conf - those are bogus. Please explain. I just replaced the WMADEC file, did nothing else, and... THE NEW WMADEC WORKS! No more truncation! I have only tested ONE 'end' so far, but it worked perfectly. Will do more testing... But GOOD news so far...
Ok, it seems that the original bug (chop off ending from each track) has been fixed by Dan's new wmadec.exe dated 2006.09.26. However, I am not sure if I should start a new bug for this or not. When I playback WMA Lossless files, I get ocassional 'pops' or 'short bursts of pink noise' and then the music will stop. I have done thorough testing, and have concluded that this has something to do with my PC Server, because when I try to run SS off another computer, everything is fine. But the odd thing is that this only applies to WMA Lossless on this particular server. Any idea? If I play FLAC on this server, everything is fine, but when I play WMA Lossless, I have all sorts of problems. Perhaps this is no longer a wmadec issue? Sorry I am using this like a 'support' forum.
glad to hear it's working! please open a new bug with the new issue. this one's long and confusing enough! :)
Fixed in change 10057
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.