FAQ  •  Register  •  Login

Trascoding in RAM for local files

<<

pdneri

Streaming enthusiast

Posts: 29

Joined: Tue Dec 27, 2011 9:25 pm

Location: Italy

Post Mon Sep 10, 2012 9:34 am

Trascoding in RAM for local files

I read that online streaming are trascoded in RAM.
I would be interested in testing/having the possibility to do that also for local files that needs trasconding.

HD trascoded videos are not reproduced smoothly on my TV and I suspect it is due to disk performance. In fact while trascoding, cpu usage is at 70% and also network usage is very low.
SD videos are ok.
I would like to make some tests to see if disk is the cause and find a workaround.
Unfortunately I do not have a faster disk to test .... and I have already choosen a second disk for the trascoding temp folder.

Many thanks for help and support!
Davide
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Sep 10, 2012 12:58 pm

Re: Trascoding in RAM for local files

That's not possible. You can try to run detailed log, find the ffmpeg command used to transcode, run in manually and check how many FPS it's doing.
<<

pdneri

Streaming enthusiast

Posts: 29

Joined: Tue Dec 27, 2011 9:25 pm

Location: Italy

Post Thu Sep 13, 2012 8:57 pm

Re: Trascoding in RAM for local files

I did it and this is the result:
  Code:
Output #0, mpegts, to 'F:\Serviio temp\Serviio\transcoding-temp-51139-96-ORIGINA
L.stf':
  Metadata:
    WMFSDKVersion   : 12.0.7601.17514
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
    encoder         : Lavf54.15.102
    Stream #0:0: Video: mpeg2video, yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k tb
n, 29.97 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, flt, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (wmv3 -> mpeg2video)
  Stream #0:1 -> #0:1 (wmapro -> ac3)
Press [q] to stop, [?] for help
Multiple frames in a packet from stream 1
frame=   21 fps=0.0 q=3.0 size=     491kB time=00:00:00.63 bitrate=6348.4kbits/s
frame=   43 fps= 41 q=3.0 size=     967kB time=00:00:01.29 bitrate=6120.9kbits/s
frame=   67 fps= 43 q=3.0 size=    1382kB time=00:00:01.77 bitrate=6379.0kbits/s
frame=   92 fps= 44 q=3.0 size=    1819kB time=00:00:02.31 bitrate=6428.1kbits/s
frame=  115 fps= 44 q=3.0 size=    2275kB time=00:00:02.95 bitrate=6295.7kbits/s
frame=  139 fps= 45 q=3.0 size=    2735kB time=00:00:03.59 bitrate=6225.9kbits/s
frame=  149 fps= 41 q=3.0 size=    3060kB time=00:00:04.17 bitrate=6003.3kbits/s
frame=  169 fps= 41 q=3.0 size=    3396kB time=00:00:04.81 bitrate=5778.8kbits/s
frame=  183 fps= 39 q=3.0 size=    3582kB time=00:00:05.10 bitrate=5750.2kbits/s
frame=  197 fps= 38 q=3.0 size=    3833kB time=00:00:05.51 bitrate=5688.0kbits/s
frame=  207 fps= 36 q=3.0 size=    4299kB time=00:00:05.83 bitrate=6032.4kbits/s
frame=  229 fps= 37 q=3.0 size=    5181kB time=00:00:06.47 bitrate=6550.0kbits/s
frame=  248 fps= 37 q=3.0 size=    5865kB time=00:00:07.18 bitrate=6689.5kbits/s
frame=  273 fps= 38 q=3.0 size=    6147kB time=00:00:08.07 bitrate=6232.9kbits/s
frame=  296 fps= 38 q=3.0 size=    6416kB time=00:00:08.94 bitrate=5877.8kbits/s
frame=  317 fps= 38 q=3.0 size=    6717kB time=00:00:09.67 bitrate=5685.0kbits/s
Audio timestamp 942120 < 943171 invalid, cliping
frame=  342 fps= 39 q=3.0 size=    7129kB time=00:00:10.83 bitrate=5392.6kbits/s
frame=  363 fps= 39 q=3.0 size=    7324kB time=00:00:11.24 bitrate=5334.8kbits/s
frame=  394 fps= 40 q=3.0 size=    7633kB time=00:00:12.27 bitrate=5095.7kbits/s
frame=  420 fps= 40 q=3.0 size=    7850kB time=00:00:13.07 bitrate=4920.3kbits/s
frame=  435 fps= 40 q=3.0 size=    8141kB time=00:00:13.83 bitrate=4819.3kbits/s
frame=  439 fps= 38 q=3.0 size=    8913kB time=00:00:14.57 bitrate=5009.5kbits/s
frame=  448 fps= 37 q=3.0 size=    9262kB time=00:00:14.73 bitrate=5149.2kbits/s
frame=  468 fps= 38 q=3.0 size=    9880kB time=00:00:14.99 bitrate=5399.0kbits/s
frame=  486 fps= 37 q=3.0 size=   10558kB time=00:00:15.47 bitrate=5590.7kbits/s
frame=  502 fps= 37 q=3.0 size=   11201kB time=00:00:15.88 bitrate=5775.9kbits/s


... after a while fps decrease to about 25.
Is there something I can do to improve this?

thanks,
Davide
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Sep 13, 2012 10:06 pm

Re: Trascoding in RAM for local files

if yiu have multicore CPU you can increase number of cores to use in the console.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Sep 14, 2012 9:41 am

Re: Trascoding in RAM for local files

pdneri wrote:... after a while fps decrease to about 25.
Is there something I can do to improve this?

I suggest to uncheck automatic library refresh (orange box) http://wiki.serviio.org/doku.php?id=ser ... _explained
Because if serviio refreshes the library during a transcoding, CPU load rising and process fps decreasing.
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

pdneri

Streaming enthusiast

Posts: 29

Joined: Tue Dec 27, 2011 9:25 pm

Location: Italy

Post Fri Sep 14, 2012 7:31 pm

Re: Trascoding in RAM for local files

thanks both even if not useful.
already 2 cores used.
and I don't think library refresh is the cause because even when fps is 35 at beginning, video is laggy.
could it be a network problem?
transfer rate is "only" 3mb/sec but maybe some other thing is not good enough.
I have a gigabit router and both TV and server use wired lan.
<<

qwertinsky

Serviio newbie

Posts: 2

Joined: Mon Sep 17, 2012 5:12 pm

Post Tue Sep 18, 2012 4:09 pm

Re: Trascoding in RAM for local files

If you have a lot of RAM you could try setting up a RAMDISK and setting Serviio to use the ramdisk as for it's transcode temp file
<<

pdneri

Streaming enthusiast

Posts: 29

Joined: Tue Dec 27, 2011 9:25 pm

Location: Italy

Post Wed Sep 19, 2012 7:30 am

Re: Trascoding in RAM for local files

I have 3gb, I guess I could dedicate 2Gb to a Ram disk. Is this enough?
can you give me some instructions please?
Thanks
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Sep 19, 2012 8:09 am

Re: Trascoding in RAM for local files

Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

pdneri

Streaming enthusiast

Posts: 29

Joined: Tue Dec 27, 2011 9:25 pm

Location: Italy

Post Wed Sep 19, 2012 1:33 pm

Re: Trascoding in RAM for local files

Tested: still laggy! :(
Definitely it is NOT a problem of disk i/o.
Any other suggestion?

while trancoding:
cpu is at 72% (both 2 cores used are at 72%)
1Gb free RAM (out of 3 total)
about 3Mb/s network trhouput (wired gigabit between server and router, wired 100Mbit between router and TV)

none of these seem causing lags :shock:

Thanks!
Davide
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Sep 19, 2012 1:43 pm

Re: Trascoding in RAM for local files

you could let the transcode job finish, then look at the temp transcoded file, rename it to .mpg (from .stf) and add it to your library, then play natively. Does it still lag?
<<

pdneri

Streaming enthusiast

Posts: 29

Joined: Tue Dec 27, 2011 9:25 pm

Location: Italy

Post Wed Sep 19, 2012 8:06 pm

Re: Trascoding in RAM for local files

no, it doesn't.
So we can exclude network.
Already excluded disks.
We need to exclude cpu or ram ... :geek:
<<

robertsearle

Serviio lover

Posts: 66

Joined: Mon May 07, 2012 6:13 pm

Post Sun Nov 11, 2012 8:16 pm

Re: Trascoding in RAM for local files

Try this trick

  • Start the movie
  • pause the movie
  • wait for 25 seconds
  • unpause / continue playing the movie

Does that make it better or worse?

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 24 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.