Author Topic: BASS_StreamCreateURL ends loading prematurely  (Read 416 times)


  • Posts: 33
If i reduce network speed to 1 mbit/s, BASS_StreamCreateURL starts working strange. It loads some part of file (10-40sec) and then stop downloading. BASS_ChannelGetLength shows length just of this part, not full track.
Is it BASS issue or i need to tweak my backend (nginx) ?

Code: [Select]
netStream = Bass.BASS_StreamCreateURL(Uri.EscapeUriString(CommonSettings.Instance.assetBundlesURL + model.clipName.ToLower() + ".mp3"),

streamTempoFX = BassFx.BASS_FX_TempoCreate(streamingTrack ? netStream : stream, BASSFlag.BASS_FX_FREESOURCE);
« Last Edit: 23 Nov '18 - 13:24 by teq »

Ian @ un4seen

  • Administrator
  • Posts: 21741
Re: BASS_StreamCreateURL ends loading prematurely
« Reply #1 on: 23 Nov '18 - 14:55 »
I guess it could be the server deciding that you're downloading too slowly (possible DoS attack) and closing the connection, although 1mbit/s sounds like it should be fast enough to avoid that. If you try playing the same URL with the pre-compiled CONTEST.EXE example included in the BASS package (C\BIN folder), do you get the same problem? Do you have the problem streaming from other servers too?


  • Posts: 33
Re: BASS_StreamCreateURL ends loading prematurely
« Reply #2 on: 23 Nov '18 - 15:00 »
It was nginx send_timeout param. I set it from 2 to 60 and seems that it's ok.
Full conf if somebody need it
Code: [Select]
keepalive_timeout 75;
keepalive_requests 100;
reset_timedout_connection off;
client_body_timeout 60;
send_timeout 60;
client_max_body_size  10m;