Author Topic: Seeking BASS_StreamCreateURL  (Read 348 times)

Taiko2k

  • Posts: 15
Seeking BASS_StreamCreateURL
« on: 8 Feb '19 - 22:59 »
Is there an issue using BASS_ChannelSetPosition with BASS_StreamCreateURL? Maybe I'm doing something wrong. Looking around, it seems this should at least work for seeking back in time.

However trying to use BASS_ChannelSetPosition I get error 37 BASS_ERROR_NOTAVAIL, even when trying to seek to byte 0. BASS_ChannelSeconds2Bytes seems to be returning normal values.

When using StreamCreateURL as a decoding channel to a mixer and seeking the mixer channel, I get error 7 BASS_ERROR_POSITION and no error if seeking to byte 0,  the URL decode channel, I get no error but still the audio does not seek.
« Last Edit: 9 Feb '19 - 02:52 by Taiko2k »

MB_SOFT

  • Posts: 270
Re: Seeking BASS_StreamCreateURL
« Reply #1 on: 9 Feb '19 - 17:35 »
if it's a live stream i don't think you can seek it at all.

if it's a file stream seeking is possible only if the BASS_STREAM_BLOCK flag is not used.

http://www.un4seen.com/doc/#bass/BASS_StreamCreateURL.html

Taiko2k

  • Posts: 15
Re: Seeking BASS_StreamCreateURL
« Reply #2 on: 9 Feb '19 - 23:43 »
I see, this does indeed work as expected for an OGG file URL I found. You're right.

I was hoping this would work for PLEX streams (mp3), I assumed it was a file URL but perhaps its not, or is not working for another reason,

EDIT: I found that downloading the steam to a file on disk while using BASS_StreamCreateFile, and reloading the file when wanting to seek, works fairly well to provide seeking functionality.
« Last Edit: 10 Feb '19 - 10:08 by Taiko2k »

sveakul

  • Posts: 69
Re: Seeking BASS_StreamCreateURL
« Reply #3 on: 10 Feb '19 - 17:51 »
I'm out of my league here (I'm no developer!!), but since it wasn't mentioned, are you sure basshls.dll is being called properly??  I say this as its description reads: "An extension enabling the playback of HLS (HTTP Live Streaming) streams. Local media playlists and segments are also supported."  Apologies if that's a non-issue.

Taiko2k

  • Posts: 15
Re: Seeking BASS_StreamCreateURL
« Reply #4 on: 10 Feb '19 - 23:04 »
are you sure basshls.dll is being called properly?

Na, calls to basshls.dll are optional, just the plug-in needs to be loaded and the standard bass.dll calls will then work with it automatically.

Ian @ un4seen

  • Administrator
  • Posts: 21682
Re: Seeking BASS_StreamCreateURL
« Reply #5 on: 11 Feb '19 - 12:45 »
A BASS_ERROR_NOTAVAIL error from BASS_ChannelSetPosition indicates that seeking is not supported on the stream. If you're not using the BASS_STREAM_BLOCK flag then it is probably that the server didn't send a "Content-Length" header. You can check the HTTP headers with BASS_ChannelGetTags (BASS_TAG_HTTP) to confirm whether that is the case.