Jump to content

GPU Transcoding (Intel QuickSync and nVidia NVENC)


witteschnitte

Recommended Posts

Schimi

any infos about AMDs VCE?

 

i don´t had this topic in focus for a long time :-(

Link to comment
Share on other sites

any infos about AMDs VCE?

 

i don´t had this topic in focus for a long time :-(

 

If you can help research whether or not ffmpeg supports it, and how to use it, then yes we can look at it.

Link to comment
Share on other sites

The latest server has open max support, you just need to bring your own ffmpeg build

Link to comment
Share on other sites

chrismb

FYI in post #703

 

the script that I linked to I needed to add an option to curl --insecure it kept failing when trying to download from sourceforge for one of the packages.  I changed line 408 to 

  curl --insecure -4 $url -O || exit 1

 

from

 

  curl -4 $url -O || exit 1

Link to comment
Share on other sites

dethknite

Is there any way we can get transcoding to utilize GPU + CPU as a fallback.  For instance.. the first two ffmpeg transcodes get fired off gpu, and are stored as running... any subsequent request is then fired off with CPU... until one GPU ffmpeg terminates... etc.

Link to comment
Share on other sites

screwattackthis

I'm having problems getting quick sync to work.  Just wondering, is this something that should work on a sandy bridge cpu?  It has quick sync support but ffmpeg fails with "error initializing an internal MFX session."  Did a quick google and I found a reference to needing Ivy Bridge+  for ffmpeg but I'm not sure.  If so, might be time to upgrade my server...

Link to comment
Share on other sites

Is there any way we can get transcoding to utilize GPU + CPU as a fallback.  For instance.. the first two ffmpeg transcodes get fired off gpu, and are stored as running... any subsequent request is then fired off with CPU... until one GPU ffmpeg terminates... etc.

 

A setting to limit simultaneous gpu transcodes might not be a bad idea.

Link to comment
Share on other sites

isamudaison

I'm having a problem with intel quick sync with 'some' movies being transcoded and some not.  I have a skylake i5, running linux mint 18.

 

Here's a failed transcode log (it seems like the built-in ffmpeg params are incorrect for IQS ?)

 

Any ideas?

 

[Edit]  see now that skylake isn't supported?  is this even with ubuntu 16.04-based distros?

iqs-fail.txt

Edited by isamudaison
Link to comment
Share on other sites

I'm having a problem with intel quick sync with 'some' movies being transcoded and some not.  I have a skylake i5, running linux mint 18.

 

Here's a failed transcode log (it seems like the built-in ffmpeg params are incorrect for IQS ?)

 

Any ideas?

 

[Edit]  see now that skylake isn't supported?  is this even with ubuntu 16.04-based distros?

 

yea at first glance that looks fine to me but there's obviously an issue. it will just take some trial and error with the command line to find out what it's complaining about.

Link to comment
Share on other sites

  • 3 weeks later...
nateify

Here is the transcode log I get after enabling Intel QSV on Debian with a Skylake chip: 

http://192.168.1.218:8096/emby/videos/e827af434d8de649245f544eee4ea9e6/stream.mkv?DeviceId=0dd917b7d6866aeeff43bbab046cd34b&MediaSourceId=e827af434d8de649245f544eee4ea9e6&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=592000&AudioBitrate=128000&MaxAudioChannels=6&Level=51&Profile=high&PlaySessionId=89215f0e58fb4930a37ea67f4edc4625&api_key=f30083cc733b4a1490ae1c200d51bd44&CopyTimestamps=true&ForceLiveStream=false&EnableSubtitlesInManifest=false

{"Protocol":"File","Id":"e827af434d8de649245f544eee4ea9e6","Path":"/media/a13a6016-81b2-4096-aeba-e5b457e92870/MOVIES/Next Avengers Heroes of Tomorrow (2008)/Next Avengers Heroes of Tomorrow (2008).mkv","Type":"Default","Container":"mkv","Name":"1080P/H264/DTS","RunTimeTicks":46827190000,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":false,"VideoType":"VideoFile","MediaStreams":[{"Codec":"h264","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1001/48000","NalLengthSize":"4","IsInterlaced":false,"IsAVC":true,"BitRate":5322674,"BitDepth":8,"RefFrames":4,"IsDefault":true,"IsForced":false,"Height":1080,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"High","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":41,"IsAnamorphic":false},{"Codec":"dca","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","DisplayTitle":"Eng DTS 5.1 Default","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":1536000,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"DTS","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":5322674,"RequiredHttpHeaders":{}}

/usr/bin/ffmpeg -fflags +genpts -i file:"/media/a13a6016-81b2-4096-aeba-e5b457e92870/MOVIES/Next Avengers Heroes of Tomorrow (2008)/Next Avengers Heroes of Tomorrow (2008).mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -force_key_frames expr:gte(t,n_forced*5) -vf "scale=trunc(min(max(iw\,ih*dar)\,720)/2)*2:trunc(ow/dar/2)*2" -copyts -avoid_negative_ts disabled -start_at_zero -preset 7 -look_ahead 0 -b:v 592000 -maxrate 592000 -bufsize 1184000 -vsync -1 -profile:v high -level 5.1 -map_metadata -1 -threads 0 -codec:a:0 libmp3lame -ac 2 -ab 128000 -af "aresample=async=1,volume=2" -y "/var/lib/emby-server/transcoding-temp/edcd427cd983dc76dac1c5e6a91bca8b.mkv"


ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Unrecognized option 'look_ahead'.
Error splitting the argument list: Option not found
Link to comment
Share on other sites

 

Here is the transcode log I get after enabling Intel QSV on Debian with a Skylake chip: 

http://192.168.1.218:8096/emby/videos/e827af434d8de649245f544eee4ea9e6/stream.mkv?DeviceId=0dd917b7d6866aeeff43bbab046cd34b&MediaSourceId=e827af434d8de649245f544eee4ea9e6&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=592000&AudioBitrate=128000&MaxAudioChannels=6&Level=51&Profile=high&PlaySessionId=89215f0e58fb4930a37ea67f4edc4625&api_key=f30083cc733b4a1490ae1c200d51bd44&CopyTimestamps=true&ForceLiveStream=false&EnableSubtitlesInManifest=false

{"Protocol":"File","Id":"e827af434d8de649245f544eee4ea9e6","Path":"/media/a13a6016-81b2-4096-aeba-e5b457e92870/MOVIES/Next Avengers Heroes of Tomorrow (2008)/Next Avengers Heroes of Tomorrow (2008).mkv","Type":"Default","Container":"mkv","Name":"1080P/H264/DTS","RunTimeTicks":46827190000,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":false,"VideoType":"VideoFile","MediaStreams":[{"Codec":"h264","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1001/48000","NalLengthSize":"4","IsInterlaced":false,"IsAVC":true,"BitRate":5322674,"BitDepth":8,"RefFrames":4,"IsDefault":true,"IsForced":false,"Height":1080,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"High","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":41,"IsAnamorphic":false},{"Codec":"dca","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","DisplayTitle":"Eng DTS 5.1 Default","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":1536000,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"DTS","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":5322674,"RequiredHttpHeaders":{}}

/usr/bin/ffmpeg -fflags +genpts -i file:"/media/a13a6016-81b2-4096-aeba-e5b457e92870/MOVIES/Next Avengers Heroes of Tomorrow (2008)/Next Avengers Heroes of Tomorrow (2008).mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -force_key_frames expr:gte(t,n_forced*5) -vf "scale=trunc(min(max(iw\,ih*dar)\,720)/2)*2:trunc(ow/dar/2)*2" -copyts -avoid_negative_ts disabled -start_at_zero -preset 7 -look_ahead 0 -b:v 592000 -maxrate 592000 -bufsize 1184000 -vsync -1 -profile:v high -level 5.1 -map_metadata -1 -threads 0 -codec:a:0 libmp3lame -ac 2 -ab 128000 -af "aresample=async=1,volume=2" -y "/var/lib/emby-server/transcoding-temp/edcd427cd983dc76dac1c5e6a91bca8b.mkv"


ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Unrecognized option 'look_ahead'.
Error splitting the argument list: Option not found

 

Your build of ffmpeg does not support the -look_ahead parameter we are using, so you need to update that. thanks.

Link to comment
Share on other sites

nateify

Your build of ffmpeg does not support the -look_ahead parameter we are using, so you need to update that. thanks.

From the log it seems it is trying to use ffmpeg in /usr/bin/ffmpeg but I have a more up to date install in /usr/local/bin/ffmpeg, how can I set the custom ffmpeg path for Emby on Linux? I don't see it in the web GUI. I am using Debian 8.0

Link to comment
Share on other sites

ah yes that's correct, because the ubuntu package is overriding via command line to use your system installed ffmpeg

Link to comment
Share on other sites

nateify

I have updated the ffmpeg and the log reports it is using 3.1.1 but it gives the same error for "look_ahead". I assume there are outstanding compatibility issues considering I am on both a Skylake chip and a Debian install? Will quick sync ever be possible on this configuration?

Link to comment
Share on other sites

I have updated the ffmpeg and the log reports it is using 3.1.1 but it gives the same error for "look_ahead". I assume there are outstanding compatibility issues considering I am on both a Skylake chip and a Debian install? Will quick sync ever be possible on this configuration?

 

Quick Sync is possible but if your ffmpeg build is still erroring on look_ahead then that is what needs to be resolved.

Link to comment
Share on other sites

robertp221

I have nvenc transcoding working on my server using a GTX 950(also tried a 945), but when i go to watch live HD tv it will only play back for 7 seconds and then stop. I use a HDHR prime on comcast. I can watch SD channels with no issues and if i switch the trans-coding back to the CPU the issue goes away. I've adjusted bit rate a few times and get the same results no matter if i choose 60Mbps or 1Mbps. I am using zeranoe's latest ffmpeg. Any suggestions?

 

7 Second HD Log:

https://paste2.org/cgUGtNgN

 

SD No Issue Log:

https://paste2.org/KtUJ9pee

Link to comment
Share on other sites

jscoys

I have nvenc transcoding working on my server using a GTX 950(also tried a 945), but when i go to watch live HD tv it will only play back for 7 seconds and then stop. I use a HDHR prime on comcast. I can watch SD channels with no issues and if i switch the trans-coding back to the CPU the issue goes away. I've adjusted bit rate a few times and get the same results no matter if i choose 60Mbps or 1Mbps. I am using zeranoe's latest ffmpeg. Any suggestions?

 

7 Second HD Log:

https://paste2.org/cgUGtNgN

 

SD No Issue Log:

https://paste2.org/KtUJ9pee

Hello my dear!

 

Luc will disactivate throttling when NVENC is selected. It seems that it makes FFMPEG stopping because it stops the transco, and is not able to go on when it is time to transcode more of the movie...

 

Now it is working for me. However, my video card is used only at 2%-4%. Is it your case?

Link to comment
Share on other sites

pearsco

Quick question. Thinking about buying a 5th gen NUC i5 and giving GPU transcoding a try on Windows 10. Do I simply need to change the drop down on the server dashboard or do I still need to replace the MediaBrowser API, modify the config file and grab a different version of ffmpeg ?

Link to comment
Share on other sites

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...