Page 1 of 1
serviio on a remote server stucks, when...

Posted:
Mon Nov 03, 2014 11:36 pm
by marko weber
...
hello list,
i set up serviio on a remote server in a datacenter of an isp.
from home i have a vpn connection to this server.
My wdtv-box reaches the serviio server over the openvpn connection.
Playing Media Files .mkv .avi .mp3 works fine.
Movies begin to stutter i found out, when the movies are coded with more then >7200kbps.
If Movies has birate HIGHER then 7200kbps the stutter....
i monitored the network output when movies stutter.
its not abnormal high. On a stuttering 720p mvie it was not higher then 1.6MB\sec.
So the Network throughput can not be the reason.
In my local LAN the stuttering movies are played fine, WITHOUT stuttering.
Why is the same Movie played in local LAN playing fine?
Even with rates higher then 10.000 kbps they are played fine.
But when movies are played from the remote Server, they stutter if rate is higher then 7200kbps.
The remote Server is connected on a 200 Mbit Port.
At home i have a 100 Mbit Internet Cable Connection.
So bandwidth should be enough.
Any ideas?
Is it caused by the WDTV Box?
Any ideas or tipps for debugging are welcome.
best regards
marko
Re: serviio on a remote server stucks, when...

Posted:
Tue Nov 04, 2014 11:16 am
by DenyAll
There are a few considerations in doing what you are doing - throughput, latency, and error rates. While you may have the raw throughput (speed or bandwidth) you may still have issues with latency (the time taken to get from one system to the other including the processing time at each end).
I suspect, based on what you've described, latency may be an issue. What is the latency across the link and through the VPN. Most VPN's run some encryption as well - this adds to the overall latency. You could try turning off encryption (but this has obvious implications). Routers could also be a problem if they are not high quality. Other traffic on the VPN will also impact.
DLNA was designed for the LAN, not for the WAN - have you considered using the MediaBrowser app that comes with Serviio pro - no need for a VPN then and uses different transport mechanisms (designed for the internet).
Re: serviio on a remote server stucks, when...

Posted:
Wed Nov 05, 2014 10:19 am
by marko weber
hi,
i excuded latency, throughput from my thoughts, cause of the good bandwidth in datacenter and at home.
Turning off encryption is not an option.
DLNA is designed for the LAN, you say. With the OpenVPN connect it is like a LAN i think.
The WDTV Box at home 'sees' the serviio server in his own same net.
i did a ping from datacenter to the router at home which handles the vpn connection and where the WDTV Box is connected:
64 bytes from 192.168.5.40: icmp_seq=2 ttl=64 time=32.2 ms
64 bytes from 192.168.5.40: icmp_seq=3 ttl=64 time=31.1 ms
64 bytes from 192.168.5.40: icmp_seq=4 ttl=64 time=30.0 ms
64 bytes from 192.168.5.40: icmp_seq=5 ttl=64 time=35.1 ms
64 bytes from 192.168.5.40: icmp_seq=6 ttl=64 time=30.6 ms
64 bytes from 192.168.5.40: icmp_seq=7 ttl=64 time=30.7 ms
64 bytes from 192.168.5.40: icmp_seq=8 ttl=64 time=31.0 ms
64 bytes from 192.168.5.40: icmp_seq=9 ttl=64 time=30.1 ms
64 bytes from 192.168.5.40: icmp_seq=10 ttl=64 time=31.0 ms
64 bytes from 192.168.5.40: icmp_seq=11 ttl=64 time=31.9 ms
this looks ok for me. Do you think this latency is too high?
best regards
marko
Re: serviio on a remote server stucks, when...

Posted:
Wed Nov 05, 2014 11:50 pm
by zip
you can check the
detailed log, but some files are served by many small chunks (instead of opening a long stream), which is an overhead even on a fast LAN. It might be the case of your particular file.
Re: serviio on a remote server stucks, when...

Posted:
Thu Nov 06, 2014 9:06 am
by marko weber
Petr,
this serving in many small chunks sounds interesting.
On some files it stutters always at same time in movie.
when i recode them with this settings:
ffmpeg -threads 8 -i test.mkv -b 7200k -bufsize 7200k -minrate 7200k -maxrate 7200k -c:a ac3 -b:a 384k -map 0:0 -map 0:1 -sn test_new.mkv
it plays mostly fine without any stutter. Over 7200k , movies stutter always.
Is it possible to tell serviio to open a long stream forced?
Is there a way to find out if the file is served in many chunks.? ( is this logged in serviio with 'DEBUG') ?
Oh, btw............. in LAN i never had this stutterings. Even Movies with 16.000kbps dont stutter......(maybe important?)
marko
Re: serviio on a remote server stucks, when...

Posted:
Thu Nov 06, 2014 5:35 pm
by zip
It's up to the file / renderer. The renderer probably reads the file's header, which includes these chunks locations and then requests them. So I think it's probably related to the way the file is encoded / muxed to the video file.
Once there are many chunks, latency comes to play and there is the overhead on creating new requests, etc. So it could be the reason.
Re: serviio on a remote server stucks, when...

Posted:
Thu Nov 13, 2014 3:26 pm
by marko weber
hey zip,
isn't serviio the filerenderer in this case?
is there any way to check the files header which include the chunk locations?
and maybe a feature request... is it possible to make serviio playing files from the remote system i described?
best regards
marko
Re: serviio on a remote server stucks, when...

Posted:
Fri Nov 14, 2014 1:05 am
by atc98092
Remember too that running through a VPN also adds overhead. I would say that there's at least a 10% drop in thoughtput over the VPN, and possibly even more.
Also, while you have good inbound connection speed, what is the data center capable of sending out? If it's a good symmetrical feed (same speed in and out) then it should be fine. However, if its Internet connection is asymmetrical, it's possible it can't support the bitrate requested. There may even be QoS rules in place that limit an outbound stream. If you don't control the firewall, I'd ask the question.
Re: serviio on a remote server stucks, when...

Posted:
Thu Nov 27, 2014 11:05 am
by marko weber
Hi zip,
It's up to the file / renderer. The renderer probably reads the file's header, which includes these chunks locations and then requests them. So I think it's probably related to the way the file is encoded / muxed to the video file.
Once there are many chunks, latency comes to play and there is the overhead on creating new requests, etc. So it could be the reason.
So, is there a way to render the Files with ffmpeg with so said 'optimized' chunk locations?
thank you
marko
Re: serviio on a remote server stucks, when...

Posted:
Thu Nov 27, 2014 7:23 pm
by zip
Try the DirecTV profile.
Re: serviio on a remote server stucks, when...

Posted:
Wed Jan 07, 2015 5:19 pm
by marko weber
zip,
thnaks i will test it and report.
marko
Re: serviio on a remote server stucks, when...

Posted:
Thu Jan 08, 2015 10:31 am
by marko weber
zip,
i tested it. when i set profile "dircTV" the 1080p movie is played without stuttering, BUT:
the movie looks like centered 1024x768 on 1920x1280 screen.
why is it not played in fullsize?
marko