Jump to content

Best Method for Transcoding Acceleration


Go to solution Solved by Waldonnis,

Recommended Posts

WhackOBill
Posted

I've noticed that when I try to use hardware acceleration for transcoding, QuickSync in my case, it always breaks something and at the client end it often won't play correctly ... versus no acceleration.  There are other options in the pull-down menu however and I'm wondering if one is considered more solid than the others.  For example, CUDA for transcoding assistance.  Would I get more reliable transcoding using one of these other options?  For example, would I be better off avoiding QuickSync and instead installing something like an NVidia 1050 or 1030 card just for the CUDA cores to assist in transcoding?

Waldonnis
Posted

QuickSync does seem to be pickier (and a bit slower) than NVENC, but honestly, it produces better quality output and has more options to work with to further tweak the output.  NVENC doesn't do B frame generation with HEVC, for example, and even the ref frame count is limited (also, smaller CU max size, no tuning options for preserving detail..I have a list of features I wish it supported, so I could go on  :P ).  The real trick is to find settings that work reliably for all input files and generates output that's playable on the myriad of client devices out there.  When errors occur, the error messages from ffmpeg are very vague, which doesn't help either, but they can only do so much with the rather generic error codes returned by the driver.  If there are specific files that QSV is failing with, reporting those issues would be immensely helpful, of course.

 

Also to clarify, NVENC isn't really using the CUDA cores for encoding - the encoder is dedicated silicon on nVidia cards that's doing the work (along with the memory bus on the card), so unlike 3D rendering, adding more cores doesn't really mean anything.  This is actually the "better" way to handle it since the marketed purpose of it is to allow people to stream their gaming sessions without impacting game performance, so separating the encoding workload from the rendering pipeline makes sense.  It also lets people who just want the en/decoder support buy the cheaper cards since they don't need the rendering performance of the higher level/cost products (which is a nice benefit for HTPC applications).  It's worth noting too that consumer-level nVidia cards are limited to two simultaneous encoding sessions - may or may not make a difference depending on how much transcoding your server has to perform at any given time.

 

If you do decide to go with an nVidia card and the limitations don't bother you, be sure to choose a 10-series (Pascal) since it supports HEVC Main10 en/decoding and they claim performance increases even with h.264 compared to previous generations.  I'm pretty sure the 1030 shares the same encoder and decoder with its more costly siblings, but I would recommend confirming that before any purchase.  Also (full disclosure here), I would expect a 1030 or 1050 to be a tad slower at encoding compared to something like a 1080Ti due to differences in the cards' memory bus width, but I would think the difference would be relatively small and it would still be a LOT faster than software encoding, especially when HEVC is involved.

WhackOBill
Posted

Wow, that was enlightening.  And to be sure, I'm thinking the issues are in ffmpeg and not Emby per se.  I'm just not sure where to go to find and tweak on this stuff.  Most of my material (99%) is H.264 720p stuff.  I transcode to off-site Emby Theater and to the Emby iOS client on iPads and iPhone 7's and 6S's.

 

Is there a place where transcoding errors are logged?

WhackOBill
Posted

In looking at my system, it's set to use a Custom Version of ffmpeg at "C:\Users\WMC\AppData\Roaming\MediaBrowser-Server\ffmpeg\20160410\ffmpeg.exe".  I can't even move it to "Use system installed version" as it says it can't find that path.  I wonder if I may need to experiment with newer versions ... less than a year old anyway.

  • Solution
Waldonnis
Posted

In looking at my system, it's set to use a Custom Version of ffmpeg at "C:\Users\WMC\AppData\Roaming\MediaBrowser-Server\ffmpeg\20160410\ffmpeg.exe".  I can't even move it to "Use system installed version" as it says it can't find that path.  I wonder if I may need to experiment with newer versions ... less than a year old anyway.

 

The "Use system installed version" is more useful for Linux, since the user may have a pre-packaged ffmpeg that they would rather use (from a PPA or their distribution) or compile their own and install it for system-wide use.  For Windows, I would assume that if you have a version of ffmpeg in the path, it would be able to use it...but I've never tried it personally (I should try this one of these days - I compile my own ffmpeg weekly and use that for everything else I do).

 

You can try a Zeranoe nightly build of ffmpeg (don't have the link handy here, but it's easy to find via a Google search) if you'd like and see if it helps - just be sure to pick the static version that matches your OS (32/64 bit).  I'd recommend not overwriting/replacing the ffmpeg binaries that ship with Emby, so you can always go back to those if you run into other problems.  Just drop the new ffmpeg/ffprobe into another directory and point that custom version path option to the new ffmpeg.exe for testing.

 

Since you posted your install path, your transcoding logs should be found in "C:\Users\WMC\AppData\Roaming\MediaBrowser-Server\logs", and should be pretty easy to spot (ffmpeg-*.txt).  For troubleshooting individual cases, the server log would be helpful as well.

  • Like 1
  • 1 month later...
Posted (edited)

New user thinking of switching to Emby from Plex, couple of related questions:

 

NVENC is limited to two streams, so if I drop a 1030 in my server, is Emby smart enough to use software encoding for a third encode job? 

 

Also, are 1080i60 sources limited to being encoded to 1080p30, or can 1080p60 be done (line doubling), I'd also be happy with 720p60?

Edited by lobosrul
Posted

NVENC is limited to two streams, so if I drop a 1030 in my server, is Emby smart enough to use software encoding for a third encode job? 

 

Not yet but it is something we plan to add in the future, thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...