Jump to content

NVENC experimental


cptbstd

Recommended Posts

cptbstd

Hi, having some sucess and some failures :( currently running on running on Windows server 2012 r2 with Emby 3.0.6000.0. I have a nvidia quadro k2000 with driver 368.86. I enable NVENC experimental. Some videos work, some do not.

 

working

Codec H264

Codec tag avc1

AVC Yes

Profile Main

Level 31

Resolution 1280x692

Aspect ratio 1.85:1

anamorphic NO

Interlaced NO

Framerate 25

Bitrate 1145 kbps

Bit depth 8 bit

pixel format yuv420p

ref frames 2

NAL 4

 

NO TRANSCODE LOG

 

not working

codec H264

codec tag avc1

AVC Yes

Profile Main

Level 31

Resolution 1280x720

aspect ration 16:9

anamorphic NO

Interlaced NO

Framerate 23.97602

Bitrate 1712 kbps

Bit deth 8 bit

pixel formate yuv420p

Ref frames 2

NAL 4

Container mp4

 

Transcode LOG:

http://10.10.10.10:8096/videos/5ecb019a71bf3a1f0e8bd87a5f042622/stream.mp4?DeviceId=f9b155d9359fcd92cc486db73d31c634&MediaSourceId=5ecb019a71bf3a1f0e8bd87a5f042622&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&VideoBitrate=1372000&AudioBitrate=128000&MaxAudioChannels=6&Level=41&Profile=high&PlaySessionId=44ab7843ba864770a21238d63e081ae0&api_key=d5d7187531c3406781b9d7b27aae2e67&CopyTimestamps=false&ForceLiveStream=false&EnableSubtitlesInManifest=false

{"Protocol":"File","Id":"5ecb019a71bf3a1f0e8bd87a5f042622","Path":"G:\\Shares\\Movies\\xxxxxxxxxxxxxxxxx.mp4","Type":"Default","Container":"mp4","Name":"720P/H264/AAC","RunTimeTicks":68399020000,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":false,"VideoType":"VideoFile","MediaStreams":[{"Codec":"h264","CodecTag":"avc1","Language":"und","TimeBase":"1/24000","CodecTimeBase":"1001/48000","NalLengthSize":"4","IsInterlaced":false,"IsAVC":true,"BitRate":1753479,"BitDepth":8,"RefFrames":2,"IsDefault":true,"IsForced":false,"Height":720,"Width":1280,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"Main","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":31,"IsAnamorphic":false},{"Codec":"aac","CodecTag":"mp4a","Language":"und","TimeBase":"1/44100","CodecTimeBase":"1/44100","DisplayTitle":"Und AAC stereo Default","IsInterlaced":false,"ChannelLayout":"stereo","BitRate":58931,"Channels":2,"SampleRate":44100,"IsDefault":true,"IsForced":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0},{"Codec":"srt","Language":"eng","DisplayTitle":"Eng","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":2,"IsExternal":true,"IsTextSubtitleStream":true,"SupportsExternalStream":true,"Path":"G:\\Shares\\Movies\\xxxxxxxxxxxx)\\xxxxxxxxxxxxxxxxxxxxxxxx.srt"}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":1815946,"RequiredHttpHeaders":{}}

C:\Users\Administrator\AppData\Roaming\Emby-Server\ffmpeg\20160410\ffmpeg.exe -fflags +genpts -i file:"G:\Shares\Movies\xxxxxxxxxxxxxx\xxxxxxxxxxxxxxxxxxxxxxx" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -force_key_frames expr:gte(t,n_forced*5) -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -preset default -b:v 1372000 -maxrate 1372000 -bufsize 2744000 -vsync -1 -profile:v high -level 4.1 -map_metadata -1 -threads 0 -codec:a:0 copy -f mp4 -movflags frag_keyframe+empty_moov -y "Y:\transcoding-temp\transcoding-temp\d4aa7a1c132a709bf0a5339486d35559.mp4"


ffmpeg version N-79277-g0c90b2e Copyright © 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 20.100 / 55. 20.100
  libavcodec     57. 34.100 / 57. 34.100
  libavformat    57. 32.100 / 57. 32.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 41.100 /  6. 41.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[h264 @ 00000000009f52e0] Increasing reorder buffer to 1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:G:\Shares\Movies\xxxxxxxxxxxxxxxxxxx.mp4':

Edited by cptbstd
Link to comment
Share on other sites

Thanks for the info. It's very new to us so we're still looking to find what works and what doesn't. Thanks.

Link to comment
Share on other sites

QUIKFLUX

Thanks for the info. It's very new to us so we're still looking to find what works and what doesn't. Thanks.

HDHomeRun live tv does not work with this option enabled, i get an error saying there was a problem playing 

Link to comment
Share on other sites

  • 2 weeks later...
jscoys

Hello guys little question. Despite the fact that I need to select NVENC in transco options, do I need a special version of FFMPEG? Seems that I still have the version of 5/08/2016 (I have the version 3.1.90.0 of the server). When I go into transco logs, I don't see any reference of NVENC... Thx.

Link to comment
Share on other sites

Hello guys little question. Despite the fact that I need to select NVENC in transco options, do I need a special version of FFMPEG? Seems that I still have the version of 5/08/2016 (I have the version 3.1.90.0 of the server). When I go into transco logs, I don't see any reference of NVENC... Thx.

 

Yes. You need to supply your own version for nvenc.

Link to comment
Share on other sites

jscoys

Yes. You need to supply your own version for nvenc.

Ok thx but... Where am I supposed to find it?

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

You will need to build it on your own as the nvenc licensing does not allow it to be redistributed, which is why none of the sites that host ffmpeg include it within their build.

  • Like 1
Link to comment
Share on other sites

jscoys

You will need to build it on your own as the nvenc licensing does not allow it to be redistributed, which is why none of the sites that host ffmpeg include it within their build.

Is there a tutorial or at least the link where I can download sources?

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Waldonnis

You will need to build it on your own as the nvenc licensing does not allow it to be redistributed, which is why none of the sites that host ffmpeg include it within their build.

This might have changed recently, as Nvidia has relicensed the header file that was in contention with ffmpeg's license. I would have to double check, but I believe recent Zeranoe ffmpeg builds include nvenc encoder support.

 

If needed, I might have a bookmark with the commit that removed the nonfree configure/compile switch requirement.

 

Edit: Found it here.  Light discussion is here.

Edited by Waldonnis
Link to comment
Share on other sites

jscoys

Hello guys. I get the 64 bits static of FFMPEG Zeranoe version. I tried, it seems to start well. But yesterday I tried with too different movies, and I don't know why but after several minutes it just stop playing. I tried with IOS clients.

 

Here are two logs.

transcode-3b4f2ee5-d604-4485-9e46-616f21e95cc6.txt

transcode-00460464-8e58-47c8-8287-9b44fc222881.txt

Link to comment
Share on other sites

jscoys

Notabene : When I switch the option from NVENC (Experimental) to "None" in the transco method, it just work fine, and I'm able to play the whole movies.

Link to comment
Share on other sites

jscoys

This might have changed recently, as Nvidia has relicensed the header file that was in contention with ffmpeg's license. I would have to double check, but I believe recent Zeranoe ffmpeg builds include nvenc encoder support.

 

If needed, I might have a bookmark with the commit that removed the nonfree configure/compile switch requirement.

 

Edit: Found it here. Light discussion is here.

Is it working for you?

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Waldonnis

Is it working for you?

All of my media is encoded to not require transcoding on any of my devices, so I don't use it for Emby transcoding.  I do use the Zeranoe builds for other purposes and have used the h264 and hevc nvenc encoders for testing purposes recently.  It's fussy, but works well enough for what the hardware encoders are designed to do.  Be aware that the hardware encoders aren't as featured as x264 is (or x265), so they may not work with some files/operations.

 

I'm not sure it's actually included yet in the zeranoe builds.

It is. I just downloaded the ffmpeg-20160812-e8b355a-win64-static build and they were listed in the encoders:

 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
 V..... hap                  Vidvox Hap encoder
 V..... libx265              libx265 H.265 / HEVC (codec hevc)
 V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_qsv             HEVC (Intel Quick Sync Video acceleration) (codec hevc)

I can run a test encode if needed, but the encoders seem to at least be listed and showing their respective options.

Link to comment
Share on other sites

jscoys

I'm not sure it's actually included yet in the zeranoe builds.

I downloaded the new version of today, static too. I really don't know if it is using GPU or not... Luke if you need to test you can rely on me. The next step for Emby is to use different versions of ffmpeg and when selecting the option of transco, Emby would select the proper ffmpeg.

 

 

Sent from my iPhone using Tapatalk

Edited by jscoys
Link to comment
Share on other sites

jscoys

Further tests : for different movies tested, it works well (not like my previous post where I explained that it blocked after several playback minutes...

 

Seems to start really quicker than before (when CPU was used).

 

In the logs I can see the parameter -enable-nvenc so I suppose it is enabled (if not please explain me how to see in logs that nvenc is indeed used)

 

- cpu is use at 45-50% in peek time (compared to 90-95% before). In idle state it remain around 13%.

 

Will give you more info when I Will test it in real conditions.

 

 

Sent from my iPhone using Tapatalk

  • Like 2
Link to comment
Share on other sites

RanmaCanada

So NVENC now works? That's great news.  Well not really as NVENC still limits us to 2 streams for those of us without Quadros haha.

 

Does anyone have a 10xx series card? They are supposed to be able to do 10bit x265, so it will be interesting to see what streams Emby decides to encode it as.  Most of my people use roku's or android boxes that can direct play everything, except for my 12bit anime haha.

Link to comment
Share on other sites

jscoys

I have a 750 ti which is able to decode h265 hw but only 8 bits... Anyway i haven't the beautiful tv 4K with 10 bits/pixel so it's useless for me.

 

As you said, excepting ET, no Emby clients would support 10 bits right?

 

 

Sent from my iPhone using Tapatalk

Edited by jscoys
Link to comment
Share on other sites

RanmaCanada

I have a 750 ti which is able to decode h265 hw but only 8 bits... Anyway i haven't the beautiful tv 4K with 10 bits/pixel so it's useless for me.

 

As you said, excepting ET, no Emby clients would support 10 bits right?

 

 

Sent from my iPhone using Tapatalk

 

I can direct play 10bit hevc files to my S905 box through SPMC or Kodi, or any other external media player, as VLC support for amilogic is bad and probably won't get better haha.  I don't know if I am getting 10bit colour though as I don't know if my RCA 4k tv is 10bit or not, as the tv doesn't exactly exist on their website, and it might be a Canadian exclusive.  

  • Like 1
Link to comment
Share on other sites

jscoys

The "freeze" movie situation has returned unfortunately...

 

If I use NVENC with Zeranoe FFmpeg, version 64 bits or 32 bits (Doesn't matter), movies are transcoded well during 3 to 5 minutes and then stop playing suddently. If I go into dashboard and look to the movie currently playing, the little bars bellow (Green and Red) are aligned, and the red bar, corresponding to transco, doesn't wan't to go on anymore as expected...). And it makes me wondering if NVENC is really activated or not...

 

One more time : if I deselect NVENC and put "none" option it works... So I guess it's not a problem coming from Emby, but from zeranoe which doesn't like the option "--enable-nvenc"... do anyone else has the same problem?

Edited by jscoys
Link to comment
Share on other sites

robertp221

I have the same problem but i only use emby for streaming live tv. It starts transcoding on the GPU and then stops at the 7 second mark. If you are running windows you can use GPUZ to see the stats of the video card. I can see when the transcoding starts and when it stops at the 7 second mark. It is interesting to note that this only happens with HD channels and if i playback a SD channel it has no issue playing for however long i need it to.

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