Jump to content


Photo

FFmpeg not using NVENC

ffmpeg nvenc GTX 1050 Linux/Ubuntu(Server) 16.04

  • Please log in to reply
78 replies to this topic

#1 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 20 February 2017 - 06:58 AM

Hey, bought a new GTX 1050 to utilize NVENC for H.265 decoding, but after reinstalling NVIDIA drivers (because Ubuntu didn't want to boot properly...) I noticed that Emby wouldn't transcode any media properly. In Emby's log, there's nothing I deem important to the situation, but what I did notice is that FFmpeg doesn't talk about NVENC decoding anywhere. I did reinstall FFmpeg, but no changes. Using Ubuntu Server 16.04 LTS. Any ideas? Thanks!

{"Protocol":"File","Id":"a051fd1e8a1a2fe86bb21bb9b0928b24","Path":"/media/HDD/Movies/Whiplash.mkv","Type":"Default","Container":"mkv","Name":"1080P/HEVC/AAC","IsRemote":false,"ETag":"7a63e47f93b320b9edcdc41a0721b1f8","RunTimeTicks":64054280192,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"hevc","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"125/2997","IsInterlaced":false,"BitRate":1680685,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":800,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"Main 10","Type":"Video","AspectRatio":"2.40:1","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":false},{"Codec":"aac","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","DisplayTitle":"Eng AAC 5.1 Default","IsInterlaced":false,"ChannelLayout":"5.1","Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":1680685,"RequiredHttpHeaders":{}}

/usr/bin/ffmpeg -f matroska -codec:0 hevc -codec:1 aac -i file:"/media/HDD/Movies/Whiplash.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset slow -crf 12 -maxrate 3361370 -bufsize 6722740 -vsync -1 -profile:v high -level 4.1 -x264opts:0 subme=0:rc_lookahead=10:me_range=4:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -copyts -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -af "adelay=1,aresample=async=1" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/emby-server/transcoding-temp/39cd7170159d606121073417c730b7e9.m3u8" -y "/var/lib/emby-server/transcoding-temp/39cd7170159d606121073417c730b7e9%d.ts"


ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, matroska,webm, from 'file:/media/HDD/Movies/Whiplash.mkv':
Metadata:
encoder : libebml v1.3.1 + libmatroska v1.4.2
creation_time : 2015-05-31 13:31:29
Duration: 01:46:45.43, start: 0.000000, bitrate: 1680 kb/s
Chapter #0:0: start 0.000000, end 411.828000
Metadata:
title : 00:00:00.000
Chapter #0:1: start 411.828000, end 874.457000
Metadata:
title : 00:06:51.828
Chapter #0:2: start 874.457000, end 1466.382000
Metadata:
title : 00:14:34.457
Chapter #0:3: start 1466.382000, end 1806.096000
Metadata:
title : 00:24:26.382
Chapter #0:4: start 1806.096000, end 2143.975000
Metadata:
title : 00:30:06.096
Chapter #0:5: start 2143.975000, end 2611.359000
Metadata:
title : 00:35:43.975
Chapter #0:6: start 2611.359000, end 2815.312000
Metadata:
title : 00:43:31.359
Chapter #0:7: start 2815.312000, end 3192.481000
Metadata:
title : 00:46:55.312
Chapter #0:8: start 3192.481000, end 3757.504000
Metadata:
title : 00:53:12.481
Chapter #0:9: start 3757.504000, end 4230.560000
Metadata:
title : 01:02:37.504
Chapter #0:10: start 4230.560000, end 4443.606000
Metadata:
title : 01:10:30.560
Chapter #0:11: start 4443.606000, end 4668.789000
Metadata:
title : 01:14:03.606
Chapter #0:12: start 4668.789000, end 4986.106000
Metadata:
title : 01:17:48.789
Chapter #0:13: start 4986.106000, end 5128.290000
Metadata:
title : 01:23:06.106
Chapter #0:14: start 5128.290000, end 5516.219000
Metadata:
title : 01:25:28.290
Chapter #0:15: start 5516.219000, end 6405.428000
Metadata:
title : 01:31:56.219
Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 1920x800, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
Metadata:
BPS : 1460418
BPS-eng : 1460418
DURATION : 01:46:45.316000000
DURATION-eng : 01:46:45.316000000
NUMBER_OF_FRAMES: 153574
NUMBER_OF_FRAMES-eng: 153574
NUMBER_OF_BYTES : 1169305100
NUMBER_OF_BYTES-eng: 1169305100
_STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
_STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
_STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
_STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
Metadata:
BPS : 218057
BPS-eng : 218057
DURATION : 01:46:45.419000000
DURATION-eng : 01:46:45.419000000
NUMBER_OF_FRAMES: 300254
NUMBER_OF_FRAMES-eng: 300254
NUMBER_OF_BYTES : 174593403
NUMBER_OF_BYTES-eng: 174593403
_STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
_STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
_STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
_STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[libx264 @ 0x10867c0] subme=0 + direct=temporal is not supported
[libx264 @ 0x10867c0] using SAR=1/1
[libx264 @ 0x10867c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x10867c0] profile Main, level 4.1
[libx264 @ 0x10867c0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=4 chroma_me=0 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=12.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=3361 vbv_bufsize=6722 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, segment, to '/var/lib/emby-server/transcoding-temp/39cd7170159d606121073417c730b7e9%d.ts':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], q=-1--1, max. 3361 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
Metadata:
encoder : Lavc56.60.100 libx264
Stream #0:1: Audio: aac, 48000 Hz, 5.1, fltp, 384 kb/s (default)
Metadata:
encoder : Lavc56.60.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 21 fps=0.0 q=17.0 size=N/A time=00:00:01.16 bitrate=N/A
frame= 29 fps= 18 q=17.0 size=N/A time=00:00:01.50 bitrate=N/A
frame= 34 fps= 16 q=17.0 size=N/A time=00:00:01.67 bitrate=N/A
frame= 40 fps= 15 q=17.0 size=N/A time=00:00:01.84 bitrate=N/A
frame= 45 fps= 14 q=17.0 size=N/A time=00:00:02.03 bitrate=N/A
frame= 50 fps= 13 q=17.0 size=N/A time=00:00:02.20 bitrate=N/A
frame= 57 fps= 12 q=17.0 size=N/A time=00:00:02.54 bitrate=N/A
frame= 62 fps= 12 q=17.0 size=N/A time=00:00:02.71 bitrate=N/A
frame= 67 fps= 12 q=17.0 size=N/A time=00:00:03.18 bitrate=N/A
frame= 70 fps= 11 q=17.0 size=N/A time=00:00:03.20 bitrate=N/A
frame= 73 fps= 11 q=17.0 size=N/A time=00:00:03.20 bitrate=N/A
frame= 76 fps= 10 q=17.0 size=N/A time=00:00:03.37 bitrate=N/A
frame= 77 fps=9.7 q=17.0 size=N/A time=00:00:03.40 bitrate=N/A
frame= 81 fps=9.4 q=17.0 size=N/A time=00:00:03.55 bitrate=N/A
frame= 85 fps=9.3 q=17.0 size=N/A time=00:00:03.72 bitrate=N/A
frame= 91 fps=9.4 q=21.0 size=N/A time=00:00:04.06 bitrate=N/A
frame= 93 fps=8.9 q=20.0 size=N/A time=00:00:04.06 bitrate=N/A
frame= 99 fps=8.8 q=18.0 size=N/A time=00:00:04.40 bitrate=N/A
frame= 103 fps=8.8 q=17.0 size=N/A time=00:00:04.57 bitrate=N/A
frame= 108 fps=8.8 q=17.0 size=N/A time=00:00:04.74 bitrate=N/A
frame= 113 fps=8.8 q=17.0 size=N/A time=00:00:04.91 bitrate=N/A
frame= 118 fps=8.8 q=17.0 size=N/A time=00:00:05.12 bitrate=N/A
frame= 123 fps=8.8 q=17.0 size=N/A time=00:00:05.29 bitrate=N/A
frame= 134 fps=9.1 q=-1.0 Lsize=N/A time=00:00:05.85 bitrate=N/A
video:1405kB audio:62kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x10867c0] frame I:2 Avg QP: 4.84 size: 99740
[libx264 @ 0x10867c0] frame P:41 Avg QP: 6.60 size: 25208
[libx264 @ 0x10867c0] frame B:91 Avg QP: 8.93 size: 2253
[libx264 @ 0x10867c0] consecutive B-frames: 7.5% 3.0% 9.0% 80.6%
[libx264 @ 0x10867c0] mb I I16..4: 95.3% 0.0% 4.7%
[libx264 @ 0x10867c0] mb P I16..4: 36.1% 0.0% 0.0% P16..4: 28.8% 0.0% 0.0% 0.0% 0.0% skip:35.1%
[libx264 @ 0x10867c0] mb B I16..4: 0.8% 0.0% 0.0% B16..8: 8.4% 0.0% 0.0% direct: 4.6% skip:86.2% L0:51.1% L1:48.4% BI: 0.5%
[libx264 @ 0x10867c0] coded y,uvDC,uvAC intra: 13.5% 97.0% 96.2% inter: 7.1% 3.7% 1.0%
[libx264 @ 0x10867c0] i16 v,h,dc,p: 86% 7% 6% 1%
[libx264 @ 0x10867c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 18% 21% 6% 5% 7% 4% 5% 4%
[libx264 @ 0x10867c0] i8c dc,h,v,p: 80% 5% 11% 3%
[libx264 @ 0x10867c0] Weighted P-Frames: Y:19.5% UV:19.5%
[libx264 @ 0x10867c0] ref P L0: 75.6% 0.0% 14.1% 5.8% 4.5% 0.0%
[libx264 @ 0x10867c0] ref B L0: 70.1% 20.2% 7.5% 2.1%
[libx264 @ 0x10867c0] ref B L1: 90.6% 9.4%
[libx264 @ 0x10867c0] kb/s:2058.32


#2 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 20 February 2017 - 08:48 AM

There's going to be a bunch of stuff you're going to have to do to enable NVENC.  Most distros do not include NEVNC in their ffmpeg builds - nor the supporting libraries.  You'll have to install (or maybe build your own) specific packages that include NVENC.  I'm not sure what the specific process for Ubuntu is - do some searching.

 

You can see if your ffmpeg install includes NVENC support by running:

ffmpeg -codecs|grep -i nvenc

Once that's done, you'll have to enable NVENC in the Emby transcoding settings (from the commandline in the log above, it looks like you haven't done that).


Edited by puithove, 20 February 2017 - 08:48 AM.


#3 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 20 February 2017 - 03:38 PM

Hmmm, did have to replace FFmpeg w/ a custom built version in order to get the following:

ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 libx264rgb h264_nvenc h264_vaapi nvenc nvenc_h264 )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_vaapi )

I've had Emby Server HW transcoding enabled but it doesn't seem to be passing that information to FFmpeg. Here's the log for FFmpeg:

{"Protocol":"File","Id":"a051fd1e8a1a2fe86bb21bb9b0928b24","Path":"/media/HDD/Movies/Whiplash.mkv","Type":"Default","Container":"mkv","Name":"1080P/HEVC/AAC","IsRemote":false,"ETag":"7a63e47f93b320b9edcdc41a0721b1f8","RunTimeTicks":64054280192,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"hevc","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"125/2997","IsInterlaced":false,"BitRate":1680685,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":800,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"Main 10","Type":"Video","AspectRatio":"2.40:1","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":false},{"Codec":"aac","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","DisplayTitle":"Eng AAC 5.1 Default","IsInterlaced":false,"ChannelLayout":"5.1","Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":1680685,"RequiredHttpHeaders":{}}

/usr/bin/ffmpeg -f matroska -codec:0 hevc -codec:1 aac -i file:"/media/HDD/Movies/Whiplash.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset slow -crf 12 -maxrate 3361370 -bufsize 6722740 -vsync -1 -profile:v high -level 4.1 -x264opts:0 subme=0:rc_lookahead=10:me_range=4:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -copyts -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -af "adelay=1,aresample=async=1" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/emby-server/transcoding-temp/bd7de23c5750f929fff29b2e77398e89.m3u8" -y "/var/lib/emby-server/transcoding-temp/bd7de23c5750f929fff29b2e77398e89%d.ts"


ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, matroska,webm, from 'file:/media/HDD/Movies/Whiplash.mkv':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2015-05-31T13:31:29.000000Z
  Duration: 01:46:45.43, start: 0.000000, bitrate: 1680 kb/s
    Chapter #0:0: start 0.000000, end 411.828000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 411.828000, end 874.457000
    Metadata:
      title           : 00:06:51.828
    Chapter #0:2: start 874.457000, end 1466.382000
    Metadata:
      title           : 00:14:34.457
    Chapter #0:3: start 1466.382000, end 1806.096000
    Metadata:
      title           : 00:24:26.382
    Chapter #0:4: start 1806.096000, end 2143.975000
    Metadata:
      title           : 00:30:06.096
    Chapter #0:5: start 2143.975000, end 2611.359000
    Metadata:
      title           : 00:35:43.975
    Chapter #0:6: start 2611.359000, end 2815.312000
    Metadata:
      title           : 00:43:31.359
    Chapter #0:7: start 2815.312000, end 3192.481000
    Metadata:
      title           : 00:46:55.312
    Chapter #0:8: start 3192.481000, end 3757.504000
    Metadata:
      title           : 00:53:12.481
    Chapter #0:9: start 3757.504000, end 4230.560000
    Metadata:
      title           : 01:02:37.504
    Chapter #0:10: start 4230.560000, end 4443.606000
    Metadata:
      title           : 01:10:30.560
    Chapter #0:11: start 4443.606000, end 4668.789000
    Metadata:
      title           : 01:14:03.606
    Chapter #0:12: start 4668.789000, end 4986.106000
    Metadata:
      title           : 01:17:48.789
    Chapter #0:13: start 4986.106000, end 5128.290000
    Metadata:
      title           : 01:23:06.106
    Chapter #0:14: start 5128.290000, end 5516.219000
    Metadata:
      title           : 01:25:28.290
    Chapter #0:15: start 5516.219000, end 6405.428000
    Metadata:
      title           : 01:31:56.219
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 1920x800, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 1460418
      BPS-eng         : 1460418
      DURATION        : 01:46:45.316000000
      DURATION-eng    : 01:46:45.316000000
      NUMBER_OF_FRAMES: 153574
      NUMBER_OF_FRAMES-eng: 153574
      NUMBER_OF_BYTES : 1169305100
      NUMBER_OF_BYTES-eng: 1169305100
      _STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      BPS             : 218057
      BPS-eng         : 218057
      DURATION        : 01:46:45.419000000
      DURATION-eng    : 01:46:45.419000000
      NUMBER_OF_FRAMES: 300254
      NUMBER_OF_FRAMES-eng: 300254
      NUMBER_OF_BYTES : 174593403
      NUMBER_OF_BYTES-eng: 174593403
      _STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[libx264 @ 0x5215bc0] subme=0 + direct=temporal is not supported
[libx264 @ 0x5215bc0] using SAR=1/1
[libx264 @ 0x5215bc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x5215bc0] profile Main, level 4.1
[libx264 @ 0x5215bc0] 264 - core 148 r333 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=4 chroma_me=0 trellis=2 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=12.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=3361 vbv_bufsize=6722 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, segment, to '/var/lib/emby-server/transcoding-temp/bd7de23c5750f929fff29b2e77398e89%d.ts':
  Metadata:
    encoder         : Lavf57.56.101
    Stream #0:0: Video: h264 (libx264), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], q=-1--1, 23.98 fps, 90k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.64.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 3361000/0/0 buffer size: 6722000 vbv_delay: -1
    Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      encoder         : Lavc57.64.101 aac
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=   25 fps=0.0 q=17.0 size=N/A time=00:00:01.43 bitrate=N/A speed=2.85x    
frame=   56 fps= 54 q=17.0 size=N/A time=00:00:02.52 bitrate=N/A speed=2.45x    
frame=   73 fps= 48 q=17.0 size=N/A time=00:00:03.37 bitrate=N/A speed= 2.2x    
frame=   97 fps= 48 q=17.0 size=N/A time=00:00:04.27 bitrate=N/A speed= 2.1x    
frame=  121 fps= 48 q=17.0 size=N/A time=00:00:05.19 bitrate=N/A speed=2.04x    
frame=  145 fps= 48 q=17.0 size=N/A time=00:00:06.32 bitrate=N/A speed=2.08x    
frame=  163 fps= 45 q=17.0 size=N/A time=00:00:07.00 bitrate=N/A speed=1.95x    
frame=  177 fps= 43 q=17.0 size=N/A time=00:00:07.58 bitrate=N/A speed=1.85x    
frame=  192 fps= 42 q=17.0 size=N/A time=00:00:08.20 bitrate=N/A speed=1.78x    
frame=  205 fps= 40 q=17.0 size=N/A time=00:00:08.81 bitrate=N/A speed=1.72x    
frame=  220 fps= 37 q=-1.0 Lsize=N/A time=00:00:09.43 bitrate=N/A speed=1.59x    
video:2163kB audio:283kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x5215bc0] frame I:4     Avg QP: 4.57  size:130636
[libx264 @ 0x5215bc0] frame P:61    Avg QP: 6.79  size: 23267
[libx264 @ 0x5215bc0] frame B:155   Avg QP: 8.87  size:  1754
[libx264 @ 0x5215bc0] consecutive B-frames:  5.5%  0.0%  5.5% 89.1%
[libx264 @ 0x5215bc0] mb I  I16..4: 93.8%  0.0%  6.2%
[libx264 @ 0x5215bc0] mb P  I16..4: 26.4%  0.0%  0.0%  P16..4: 36.3%  0.0%  0.0%  0.0%  0.0%    skip:37.3%
[libx264 @ 0x5215bc0] mb B  I16..4:  0.3%  0.0%  0.0%  B16..8:  7.2%  0.0%  0.0%  direct: 4.0%  skip:88.5%  L0:49.5% L1:49.8% BI: 0.7%
[libx264 @ 0x5215bc0] coded y,uvDC,uvAC intra: 21.9% 97.5% 96.8% inter: 6.6% 2.9% 0.7%
[libx264 @ 0x5215bc0] i16 v,h,dc,p: 83%  8%  8%  1%
[libx264 @ 0x5215bc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 17% 18%  6%  5%  8%  4%  6%  4%
[libx264 @ 0x5215bc0] i8c dc,h,v,p: 75%  6% 15%  4%
[libx264 @ 0x5215bc0] Weighted P-Frames: Y:11.5% UV:11.5%
[libx264 @ 0x5215bc0] ref P L0: 59.7%  0.0% 20.5% 11.8%  8.1%
[libx264 @ 0x5215bc0] ref B L0: 46.7% 33.1% 15.9%  4.3%
[libx264 @ 0x5215bc0] ref B L1: 93.8%  6.2%
[libx264 @ 0x5215bc0] kb/s:1930.03
[aac @ 0x5220380] Qavg: 63729.922


#4 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 21 February 2017 - 01:28 AM

Well, I installed Debian 8 over Ubuntu and so far I'm diggin' it, yet I'm still having the issue with no NVENC. Can you upload your FFmpeg file so I can see if NVENC works properly through it? I remember there used to be something in the configuration for FFmpeg like "--enable-nvenc" but haven't seen it since.


Edited by TehEpikDuckeh, 21 February 2017 - 01:31 AM.


#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124112 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 01:44 AM

You could try getting an ffmpeg build from here:

 

https://www.johnvansickle.com/ffmpeg/



#6 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 21 February 2017 - 01:51 AM

I do see something new; there's now h264_nvenc (not 265, strange) added to the FFmpeg command. Check log below:

http://192.168.1.3:8096/emby/videos/a051fd1e8a1a2fe86bb21bb9b0928b24/hls1/main/0.ts?DeviceId=df7f3749325a2c88a507a2519a5a9d5d3eba7a15&MediaSourceId=a051fd1e8a1a2fe86bb21bb9b0928b24&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=3616000&AudioBitrate=384000&Level=51&Profile=high&PlaySessionId=5c6d02f6c24948fbb99cbb45558ac431&api_key=adc7d031561d46b49f67adf286ca1b58&CopyTimestamps=false&TranscodingMaxAudioChannels=6&EnableSubtitlesInManifest=false&Tag=543b6ca4c9f21c87d81daf7a932499c0&RequireAvc=true

{"Protocol":"File","Id":"a051fd1e8a1a2fe86bb21bb9b0928b24","Path":"/media/HDD/Movies/Whiplash.mkv","Type":"Default","Container":"mkv","Name":"1080P/HEVC/AAC","IsRemote":false,"ETag":"543b6ca4c9f21c87d81daf7a932499c0","RunTimeTicks":64054280192,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"hevc","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"125/2997","IsInterlaced":false,"BitRate":1680685,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":800,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"Main 10","Type":"Video","AspectRatio":"2.40:1","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":false},{"Codec":"aac","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","DisplayTitle":"Eng AAC 5.1 Default","IsInterlaced":false,"ChannelLayout":"5.1","Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":1680685,"RequiredHttpHeaders":{}}

/var/lib/emby-server/ffmpeg/ffmpeg-3.2.4-64bit-static2/ffmpeg -f matroska -codec:0 hevc -codec:1 aac -i file:"/media/HDD/Movies/Whiplash.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -pix_fmt yuv420p -preset default -b:v 3361370 -maxrate 3361370 -bufsize 6722740 -vsync -1 -profile:v high -level 4.1 -force_key_frames "expr:gte(t,n_forced*3)" -copyts -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -af "adelay=1,aresample=async=1" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/emby-server/transcoding-temp/f1f3d9dd9ff1897e882f6e1843c5163d.m3u8" -y "/var/lib/emby-server/transcoding-temp/f1f3d9dd9ff1897e882f6e1843c5163d%d.ts"


ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, matroska,webm, from 'file:/media/HDD/Movies/Whiplash.mkv':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2015-05-31T13:31:29.000000Z
  Duration: 01:46:45.43, start: 0.000000, bitrate: 1680 kb/s
    Chapter #0:0: start 0.000000, end 411.828000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 411.828000, end 874.457000
    Metadata:
      title           : 00:06:51.828
    Chapter #0:2: start 874.457000, end 1466.382000
    Metadata:
      title           : 00:14:34.457
    Chapter #0:3: start 1466.382000, end 1806.096000
    Metadata:
      title           : 00:24:26.382
    Chapter #0:4: start 1806.096000, end 2143.975000
    Metadata:
      title           : 00:30:06.096
    Chapter #0:5: start 2143.975000, end 2611.359000
    Metadata:
      title           : 00:35:43.975
    Chapter #0:6: start 2611.359000, end 2815.312000
    Metadata:
      title           : 00:43:31.359
    Chapter #0:7: start 2815.312000, end 3192.481000
    Metadata:
      title           : 00:46:55.312
    Chapter #0:8: start 3192.481000, end 3757.504000
    Metadata:
      title           : 00:53:12.481
    Chapter #0:9: start 3757.504000, end 4230.560000
    Metadata:
      title           : 01:02:37.504
    Chapter #0:10: start 4230.560000, end 4443.606000
    Metadata:
      title           : 01:10:30.560
    Chapter #0:11: start 4443.606000, end 4668.789000
    Metadata:
      title           : 01:14:03.606
    Chapter #0:12: start 4668.789000, end 4986.106000
    Metadata:
      title           : 01:17:48.789
    Chapter #0:13: start 4986.106000, end 5128.290000
    Metadata:
      title           : 01:23:06.106
    Chapter #0:14: start 5128.290000, end 5516.219000
    Metadata:
      title           : 01:25:28.290
    Chapter #0:15: start 5516.219000, end 6405.428000
    Metadata:
      title           : 01:31:56.219
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 1920x800, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 1460418
      BPS-eng         : 1460418
      DURATION        : 01:46:45.316000000
      DURATION-eng    : 01:46:45.316000000
      NUMBER_OF_FRAMES: 153574
      NUMBER_OF_FRAMES-eng: 153574
      NUMBER_OF_BYTES : 1169305100
      NUMBER_OF_BYTES-eng: 1169305100
      _STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      BPS             : 218057
      BPS-eng         : 218057
      DURATION        : 01:46:45.419000000
      DURATION-eng    : 01:46:45.419000000
      NUMBER_OF_FRAMES: 300254
      NUMBER_OF_FRAMES-eng: 300254
      NUMBER_OF_BYTES : 174593403
      NUMBER_OF_BYTES-eng: 174593403
      _STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[h264_nvenc @ 0x47fe040] Cannot load libcuda.so.1
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height


#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124112 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 02:01 AM

In that above example, there is something that needs to be adjusted with the Emby command lines although I'm not quite sure what it is just yet.



#8 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 08:16 AM

See this right near the end - you're missing a package install still - you have to have the distro's Cuda package installed.

[h264_nvenc @ 0x47fe040] Cannot load libcuda.so.1


#9 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 08:20 AM

I don't use debian, but maybe it's this:  libcuda1 - https://packages.deb...jessie/libcuda1



#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124112 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 12:39 PM

Ah fyi @thejacer87

#11 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 21 February 2017 - 08:22 PM

Thanks for all the information so far. Yes I did need to install "libcuda1" and it sort of worked. Issue now is that I don't get any video, just audio (best way to enjoy a movie!  ;)). Using "nvidia-smi", I am able to confirm that FFmpeg is using the card.

 

FFmpeg log:

http://192.168.1.3:8096/emby/videos/a051fd1e8a1a2fe86bb21bb9b0928b24/hls1/main/0.ts?DeviceId=df7f3749325a2c88a507a2519a5a9d5d3eba7a15&MediaSourceId=a051fd1e8a1a2fe86bb21bb9b0928b24&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=3616000&AudioBitrate=384000&Level=51&Profile=high&PlaySessionId=9625bb2b8c1f4b0c9579ae613ea67e30&api_key=adc7d031561d46b49f67adf286ca1b58&CopyTimestamps=false&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&EnableSubtitlesInManifest=false&Tag=7a63e47f93b320b9edcdc41a0721b1f8&RequireAvc=true

{"Protocol":"File","Id":"a051fd1e8a1a2fe86bb21bb9b0928b24","Path":"/media/HDD/Movies/Whiplash.mkv","Type":"Default","Container":"mkv","Name":"1080P/HEVC/AAC","IsRemote":false,"ETag":"7a63e47f93b320b9edcdc41a0721b1f8","RunTimeTicks":64054280192,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"hevc","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"125/2997","IsInterlaced":false,"BitRate":1680685,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":800,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"Main 10","Type":"Video","AspectRatio":"2.40:1","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":false},{"Codec":"aac","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","DisplayTitle":"Eng AAC 5.1 Default","IsInterlaced":false,"ChannelLayout":"5.1","Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":1680685,"RequiredHttpHeaders":{}}

/var/lib/emby-server/ffmpeg/test/ffmpeg-3.2.4/ffmpeg -f matroska -codec:0 hevc -codec:1 aac -i file:"/media/HDD/Movies/Whiplash.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -pix_fmt yuv420p -preset default -b:v 3361370 -maxrate 3361370 -bufsize 6722740 -vsync -1 -profile:v high -level 4.1 -force_key_frames "expr:gte(t,n_forced*3)" -copyts -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -af "adelay=1,aresample=async=1" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/emby-server/transcoding-temp/9b6285e28993bb57235656a16982c914.m3u8" -y "/var/lib/emby-server/transcoding-temp/9b6285e28993bb57235656a16982c914%d.ts"


ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --enable-nonfree --disable-shared --enable-nvenc
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
Input #0, matroska,webm, from 'file:/media/HDD/Movies/Whiplash.mkv':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2015-05-31T13:31:29.000000Z
  Duration: 01:46:45.43, start: 0.000000, bitrate: 1680 kb/s
    Chapter #0:0: start 0.000000, end 411.828000
    Metadata:
      title           : 00:00:00.000
    Chapter #0:1: start 411.828000, end 874.457000
    Metadata:
      title           : 00:06:51.828
    Chapter #0:2: start 874.457000, end 1466.382000
    Metadata:
      title           : 00:14:34.457
    Chapter #0:3: start 1466.382000, end 1806.096000
    Metadata:
      title           : 00:24:26.382
    Chapter #0:4: start 1806.096000, end 2143.975000
    Metadata:
      title           : 00:30:06.096
    Chapter #0:5: start 2143.975000, end 2611.359000
    Metadata:
      title           : 00:35:43.975
    Chapter #0:6: start 2611.359000, end 2815.312000
    Metadata:
      title           : 00:43:31.359
    Chapter #0:7: start 2815.312000, end 3192.481000
    Metadata:
      title           : 00:46:55.312
    Chapter #0:8: start 3192.481000, end 3757.504000
    Metadata:
      title           : 00:53:12.481
    Chapter #0:9: start 3757.504000, end 4230.560000
    Metadata:
      title           : 01:02:37.504
    Chapter #0:10: start 4230.560000, end 4443.606000
    Metadata:
      title           : 01:10:30.560
    Chapter #0:11: start 4443.606000, end 4668.789000
    Metadata:
      title           : 01:14:03.606
    Chapter #0:12: start 4668.789000, end 4986.106000
    Metadata:
      title           : 01:17:48.789
    Chapter #0:13: start 4986.106000, end 5128.290000
    Metadata:
      title           : 01:23:06.106
    Chapter #0:14: start 5128.290000, end 5516.219000
    Metadata:
      title           : 01:25:28.290
    Chapter #0:15: start 5516.219000, end 6405.428000
    Metadata:
      title           : 01:31:56.219
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 1920x800, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 1460418
      BPS-eng         : 1460418
      DURATION        : 01:46:45.316000000
      DURATION-eng    : 01:46:45.316000000
      NUMBER_OF_FRAMES: 153574
      NUMBER_OF_FRAMES-eng: 153574
      NUMBER_OF_BYTES : 1169305100
      NUMBER_OF_BYTES-eng: 1169305100
      _STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      BPS             : 218057
      BPS-eng         : 218057
      DURATION        : 01:46:45.419000000
      DURATION-eng    : 01:46:45.419000000
      NUMBER_OF_FRAMES: 300254
      NUMBER_OF_FRAMES-eng: 300254
      NUMBER_OF_BYTES : 174593403
      NUMBER_OF_BYTES-eng: 174593403
      _STATISTICS_WRITING_APP: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_APP-eng: mkvmerge v7.8.0 ('River Man') 32bit built on Mar 27 2015 16:18:02
      _STATISTICS_WRITING_DATE_UTC: 2015-05-31 13:31:29
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-05-31 13:31:29
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Output #0, segment, to '/var/lib/emby-server/transcoding-temp/9b6285e28993bb57235656a16982c914%d.ts':
  Metadata:
    encoder         : Lavf57.56.101
    Stream #0:0: Video: h264 (h264_nvenc) (High), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], q=-1--1, 3361 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.64.101 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 3361370/0/3361370 buffer size: 6722740 vbv_delay: -1
    Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      encoder         : Lavc57.64.101 aac
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=   34 fps=0.0 q=0.0 size=N/A time=00:00:01.67 bitrate=N/A speed= 3.3x    
frame=   69 fps= 68 q=14.0 size=N/A time=00:00:03.20 bitrate=N/A speed=3.18x    
frame=  102 fps= 67 q=14.0 size=N/A time=00:00:04.57 bitrate=N/A speed=3.03x    
frame=  141 fps= 70 q=13.0 size=N/A time=00:00:05.98 bitrate=N/A speed=2.96x    
frame=  177 fps= 70 q=14.0 size=N/A time=00:00:07.51 bitrate=N/A speed=2.98x    
frame=  214 fps= 71 q=14.0 size=N/A time=00:00:09.05 bitrate=N/A speed=2.99x    
frame=  247 fps= 70 q=14.0 size=N/A time=00:00:10.71 bitrate=N/A speed=3.04x    
frame=  296 fps= 73 q=14.0 size=N/A time=00:00:12.51 bitrate=N/A speed= 3.1x    
frame=  344 fps= 76 q=12.0 size=N/A time=00:00:14.49 bitrate=N/A speed= 3.2x    
frame=  394 fps= 78 q=14.0 size=N/A time=00:00:16.58 bitrate=N/A speed=3.29x    
frame=  443 fps= 80 q=14.0 size=N/A time=00:00:18.65 bitrate=N/A speed=3.37x    
frame=  495 fps= 82 q=13.0 size=N/A time=00:00:20.74 bitrate=N/A speed=3.43x    
frame=  544 fps= 83 q=12.0 size=N/A time=00:00:23.11 bitrate=N/A speed=3.53x    
frame=  580 fps= 82 q=14.0 size=N/A time=00:00:24.54 bitrate=N/A speed=3.48x    
frame=  612 fps= 81 q=14.0 size=N/A time=00:00:25.73 bitrate=N/A speed=3.41x    
frame=  644 fps= 80 q=13.0 size=N/A time=00:00:26.99 bitrate=N/A speed=3.35x    
frame=  688 fps= 80 q=14.0 size=N/A time=00:00:28.85 bitrate=N/A speed=3.37x    
frame=  736 fps= 81 q=15.0 size=N/A time=00:00:30.85 bitrate=N/A speed=3.41x    
frame=  785 fps= 82 q=16.0 size=N/A time=00:00:33.07 bitrate=N/A speed=3.46x    
frame=  820 fps= 81 q=16.0 size=N/A time=00:00:34.44 bitrate=N/A speed=3.42x    
frame=  856 fps= 81 q=14.0 size=N/A time=00:00:35.84 bitrate=N/A speed=3.39x    
frame=  884 fps= 80 q=14.0 size=N/A time=00:00:37.06 bitrate=N/A speed=3.35x    
frame=  916 fps= 79 q=14.0 size=N/A time=00:00:38.49 bitrate=N/A speed=3.33x    
frame=  950 fps= 79 q=14.0 size=N/A time=00:00:39.81 bitrate=N/A speed= 3.3x    
frame=  979 fps= 78 q=14.0 size=N/A time=00:00:41.13 bitrate=N/A speed=3.27x    
frame= 1014 fps= 77 q=14.0 size=N/A time=00:00:42.48 bitrate=N/A speed=3.25x    
frame= 1049 fps= 77 q=14.0 size=N/A time=00:00:43.97 bitrate=N/A speed=3.24x    
frame= 1081 fps= 77 q=15.0 size=N/A time=00:00:45.42 bitrate=N/A speed=3.22x    
frame= 1121 fps= 77 q=14.0 size=N/A time=00:00:46.96 bitrate=N/A speed=3.22x    
frame= 1176 fps= 78 q=14.0 size=N/A time=00:00:49.22 bitrate=N/A speed=3.26x    
frame= 1231 fps= 79 q=14.0 size=N/A time=00:00:51.59 bitrate=N/A speed=3.31x    
frame= 1290 fps= 80 q=14.0 size=N/A time=00:00:54.06 bitrate=N/A speed=3.36x    
frame= 1345 fps= 81 q=14.0 size=N/A time=00:00:56.35 bitrate=N/A speed=3.39x    
frame= 1396 fps= 82 q=14.0 size=N/A time=00:00:58.39 bitrate=N/A speed=3.41x    
frame= 1445 fps= 82 q=14.0 size=N/A time=00:01:00.51 bitrate=N/A speed=3.44x    
frame= 1503 fps= 83 q=14.0 size=N/A time=00:01:02.92 bitrate=N/A speed=3.47x    
frame= 1554 fps= 83 q=14.0 size=N/A time=00:01:05.20 bitrate=N/A speed= 3.5x    
frame= 1615 fps= 84 q=14.0 size=N/A time=00:01:07.63 bitrate=N/A speed=3.54x    
frame= 1661 fps= 85 q=14.0 Lsize=N/A time=00:01:09.55 bitrate=N/A speed=3.56x    
video:12747kB audio:2816kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x34b5840] Qavg: 32941.918

I've been trying to compile my own version of FFmpeg and noticed something; there's no nvenc hevc decoder, just an encoder. Any ideas on what I should do about that?



#12 thejacer87 OFFLINE  

thejacer87

    Advanced Member

  • Members
  • 132 posts
  • Local time: 09:01 AM
  • LocationKelowna, BC

Posted 21 February 2017 - 11:17 PM

Ah fyi @thejacer87

following, thanks



#13 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 11:44 PM

Thanks for all the information so far. Yes I did need to install "libcuda1" and it sort of worked. Issue now is that I don't get any video, just audio (best way to enjoy a movie!  ;)). Using "nvidia-smi", I am able to confirm that FFmpeg is using the card.

 

I've been trying to compile my own version of FFmpeg and noticed something; there's no nvenc hevc decoder, just an encoder. Any ideas on what I should do about that?

 

ffmpeg 3.2.x has a bug in it that causes Emby transcoding/streaming to fail.  I think that's probably what you're seeing here.  If you happen to build your own, build from git master branch which includes a fix.

 

As for no nvenc decoder - I believe that's normal... in fact nvenc... is... well... "nvidia encoder" or something like that...  It'll use software decode which you see in your log's stream mapping (hevc native).

 

For instance, here is what my ffmpeg (which is currently working with nvenc in Emby) lists for codecs:

 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_vaapi nvenc nvenc_h264 )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_vaapi )

Edited by puithove, 21 February 2017 - 11:46 PM.


#14 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 21 February 2017 - 11:48 PM

 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_vaapi nvenc nvenc_h264 )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_nvenc hevc_vaapi )

 

What command did you run to get that list? I've used things such as "ffmpeg -decoders" or something along the lines of that.



#15 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 11:51 PM

ffmpeg -codecs|grep -i nvenc



#16 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 21 February 2017 - 11:53 PM

I see you have "(decoders: hevc hevc_cuvid )" and I do not. Did you build your own, or are you using one from another source? If so, can you link me to that package?



#17 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 21 February 2017 - 11:55 PM

Built my own from git master.



#18 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 21 February 2017 - 11:56 PM

What is the configuration you used, or did you just use default?



#19 puithove OFFLINE  

puithove

    Advanced Member

  • Alpha Testers
  • 721 posts
  • Local time: 01:01 PM

Posted 22 February 2017 - 12:01 AM

  ./configure --prefix=/usr \
              --disable-debug \
              --disable-static \
              --enable-avisynth \
              --enable-avresample \
              --enable-fontconfig \
              --enable-gnutls \
              --enable-gpl \
              --enable-ladspa \
              --enable-libass \
              --enable-libbluray \
              --enable-libfreetype \
              --enable-libfribidi \
              --enable-libgsm \
              --enable-libmodplug \
              --enable-libmp3lame \
              --enable-libopencore_amrnb \
              --enable-libopencore_amrwb \
              --enable-libopenjpeg \
              --enable-libopus \
              --enable-libfdk-aac \
              --enable-libpulse \
              --enable-libschroedinger \
              --enable-libsoxr \
              --enable-libspeex \
              --enable-libssh \
              --enable-libtheora \
              --enable-libv4l2 \
              --enable-libvidstab \
              --enable-libvorbis \
              --enable-libvpx \
              --enable-libwebp \
              --enable-libx264 \
              --enable-libx265 \
              --enable-libxvid \
              --enable-nonfree \
              --enable-shared \
              --enable-version3 \
              --enable-x11grab


#20 TehEpikDuckeh OFFLINE  

TehEpikDuckeh

    Advanced Member

  • Members
  • 94 posts
  • Local time: 09:01 AM

Posted 22 February 2017 - 12:02 AM

Thanks! I'll try it out and get back whenever I have an update.







Also tagged with one or more of these keywords: ffmpeg, nvenc, GTX 1050, Linux/Ubuntu(Server) 16.04

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users