Jump to content

Questions regarding buffering in Chrome / Firefox


nicomel89

Recommended Posts

nicomel89

Hi there, first of all thank you, for this great product. I'm using it since March and is fantastic.

I've several questions regarding some strange behavior when using Chrome / Edge / IE 11 / Opera but in Firefox works different.

I'm running last stable version of Emby in Debian 8 using 100 mbps connection upload, the files that i'm streaming remotely are in .MP4 (HIGH 4.1) container.

Ffmpeg Info:

Duration: 00:22:52.42, start: 0.046440, bitrate: 1105 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [sAR 1:1 DAR 16:9], 999 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 100 kb/s (default)

The majority of files are in 1100 kb/s and I play them in Direct Stream, to play the movies clients need at least 140 kB/s download speed.

When I play with Chrome / IE 11 / Edge / Opera by Direct Stream, with download connection of 12 mbps (1400 kB/s),
the cache dir of the browsers has segmented files of 1 mb and the Index. The network monitor shows fluctuations in the download speed from 1 kB/s to 200 kB/s but never reach the full download speed (1400kB/s) of the client. I've tested this in other connections.

From the other hand when i play the same (file/connection/setup) in Firefox buffering speed reach 1000-1400 kB/s constant speed without strong fluctuations.

This is regarding HLS.js? I'm trying to convince clients to use Firefox but some of them refuse to use it.

 

One of the problems is that some clients have 250ms latency to the server and I prefer to buffering more  or bigger chunks of segmented files to avoid stuttering.

Is it possible to increase the max buffer length and max buffer size of this HLS segmented files to take full advantage of the connection? and maybe buffer a bit more?

Thanks in advance.
 

Edited by nicomel89
Link to comment
Share on other sites

Chrome uses hls only when mobile, otherwise it uses a single mkv. It is the most robust choice. Edge and opera use hls, and yes Firefox uses webm. Have they configured a max streaming bitrate in the

Link to comment
Share on other sites

nicomel89

Hello sorry i don't understand the last part you mean check the configured a max streaming bitrate in the user control panel?

Link to comment
Share on other sites

Sorry, i meant the in-app settings, so if they're using the web client for example it would be click the user icon in the top right -> playback settings.

Link to comment
Share on other sites

nicomel89

Yes, try with different settings 1080p 60mbps, 1080p 40mbps, 1080p 8mbps, 720p 4mbps and happen the same situation buffering speed fluctuate between 1 kB/s and 200 kB's and in Firefox is around 1000 kB/s or more.

Link to comment
Share on other sites

ok, if you're running windows you could try the beta server as there are some hls changes that might help here.

Link to comment
Share on other sites

nicomel89

unfortunately i'm running it under Debian 8, is it possible to disable HLS? 

Edited by nicomel89
Link to comment
Share on other sites

Unfortunately not really because for some of the browser hls is the only choice, the only native choice at least. We could probably expose some buffering settings though.

Link to comment
Share on other sites

nicomel89

Oh ok, I'm trying to edit hls.js to increase buffer size/length with no luck maybe i'm editing in the wrong place, is it possible to change the buffering settings in some of the files of "scripts"?

Link to comment
Share on other sites

there's currently nothing you can do in any emby file. whether or not there's something within hls.js, i'm not sure.

Link to comment
Share on other sites

  • 2 years later...

Hi everyone. Kinda hijacking this thread because of experiencing similar issues - only it doesn't matter the browser or OS in my case. Tests were done on Windows and Linux for playback - server is on Windows.

 

All playback using the Emby app on mobile devices - phones or tablets - are absolutely seamless. Playback from any browser within Windows/Linux is horrible. The buffering is unbearable. If I cast to my TV from a mobile device - 1080p - it works flawlessly as well. Currently trying to spoof the browser settings within Windows to let it think it's an Android, but that doesn't seem to be working out (still buffering). Will test a few other things - may try running BlueStacks and see if it does the same. Why exactly it does this I'm not sure. Any feedback/help would be appreciated. Thanks in advance.

 

Oh - let me know if I should start a new thread - I just figured since this seems to be the closest to what's going on with me that I'd hijack it.

Edited by khat17
Link to comment
Share on other sites

Thanks for that. Let's get to it. Tests were done using Big Buck Bunny. Details copied from within Emby are below.

 

 

Video of problem is being uploaded. My upload speed is crappy so will take another hour. Logs are uploaded here. Please let me know once you've seen them so I can remove the share link.

 

https://mega.nz/#F!MVtnWChI!0VdSHRqCTr72zu3HMFPS9g

 

Here's the general setup.

 

EMBY - SERVER

  • VPS
  • 100Mb up/down connection

EMBY APP - MOBILE & SAMSUNG TV

  • Running on various Android devices
  • 20Mb down / 1.5Mb up connection

Usually the apps give no issue with the automatic quality setting - if there are problems then turning it down to 1080p/4Mbps works seamlessly. TV is running the Emby app and has no problems.

 

EMBY - PC - Windows/Linux Web Browser

  • Same location on the same connection as other devices
  • 20Mb down / 1.5Mb up connection
  • Playback only goes seamlessly on 480p/420kbps
  • Any higher setting causes constant buffering

I've tested this at another location with higher bandiwdth - think it was 25Mb down / 2Mb up - and it played at that location on a PC with no problems. Tests were done at my location using Windows 7 Pro x64 / i3-2120 / 16GB DDR3 primarily. Other devices include an Asus NetBook running Windows 10 (low spec device) and two other laptops - one with an i3 and another with a Celeron. All desktop/laptop platforms do the same thing. Going to reboot now into Ubuntu Linux and run tests again to verify. Considering that I'm the only user of the system it shouldn't be buffering like this - and it works flawlessly on the TV, when casting from the phone or when using the phone directly.

 

Once the video is up you'll be able to see what's going on directly.

 

Media Info
VideoTitle1080P H264
CodecH264
Codec tagavc1
AVCYes
ProfileMain
Level41
Resolution1920x1080
Aspect ratio16:9
InterlacedNo
Framerate24
Bitrate9282 kbps
Color primariesbt709
Color spacebt709
Color transferbt709
Bit depth8 bit
Pixel formatyuv420p
Ref frames1
NAL4
AudioTitleEng AAC 5.1 Default
Languageeng
CodecAAC
Codec tagmp4a
ProfileLC
Layout5.1
Channels6 ch
Bitrate437 kbps
Sample rate48000 Hz
DefaultYes
Containermov
Link to comment
Share on other sites

  • 2 weeks later...

Hi, try using the 3-dot menu to download a video file from your emby server. how fast does that go?

Link to comment
Share on other sites

Thanks for the reply. Download speeds vary. With IDM I get a constant 2.XMB/s. The server has 100Mb upload and my download at home is 20Mb. 

 

Downloading through the browser the speeds fluctuate up to 1,048K and 425K.

 

5bce8b03e7bd3_DL1.png5bce8b0d3b55e_DL2.png

Link to comment
Share on other sites

Ok, so that is just a raw transfer of the original file. That speed represents your best case scenario. There's nothing we can do to make that go faster as it's just sending the raw data as-is. Perhaps you may want to investigate whether or not some ISP throttling is occurring here.

Link to comment
Share on other sites

It's really hard to say. First thing would be to confirm if throttling is indeed happening, and then from which side it's occurring. That may provide the answer.

Link to comment
Share on other sites

The ISP does not admit to it, but I believe they prioritize traffic to certain sites such as YouTube. The ISP is using HFC and while the fiber connection does not have bandwidth issues, the shared bandwidth on the copper side may be a factor. I've tested the playback elsewhere on a faster connection and had no issues whatsoever. Same ISP but different location. Regardless of where I go however, the playback on the phone is great, but at home the playback is terrible if using anything except the phone. As a result I just cast to the TV or use the TV directly. Plays 720p or 1080p quite fine that way.

Link to comment
Share on other sites

Understood but the answer will require investigation as to why it's happening on one device vs. another.

Link to comment
Share on other sites

To be honest I believe the investigation needs to happen on your end because this sounds like ISP throttling to me. As I already mentioned earlier, using the download function in Emby represents your best case scenario. There's nothing we can do to make that go any faster. You could always try using a different public facing port on your router, in case it might fool them.

Link to comment
Share on other sites

  • 2 weeks later...

To be honest I believe the investigation needs to happen on your end because this sounds like ISP throttling to me. As I already mentioned earlier, using the download function in Emby represents your best case scenario. There's nothing we can do to make that go any faster. You could always try using a different public facing port on your router, in case it might fool them.

 

I agree. I believe the issue is with the ISP. I just don't get why it works so much better with the mobile devices than with the PCs. Anyways - will wait until second ISP becomes available in my area. 100Mb connection for the price of the 15Mb package with current provider.

 

Thanks for your time and keep up the good work!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...