Jump to content


Photo

MB Server OSX - Extreme CPU load while transcoding

OSX Server transcoding CPU Media Browser Server Mac

  • Please log in to reply
5 replies to this topic

#1 Florux OFFLINE  

Florux

    Advanced Member

  • Members
  • 76 posts
  • Local time: 11:24 PM
  • LocationDubai, United Arab Emirates

Posted 19 February 2015 - 04:02 PM

Hello,

 

I am in the process of moving from Plex to MediaBrowser, and have noticed that the server load when transcoding is rather extreme.

 

Server: MediaBrowser Server Version 3.0.5518.3
Hardware: Mac Mini (2011) with 2.7GHz Intel Core i7 with 8GB RAM running OSX 10.9.5
 
Client: Nexus 7 (Android 5.0.2) running MediaBrowser version 2.2.03
 
 
Network: Same subnet, Nexus 2 meters away from high speed access point with 1GE link to MacMini
 
Symptom: ffmpeg using 372% CPU, Mac Mini getting warm, fan going full speed.
 
The file being transcoded is as follows. Have not changed any default transcode settings. Server set to "Auto". 
Codec: H264
Profile: High
Level: 41
Resolution:1920x1080
Aspect ratio:16:9
Anamorphic: No
Interlaced: No
Framerate: 23.97602
Bitrate: 10732 kbps
Bit depth: 8 bit
Pixel format: yuv420p
Ref frames: 4
CABAC: Yes
 
Pictures of system load:
While transcoding, extreme load:
54e63f11b98c4_ScreenShot20150219at173440
 
After transcoding, normal load:
54e63f3e24208_ScreenShot20150219at173525
 
As you can see it's a huge difference.
 
I have run Plex Media Server for a few years, and it manages to transcode multiple sessions to multiple different clients without getting the same extreme load. 
 
Is this due to a horrible misconfiguration on my end, or a bug in how MediaBrowserServer on OSX uses ffmpeg?
 
Attached is what I presume to be the correct transcode log.
 
Please advise - this is my first experience with Media Server, and first day of using it, and as I didn't find this referenced anywhere, I figured this would probably be the place to ask.
 
Thanks much in advance!
 
Attached File  transcode.log   11.09KB   1 downloads
 
 
 


#2 Logos302 OFFLINE  

Logos302

    Advanced Member

  • Members
  • 749 posts
  • Local time: 02:24 PM

Posted 19 February 2015 - 05:03 PM

As far as I know this is normal, it is set to trans-code as fast as possible.  But shares the cpu with other tran-scoding sessions just fine.


  • Florux likes this

#3 Florux OFFLINE  

Florux

    Advanced Member

  • Members
  • 76 posts
  • Local time: 11:24 PM
  • LocationDubai, United Arab Emirates

Posted 19 February 2015 - 05:15 PM

Thanks for quick response! 

 

I'm a bit puzzled if this is normal as the CPU load now is many times higher than multiple similar transcoding loads on Plex, which I believe also uses ffmpeg. I also found the picture to be a tad more grainy here, so I have been a bit reluctant to lower the transcode quality. I know full well it's not a good habit to compare too much to previously used, competing solutions. However, in this case I would say the difference is so big that it could constitute a real problem.

 

 -Florux



#4 Florux OFFLINE  

Florux

    Advanced Member

  • Members
  • 76 posts
  • Local time: 11:24 PM
  • LocationDubai, United Arab Emirates

Posted 19 February 2015 - 05:22 PM

Hi again,

 

I tried changing the transcoder settings to both Fast and Higher Quality, as well as Max Quality, and there was no noticable difference in CPU usage between them. It all maxed out at 370-380% CPU usage.

 

 -Florux



#5 Logos302 OFFLINE  

Logos302

    Advanced Member

  • Members
  • 749 posts
  • Local time: 02:24 PM

Posted 19 February 2015 - 07:48 PM

I've never used plex so I'm not sure about how it does it transcoding but just because it uses ffmpeg does not mean that it uses it the same way.  MB3 tries to transcode the whole file as fast as possible so that it's finished, and the server can get on doing what ever else it needs too.   But @Luke or @ebr can probably give you a better explanation of what is happening then me.  



#6 Tuxedo OFFLINE  

Tuxedo

    Member

  • Members
  • 20 posts
  • Local time: 01:24 PM
  • LocationSeattle, WA

Posted 03 July 2015 - 12:04 AM

Hi again,

 

I tried changing the transcoder settings to both Fast and Higher Quality, as well as Max Quality, and there was no noticable difference in CPU usage between them. It all maxed out at 370-380% CPU usage.

 

 -Florux

 

If you look at BaseStreamingService.cs you can see the various settings used for each of those depending on what codec is being used for your client. It maxes out because ffmpeg is going to transcode the whole video to HLS (or MPEG-DASH) unless you have throttling on, in which case ffmpeg will be getting paused and unpaused.

 

I've never used plex so I'm not sure about how it does it transcoding but just because it uses ffmpeg does not mean that it uses it the same way.  MB3 tries to transcode the whole file as fast as possible so that it's finished, and the server can get on doing what ever else it needs too.

This. emby kicks off ffmpeg to reencode the video to HLS in 3 second chunks (at least that's what it does for my AndroidTV clients) and it takes full advantage of your system to produce each one.

 

Looking at TranscodingThrottler.cs, if you have the throttler turned on it'll check every 5 seconds to see how far ahead the encode process is compared to how much of the video has been downloaded. ffmpeg will get paused every now and then as the server lets the client catch up, but any moment when ffmpeg is running it'll be working as hard as possible.


Edited by Tuxedo, 03 July 2015 - 12:05 AM.






Also tagged with one or more of these keywords: OSX, Server, transcoding, CPU, Media Browser Server, Mac

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users