Project

General

Profile

Low download speed with some clients but fine with others

Added by Alex A about 10 years ago

Hello, not sure where to address this, but maybe someone has suggestions.
I'm having stuttering problems when trying to play streams from my laptops and openelec (rpi). But If I use tvhclient on my android phones, the stream plays flawlessly.

So:
Server: TVH 3.6 (beta, compiled) on a raspberry pi with raspbian

Clients:
VLC 2.1.5 with HTSP client. On laptop, connected wirelessly to house router - stutters
Openelec 4.2.1 (xbmc 13.2). On raspberry pi, connected wirelessly to house router - stutters
TVHClient 1.5.5. On Samsung Galaxy S3, connected wirelessly to house router - plays flawless
TVHClient 1.5.5. On Samsung Galaxy S2, connected wirelessly to house router - plays flawless

I'm not sure anymore, but I think all of these consume the same bandwidth, irrespective of the "size" of the device. From what I've noticed, around 400-600kb/s (kilobytes per sec) for non-HD channels.

Problem is when I use my laptops or openelec, it only consumes 80-100kb/s. It's clearly not a lack of bandwidth, since I can download files directly from the TVH server with 1mb/s (megabyte per sec).

I'm monitoring my TVH Pi with munin, and the network graph clearly shows the difference. Am attaching it.
CPU usage is fine, RAM is fine, no swapping.

I'm puzzled.. any ideas?

if_eth0-pinpoint.png (74.2 KB) if_eth0-pinpoint.png network_graph

Replies (3)

RE: Low download speed with some clients but fine with others - Added by Prof Yaffle about 10 years ago

Stuttering is more likely to be video-related - drivers, HW acceleration, etc.

If tvh records, or plays correctly to any client, then it's unlikely to be a backend problem. It's possibly a transcoding issue, if you're using that - that's the only thing that would change the 'size' of the stream, after all. But it's more likely it's a local/client issue of some kind... it could be the client requesting less data, rather than the server sending less - and that could be due to CPU, disc, access to bandwidth, video settings or (with XBMC) even audio settings. Anything that keeps the client busy and stops it from asking for the next chunk of data, basically.

RE: Low download speed with some clients but fine with others - Added by Alex A about 10 years ago

Nope, not using transcoding. Laptops are fine, no resource issue on them, and they play fine 720p/1080p. The most resource limited device would be the Pi, which I've since overclocked (and has cooling).
Seems the requested bandwidth is no longer limited to 100kb/s, now it's close to normal (400-500kb/s), but it still stutters on laptops and on Pi. It happens that very rarely, they play fine; but this is infrequent.

Streaming from the phones with tvhclient works perfectly, all the time.

BTW, I'm using pvr.tvh 0.9.3 on Openelec from https://github.com/adamsutton/xbmc-pvr-addons/tree/master/addons.

As you said, the 'size' of the stream would always be the same without transcoding, but I still don't get why tvhclient would play fine and the rest wouldn't. I'm going to try TVHGuide next time and compare with TVHClient.

RE: Low download speed with some clients but fine with others - Added by Alex A about 10 years ago

I've noticed one crucial difference between TVHClient and pvr.tvh / vlc:
TVHClient uses port 9981 for streaming whereas pvr.tvh and vlc use port 9982.
I'm not sure why this happens; I know 9982 is the default port for streaming and 9981 is just for the WebUI.
There is no custom setting I set up, I've used the defaults.

In TVHClient I have:
Hostname: - host -
Port: 9982
Port for media streaming: 9981 will be used for media streaming. The default port is 9981 which is usually fine to use.

In pvr.tvh I have:
Tvheadend hostname or IP address: - host -
HTTP port: 9981
HTSP port: 9982

My remarks are based on analyzing the established connections and traffic transfer from/to the Tvheadend backend server.

    (1-3/3)