Author Topic: WMA V8 length issue  (Read 135 times)

SoundMike

  • Posts: 330
WMA V8 length issue
« on: 8 Aug '17 - 09:49 »
A user reported that some audio files played by my program were stopping short of the end - typically about 2 seconds short. He sent me three of the files and on investigation I found that they were WMA V8 files. For example, one of the files BASS reports as length 39093760 bytes, or 1:50.810 (using BASS_ChannelBytesToSeconds). However, if I open the file using GoldWave then GoldWave reports the length as 1:48.762. This difference of about 2 seconds matches the apparent stopping early of the file when played using BASS. btw, no audio was lost on playback.

I realise that WMA V8 may be an old format. My version of GoldWave saves, by default, WMA files as WMA 9.2, and supports various WMA 9 and 10 versions, but not 8 or earlier. It does, however, successfully read V8 files.

Are you aware of any issues with WMA V8 file lengths in BASS?

Ian @ un4seen

  • Administrator
  • Posts: 20210
Re: WMA V8 length issue
« Reply #1 on: 8 Aug '17 - 14:30 »
I checked a couple of WMA v8 files just now and there was no problem with the length, so please upload a file that you are having the problem with to have a look at here:

   ftp.un4seen.com/incoming/

Please also confirm whether you are using the BASSWMA add-on or Media Foundation to play WMA files. Check the "ctype" value if unsure.

SoundMike

  • Posts: 330
Re: WMA V8 length issue
« Reply #2 on: 8 Aug '17 - 23:38 »
I uploaded the file I referred to, but do have another couple of WMA V8 files from that user that exhibit the same issue. The file seemed to disappear as soon as the upload was complete. Was that because your system immediately transferred it, or did the upload fail? I'm using FileZilla, and the upload was reported as successful.

I'm using the BASSWMA add-on and the ctype shows BASS_CTYPE_STREAM_WMA (hex 10300).

Interestingly, if I skip loading the plugin I still get the incorrect length (1:50.810 for this file) and the ctype shows BASS_CTYPE_STREAM_MF (hex 10008).

Chris

  • Posts: 1804
Re: WMA V8 length issue
« Reply #3 on: 9 Aug '17 - 10:48 »
BASS_CTYPE_STREAM_WMA will mean the Files is handles by basswma/ WMA Codec
BASS_CTYPE_STREAM_MF will mean the file was handles by Microsoft Media Foundation Api
if os >= Vista and user have not installed the wma codec the Microsoft Media Foundation Api is used
so look like the wrong Length Error comes from the Microsoft Media Foundation Api .
« Last Edit: 9 Aug '17 - 11:23 by Chris »

Ian @ un4seen

  • Administrator
  • Posts: 20210
Re: WMA V8 length issue
« Reply #4 on: 9 Aug '17 - 12:57 »
I uploaded the file I referred to, but do have another couple of WMA V8 files from that user that exhibit the same issue. The file seemed to disappear as soon as the upload was complete. Was that because your system immediately transferred it, or did the upload fail? I'm using FileZilla, and the upload was reported as successful.

I'm using the BASSWMA add-on and the ctype shows BASS_CTYPE_STREAM_WMA (hex 10300).

Interestingly, if I skip loading the plugin I still get the incorrect length (1:50.810 for this file) and the ctype shows BASS_CTYPE_STREAM_MF (hex 10008).

Your test file was received, thanks. Windows says the length is 1:50 too (in the file's properties). I notice the "WM/EncoderSettings" tag is set to "lavf55.33.100", which I believe means it was created with some version of ffmpeg. Do the other troublesome files have the same tag? Perhaps it is a bug in that encoder, which is resulting in an incorrect duration value in the file's header.

SoundMike

  • Posts: 330
Re: WMA V8 length issue
« Reply #5 on: 11 Aug '17 - 08:16 »
All 3 files the user sent me have "WM/EncoderSettings" tag set to "lavf55.33.100".

I get the same results using VLC Media Player - eg the first file displays a length of 1:50 but stops (correctly) at about 1:48. The user said he'll batch convert the files to WAV format. I haven't heard back from him yet to see if the converted files have the correct length and if so what software he used for the conversion. Interesting that GoldWave seems to detect the correct length immediately, but that may be because it scans the file in order to produce the audio graph.