Page 1 of 2
Serviio Stuttering - Fine on PMS

Posted:
Fri May 04, 2012 2:49 pm
by WannabeMKII
I'm a recent convert from PS3MediaServer (PMS) to Serviio, as I often had issues with my PS3 connecting to PMS without having to keep restarting the service. Serviio on the other hand, is much more reliable and stable without any issues (hoping I've not now cursed it). However, there is one thing that PMS does well, that I'm sure I should be able to do in Serviio is have a buffer/cache.
The PS3 is connected over LAN and the source plays on Serviio, but often pixelates and/or jumps slightly. Whereas, on PMS, the buffer builds and although it does sometimes empty a little, there's always enough in the 'bank' for it to stream perfectly.
I've doubled the socket buffer from from 65536 to 131072, restarted etc, but it's not helped. Not sure if that was the right thing to change, but a look on the Wiki, FAQ's etc and was hoping this was the solution.
Can anyone assist?
Happy to provide more info if required?
Re: Serviio Stuttering - Fine on PMS

Posted:
Fri May 04, 2012 8:24 pm
by WannabeMKII
Just to add, the file/s in question, are mkv's.
Re: Serviio Stuttering - Fine on PMS

Posted:
Sun May 06, 2012 10:30 am
by Xmantium
Can you post the ffmpeg information of the file.
I've had no issues with mkvs on my ps3 with 720p or less, because my ps3 is far from my router it's on wifi, ps3 still got the very slow wifi G so I don't bother streaming big files. This should not be an issue if your on LAN.
BTW: welcome to Serviio, I've learned no more "Unsuppoted Data" on ps3

Re: Serviio Stuttering - Fine on PMS

Posted:
Sun May 06, 2012 2:56 pm
by WannabeMKII
Xmantium wrote:Can you post the ffmpeg information of the file.
I've had no issues with mkvs on my ps3 with 720p or less, because my ps3 is far from my router it's on wifi, ps3 still got the very slow wifi G so I don't bother streaming big files. This should not be an issue if your on LAN.
BTW: welcome to Serviio, I've learned no more "Unsuppoted Data" on ps3

Thanks for the response and the welcome

Which method should I use to provide the info, as I see there's a couple?
Re: Serviio Stuttering - Fine on PMS

Posted:
Sun May 06, 2012 3:06 pm
by will
Re: Serviio Stuttering - Fine on PMS

Posted:
Sun May 06, 2012 4:00 pm
by WannabeMKII
will wrote:http://wiki.serviio.org/doku.php?id=file_np
Perfect, thanks.
Here you go;
- Code:
127 Hours (2010).mkv"
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 13 2011 20:46:11 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 42. 0 / 53. 42. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
Seems stream 0 codec frame rate differs from container frame rate: 47.95 (500000
0/104271) -> 48.00 (48/1)
Input #0, matroska,webm, from '*:\*****\*****\127 Hours (2010)\127 Hours (20
10).mkv':
Duration: 01:33:41.62, start: 0.000000, bitrate: 12116 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1040, SAR 1:1 DAR 24:13,
23.98 fps, 48 tbr, 1k tbn, 47.95 tbc
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (def
ault)
Hope it helps... Let me know if anything else is needed...
Re: Serviio Stuttering - Fine on PMS

Posted:
Mon May 07, 2012 10:05 am
by WannabeMKII
Anyone any ideas?
Re: Serviio Stuttering - Fine on PMS

Posted:
Tue May 08, 2012 1:23 pm
by WannabeMKII
Is more info needed to diagnose?
Re: Serviio Stuttering - Fine on PMS

Posted:
Tue May 08, 2012 4:41 pm
by zip
might be due to the transcoder used in PMS. You can compare the ffmpeg (if they use that) command lines from Serviio and PMS.
Re: Serviio Stuttering - Fine on PMS

Posted:
Tue May 08, 2012 4:47 pm
by WannabeMKII
zip wrote:might be due to the transcoder used in PMS. You can compare the ffmpeg (if they use that) command lines from Serviio and PMS.
I believe PMS uses MEncoder.
What can I do to prevent the pixelation on Serviio?
Am I right in what I did with increasing the socket buffer? It's just watching the buffer in PMS, it does fluctuate a bit, but the buffer is big enough to continue streaming without any issues.
Re: Serviio Stuttering - Fine on PMS

Posted:
Tue May 08, 2012 10:48 pm
by zip
The socket buffer is just a buffer of the network protocol. Nothing to do with FFmpeg. Serviio doesn't use any buffer for transcoding. You can try to enable detailed logging, find the ffmpeg command used for transcoding, run it manually and see how many fps it's managing.
Re: Serviio Stuttering - Fine on PMS

Posted:
Wed May 09, 2012 6:18 pm
by WannabeMKII
zip wrote:The socket buffer is just a buffer of the network protocol. Nothing to do with FFmpeg. Serviio doesn't use any buffer for transcoding.
No problem, now back to default, thanks for explaining.
zip wrote:You can try to enable detailed logging, find the ffmpeg command used for transcoding, run it manually and see how many fps it's managing.
OK, I've enabled detailed logging, but now need a little guidance on how to display the number of FPS?
Re: Serviio Stuttering - Fine on PMS

Posted:
Thu May 10, 2012 4:18 pm
by WannabeMKII
WannabeMKII wrote:zip wrote:You can try to enable detailed logging, find the ffmpeg command used for transcoding, run it manually and see how many fps it's managing.
OK, I've enabled detailed logging, but now need a little guidance on how to display the number of FPS?
Can anyone help advise on how to find out the number of FPS that ffmpeg is managing in Serviio?
Re: Serviio Stuttering - Fine on PMS

Posted:
Thu May 10, 2012 5:56 pm
by jabrown0604
WannabeMKII wrote:WannabeMKII wrote:zip wrote:You can try to enable detailed logging, find the ffmpeg command used for transcoding, run it manually and see how many fps it's managing.
OK, I've enabled detailed logging, but now need a little guidance on how to display the number of FPS?
Can anyone help advise on how to find out the number of FPS that ffmpeg is managing in Serviio?
This was on linux for me but this is how I ran a file to check FPS, however this will remux the video. It isn't too cpu intensive though. I was getting 130FPS off of an old Atom Processor.
- Code:
ffmpeg -i "/mnt/sdb1/Video/Movie/Animation/9 (2009)/9.mkv" -y -async 1 -vcodec copy -copyts -acodec libmp3lame -ab 192k -ar 44100 -ac 2 -map 0:0 -map 0:1 -sn -f flv /tmp/Serviio/transcoding-temp-4602-flv_player-DEFAULT.stf
Re: Serviio Stuttering - Fine on PMS

Posted:
Thu May 10, 2012 7:53 pm
by zip
there will be and ffmpeg.exe -i ............ command used for transcoding in the log. Then run the command in your command terminal and you'll see fps value as it's transcoding
Re: Serviio Stuttering - Fine on PMS

Posted:
Thu May 10, 2012 9:04 pm
by WannabeMKII
zip wrote:there will be and ffmpeg.exe -i ............ command used for transcoding in the log. Then run the command in your command terminal and you'll see fps value as it's transcoding
Great, thanks for the pointer!
Here's the output;
- Code:
C:\Program Files\Serviio\lib>ffmpeg.exe -i "N:\#####\#####\127 Hours (2010)\
127 Hours (2010).mkv" -y -async 1 -vcodec copy -vbsf h264_mp4toannexb -copyts -a
codec ac3 -ab 384k -ac 6 -map 0:0 -map 0:1 -sn -f mpegts C:\Windows\TEMP\Serviio
\transcoding-temp-13363-MPEG2TS.stf
ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 13 2011 20:46:11 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='
-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enab
le-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-co
nfig
libavutil 51. 32. 0 / 51. 32. 0
libavcodec 53. 42. 0 / 53. 42. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 53. 0 / 2. 53. 0
libswscale 2. 1. 0 / 2. 1. 0
Seems stream 0 codec frame rate differs from container frame rate: 47.95 (500000
0/104271) -> 48.00 (48/1)
Input #0, matroska,webm, from 'N:\#####\#####\127 Hours (2010)\127 Hours (20
10).mkv':
Duration: 01:33:41.62, start: 0.000000, bitrate: 12116 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1040, SAR 1:1 DAR 24:13,
23.98 fps, 48 tbr, 1k tbn, 47.95 tbc
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (def
ault)
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 03910aa0] channel_layout not specified
[ac3 @ 03910aa0] No channel layout specified. The encoder will guess the layout,
but it might be incorrect.
[mpegts @ 0237ee20] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every
40 pkts
Output #0, mpegts, to 'C:\Windows\TEMP\Serviio\transcoding-temp-13363-MPEG2TS.st
f':
Metadata:
encoder : Lavf53.24.0
Stream #0:0(eng): Video: h264, yuv420p, 1920x1040 [SAR 1:1 DAR 24:13], q=2-3
1, 23.98 fps, 90k tbn, 23.98 tbc
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), flt, 384 kb/s (default)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (dca -> ac3)
Press [q] to stop, [?] for help
frame= 196 fps= 0 q=-1.0 size= 5201kB time=00:00:08.09 bitrate=5265.3kbits/
frame= 386 fps=371 q=-1.0 size= 15282kB time=00:00:16.01 bitrate=7816.9kbits/
frame= 561 fps=364 q=-1.0 size= 22967kB time=00:00:23.31 bitrate=8069.8kbits/
frame= 745 fps=365 q=-1.0 size= 33012kB time=00:00:30.98 bitrate=8726.6kbits/
frame= 897 fps=353 q=-1.0 size= 44262kB time=00:00:37.32 bitrate=9713.4kbits/
frame= 1032 fps=339 q=-1.0 size= 53301kB time=00:00:42.95 bitrate=10163.9kbits
frame= 1229 fps=347 q=-1.0 size= 60321kB time=00:00:51.17 bitrate=9656.0kbits/
frame= 1404 fps=347 q=-1.0 size= 69325kB time=00:00:58.47 bitrate=9712.1kbits/
frame= 1564 fps=344 q=-1.0 size= 78745kB time=00:01:05.14 bitrate=9901.6kbits/
frame= 1709 fps=338 q=-1.0 size= 92099kB time=00:01:11.19 bitrate=10597.0kbits
frame= 1824 fps=328 q=-1.0 size= 103504kB time=00:01:15.99 bitrate=11157.7kbits
frame= 1966 fps=324 q=-1.0 size= 117069kB time=00:01:21.91 bitrate=11707.5kbits
frame= 2084 fps=317 q=-1.0 size= 132306kB time=00:01:26.83 bitrate=12481.4kbits
frame= 2221 fps=314 q=-1.0 size= 146096kB time=00:01:32.55 bitrate=12931.5kbits
frame= 2369 fps=313 q=-1.0 size= 156870kB time=00:01:38.72 bitrate=13016.9kbits
frame= 2510 fps=311 q=-1.0 size= 170783kB time=00:01:44.60 bitrate=13374.7kbits
frame= 2656 fps=309 q=-1.0 size= 181192kB time=00:01:50.69 bitrate=13409.3kbits
frame= 2820 fps=310 q=-1.0 size= 192037kB time=00:01:57.53 bitrate=13384.7kbits
frame= 2978 fps=310 q=-1.0 size= 202459kB time=00:02:04.12 bitrate=13362.0kbits
frame= 3130 fps=310 q=-1.0 size= 213945kB time=00:02:10.46 bitrate=13433.9kbits
frame= 3285 fps=310 q=-1.0 size= 225137kB time=00:02:16.92 bitrate=13469.2kbits
frame= 3447 fps=311 q=-1.0 size= 236931kB time=00:02:23.68 bitrate=13508.2kbits
frame= 3600 fps=310 q=-1.0 size= 246534kB time=00:02:30.06 bitrate=13458.1kbits
frame= 3752 fps=310 q=-1.0 size= 255997kB time=00:02:36.40 bitrate=13408.2kbits
frame= 3917 fps=311 q=-1.0 size= 266117kB time=00:02:43.28 bitrate=13350.8kbits
frame= 4086 fps=312 q=-1.0 size= 276587kB time=00:02:50.33 bitrate=13301.9kbits
frame= 4242 fps=312 q=-1.0 size= 287247kB time=00:02:56.84 bitrate=13306.3kbits
frame= 4397 fps=312 q=-1.0 size= 298240kB time=00:03:03.30 bitrate=13328.2kbits
frame= 4555 fps=312 q=-1.0 size= 309504kB time=00:03:09.89 bitrate=13351.6kbits
frame= 4729 fps=313 q=-1.0 size= 319520kB time=00:03:17.15 bitrate=13276.4kbits
frame= 4896 fps=314 q=-1.0 size= 328594kB time=00:03:24.12 bitrate=13187.5kbits
frame= 5085 fps=316 q=-1.0 size= 337634kB time=00:03:32.00 bitrate=13046.5kbits
frame= 5283 fps=318 q=-1.0 size= 347678kB time=00:03:40.26 bitrate=12930.9kbits
frame= 5462 fps=319 q=-1.0 size= 356412kB time=00:03:47.72 bitrate=12821.1kbits
frame= 5633 fps=320 q=-1.0 size= 365255kB time=00:03:54.85 bitrate=12740.2kbits
frame= 5802 fps=320 q=-1.0 size= 375634kB time=00:04:01.90 bitrate=12720.5kbits
frame= 5965 fps=320 q=-1.0 size= 384832kB time=00:04:08.70 bitrate=12675.8kbits
frame= 6106 fps=319 q=-1.0 size= 397492kB time=00:04:14.58 bitrate=12790.3kbits
frame= 6231 fps=317 q=-1.0 size= 411382kB time=00:04:19.80 bitrate=12971.6kbits
frame= 6353 fps=316 q=-1.0 size= 424432kB time=00:04:24.88 bitrate=13126.0kbits
frame= 6484 fps=314 q=-1.0 size= 437887kB time=00:04:30.35 bitrate=13268.4kbits
frame= 6643 fps=314 q=-1.0 size= 449668kB time=00:04:36.98 bitrate=13299.2kbits
frame= 6809 fps=315 q=-1.0 size= 459178kB time=00:04:43.90 bitrate=13249.3kbits
frame= 7000 fps=316 q=-1.0 size= 467015kB time=00:04:51.87 bitrate=13107.6kbits
frame= 7183 fps=317 q=-1.0 size= 475455kB time=00:04:59.50 bitrate=13004.4kbits
frame= 7351 fps=318 q=-1.0 size= 485211kB time=00:05:06.51 bitrate=12967.9kbits
frame= 7531 fps=318 q=-1.0 size= 492684kB time=00:05:14.02 bitrate=12852.8kbits
frame= 7666 fps=317 q=-1.0 size= 502544kB time=00:05:19.65 bitrate=12879.1kbits
frame= 7814 fps=317 q=-1.0 size= 511895kB time=00:05:25.82 bitrate=12870.2kbits
frame= 7978 fps=317 q=-1.0 size= 521694kB time=00:05:32.66 bitrate=12846.9kbits
frame= 8149 fps=317 q=-1.0 size= 532517kB time=00:05:39.79 bitrate=12838.1kbits
frame= 8315 fps=318 q=-1.0 size= 543339kB time=00:05:46.72 bitrate=12837.5kbits
frame= 8489 fps=318 q=-1.0 size= 554646kB time=00:05:53.97 bitrate=12836.0kbits
frame= 8657 fps=318 q=-1.0 size= 564556kB time=00:06:00.98 bitrate=12811.7kbits
frame= 8806 fps=318 q=-1.0 size= 575321kB time=00:06:07.20 bitrate=12835.0kbits
frame= 8960 fps=318 q=-1.0 size= 587592kB time=00:06:13.62 bitrate=12883.4kbits
frame= 9128 fps=318 q=-1.0 size= 599533kB time=00:06:20.63 bitrate=12903.2kbits
frame= 9305 fps=318 q=-1.0 size= 609920kB time=00:06:28.01 bitrate=12877.0kbits
frame= 9454 fps=318 q=-1.0 size= 619239kB time=00:06:34.22 bitrate=12867.7kbits
frame= 9609 fps=318 q=-1.0 size= 631681kB time=00:06:40.69 bitrate=12914.5kbits
frame= 9752 fps=317 q=-1.0 size= 643235kB time=00:06:46.65 bitrate=12957.8kbits
frame= 9908 fps=317 q=-1.0 size= 655303kB time=00:06:53.16 bitrate=12993.0kbits
frame=10074 fps=317 q=-1.0 size= 665697kB time=00:07:00.08 bitrate=12981.6kbits
frame=10237 fps=317 q=-1.0 size= 674494kB time=00:07:06.88 bitrate=12943.6kbits
frame=10409 fps=318 q=-1.0 size= 684444kB time=00:07:14.05 bitrate=12917.5kbits
frame=10565 fps=318 q=-1.0 size= 694343kB time=00:07:20.56 bitrate=12910.8kbits
frame=10579 fps=318 q=-1.0 Lsize= 695204kB time=00:07:21.14 bitrate=12909.7kbit
s/s
video:621381kB audio:20685kB global headers:0kB muxing overhead 8.276051%
Received signal 2: terminating.
How does that look and does it tell you what you need?
Re: Serviio Stuttering - Fine on PMS

Posted:
Thu May 10, 2012 10:12 pm
by zip
ok, that's fine, 315 fps is more than enough. not sure how to help tbh, might be the bitrate of the remux is higher than whatever PMS is doing.
Re: Serviio Stuttering - Fine on PMS

Posted:
Fri May 11, 2012 8:58 am
by Illico
This is probably due to variable muxrate
[mpegts @ 0237ee20] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Do you have the same problem with this sample ?
http://divxtrailers.divx.com/BigBuckBun ... PlusHD.mkvEDIT:
There is an option "-vsync 3" :
‘drop’ : As passthrough but destroys all timestamps, making the muxer generate fresh timestamps based on frame-rate.
Re: Serviio Stuttering - Fine on PMS

Posted:
Fri May 11, 2012 10:05 am
by WannabeMKII
OK, will try that later and let you know.
Illico wrote:EDIT:
There is an option "-vsync 3" :
‘drop’ : As passthrough but destroys all timestamps, making the muxer generate fresh timestamps based on frame-rate.
Sorry, being a bit 'simple' does this mean that it'll force a frame rate and override the variable rate?
Re: Serviio Stuttering - Fine on PMS

Posted:
Fri May 11, 2012 10:35 am
by Illico
WannabeMKII wrote:Sorry, being a bit 'simple' does this mean that it'll force a frame rate and override the variable rate?
Don't really know ?
I make some test, and I'm not sure that this option change something when video is remuxed (-vcodec copy)...
EDIT: Another ffmpeg option seems to modify PCR/PTS Timestamp, you can try
-copytb 1
-copytb mode’
Specify how to set the encoder timebase when stream copying.
‘1’ : Use the demuxer timebase. The time base is copied to the output encoder from the corresponding input demuxer. This is sometimes required to avoid non monotonically increasing timestamps when copying video streams with variable frame rate.