FAQ  •  Register  •  Login

Transcoding performance issues

<<

Schelter

Serviio newbie

Posts: 4

Joined: Fri Jan 11, 2013 10:39 am

Post Thu May 30, 2013 6:57 pm

Transcoding performance issues

Hello,

i'm using a HP N54L Microserver (2,2Ghz Dualcore AMD) as a NAS and UPnP Streaming Server with Serviio. Everything works fine, until it needs to transcode a file. The CPU hit 100% then, and the video stutters. Now i'm wondering if it's possible to tune the transcoding somehow? As I see, lots of people have performance problems with transcoding, but I didn't found a solution so far.
Does anyone have an Idea?
<<

weiyentan

Streaming enthusiast

Posts: 20

Joined: Thu Apr 05, 2012 1:18 pm

Post Thu May 30, 2013 7:41 pm

Re: Transcoding performance issues

We had transcoding performance issues after a period of watching a series of videos.

What I did was to put the transcoding files on a separate physical disk (and that physical disk was an external one that was plugged into modem router (Cisco one)). The transcoding files will be around 1-2 GB tops per device, but that extra disk made a world of difference.

Another thing that could cause stuttering is the network....but in this case it sounds like it could be either CPU or disk. The computer is doing too many things at once.
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Fri May 31, 2013 1:45 am

Re: Transcoding performance issues

Some preliminaries:
  • Firstly make sure you have an up-to-date version of ffmpeg. There have been some improvements in performance in ffmpeg over time;
  • set the number of cores in Serviio console, on the Delivery tab, Transcoding to the maximum you have;
  • Ensure the drive where your temporary transcoded files are stored is a fast drive and has plenty of space;
  • If you don't use subtitles - in Serviio console, on the Delivery tab, Subtitles select Enable Subtitles and disable (uncheck) all other options. The other options are CPU intensive
See how the above goes first.
The only way to really tune transcoding is to avoid it ;) . Depending on your renderer, you can tweak your profile to minimise the amount of transcoding going on. You need to work out what level of transcoding is required for each file type you play. Most of the profiles that come with Serviio are pretty good at doing this - some are better than others - but each can be tweaked depending on the exact model of your TV/renderer. The following are some "rules" to apply when doing this - ranking from least processor intensive to most:

  1. Renderer can play the file natively - do not transcode, stream the file as is. This has lowest CPU usage.
  2. Renderer can handle both video and audio streams, but not the container type - in the profile set rules to remux the video and audio into a new container. This has low CPU usage.
  3. Renderer can handle the video stream, but does not support the audio stream - in the profile set rules to remux the video, and change the audio type to a supported type. This has low - mid CPU usage.
  4. Renderer cannot support the video type - in the profile set rules to transcode the video (and audio if necessary). This has high to extremely high CPU usage.
Only the last case has high CPU usage. It is this type we need to avoid as much as possible.

Where it cannot be avoided, the only choice then is to use an external program to permanently transcode (convert) the video into something your renderer supports (this moves the file from a type 4 to type 1). Plenty of free stuff on the web to do this - I have used XMedia Recode in the past for this, but there's plenty of others.

So a bit of work - people on the forum can assist but give it a go yourself. You'll need to let us know what type of media files you are playing (MediaInfo details) and what your renderers are to help further.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

Schelter

Serviio newbie

Posts: 4

Joined: Fri Jan 11, 2013 10:39 am

Post Fri May 31, 2013 9:00 pm

Re: Transcoding performance issues

I've done some tweaks now. The OS and transcoding directory is on a SSD with plenty of space. The movies are on a separe HDD.
I've updated the ffmpeg, the old one was a 32-bit, i've updated it to 64-bit. Set number of cores to 2.
disabled the options in subtitles. played a little with profiles. I think I understand the problem now.
In case 1-3 everything works fine now, with no transcoding CPU is around 8%, in case 2 and 3 CPU goes up to 40%, but everything is still ok.
In case 4, if the video needs to be transcoded, that kills the performance. CPU hits 90-95% then, and playback is not possible - and that look strange to me. I'm running Win 2008 R2 on the machine, and I can play the videos, even in 1080p, perfectly with something around 30-40% CPU usage. why does transcoding need so much more?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri May 31, 2013 10:24 pm

Re: Transcoding performance issues

Decoding (playback) is much less expensive than encoding.
<<

Schelter

Serviio newbie

Posts: 4

Joined: Fri Jan 11, 2013 10:39 am

Post Sat Jun 01, 2013 12:22 pm

Re: Transcoding performance issues

hmmk, so as long as ffmpeg uses CPU instead of GPU, there is no way to speed it up, right? can serviio use ffdshow instead of ffmpeg?

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 7 guests

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