Jump to content

What is the current status of hardware acceleration


Maximus Naxsus

Recommended Posts

Maximus Naxsus

What is the current status of hardware acceleration and Emby Server?

I can't find a lot of information, but I can find more people asking this question.

 

Is there or might there be one day, a guide that specifies what hardware acceleration option are actually available in certain situations like OS, GPU, CPU?

 

I'm looking in to VA-API now. If something interesting pops up I'll post it here.

EDIT:
https://trac.ffmpeg.org/wiki/Hardware/VAAPI Hooked @" If you have multiple usable devices in the same machine".., but it's going to take me a while to dig tru this

http://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options

 

 

Windows Server 2016
AMD 9590 @ 5Ghz
32GB RAM

AMD R9 480

AMD HD7750

 

 

I just acquired some 4K, x265 material. Transcoding this material is a nightmare (doable for 1 stream)

Edited by Maximus Naxsus
Link to comment
Share on other sites

mastrmind11

Quicksync works on Windows, VAAPI works on Linux.  Both proven and used throughout the community.

Link to comment
Share on other sites

Maximus Naxsus

Quicksync works on Windows, VAAPI works on Linux.  Both proven and used throughout the community.

Thank you, but I guess this means that there are no GPU acceleration options for AMD. None that I can get working at the moment.

Edited by Maximus Naxsus
Link to comment
Share on other sites

mastrmind11

Thank you, but I gues QuickSync is Intel only.

Yes.  If you're AMD, you're pretty much out of luck unless you have an nVidia GPU and want to use nvenc, which is flaky and limited to 2 encodes.

Link to comment
Share on other sites

Maximus Naxsus

Yes.  If you're AMD, you're pretty much out of luck unless you have an nVidia GPU and want to use nvenc, which is flaky and limited to 2 encodes.

So if you want a streaming server with Emby, go with Intel?

 

Would VA-API work with AMD on Linux?

Edited by Maximus Naxsus
Link to comment
Share on other sites

I am wading into the market for a new server build. I have found that Hardware acceleration like VAAPI and quicksync requires that the chip be more SOC styled and offer graphics services on chip. From what I can tell the ryzen series of AMD CPUs don't offer on chip graphics. What they lack in on chip graphics they make up for in cores and threads.

 

 

Sent from my iPhone using Tapatalk

Edited by Tur0k
Link to comment
Share on other sites

You can still transcode from software, but there are resource limitations on chip. I run a legacy AMD 1090T (six core 3.2 GHz base clock, circa 2010) in my Emby server, that also acts as a front end in my HT room. Currently, I also run Emby's live TV and DVR features. Each FFMPEG process for transcoding consumes 20-30% of my total CPU. I can run 2-3 transcodes stable on my system.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

mastrmind11

So if you want a streaming server with Emby, go with Intel?

 

Would VA-API work with AMD on Linux?

Yes, go with Intel SoC if you want acceleration of any kind, but like @@Tur0k said, hardware acceleration is certainly not a requirement to stand up an Emby server.

  • Like 1
Link to comment
Share on other sites

Waldonnis

Supposedly, vaapi works with AMD, but I've never tested it...my last AMD GPU was a 5770  :P   The 480 should be capable of it, at least.

 

There were also a couple of commits very recently to ffmpeg (here's one) that indicate that AMF support may have been added.  It requires some files from the SDK (and possibly a driver installed) to build, so I don't know of anyone that's built/posted a binary that includes it.  I also have no idea if it's complete, but if you can build your own ffmpeg, it's worth a shot.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

This page on ffmpeg.org states that AMF is supported by ffmpeg for hardware-accelerated encoding (both standalone and hardware-input) and that it's usable from the ffmpeg command line interface.

 

I'm very interested in this, since the Windows 10 machine I run Emby on has an AMD Radeon HD 6000 series graphics card. I assume that card supports AMF hardware encoding.

 

I also assume that Emby itself would need to be modified to correctly request the hardware acceleration in the command line to ffmpeg.

 

Can anyone with better knowledge of this topic confirm?

 

Thanks!

Link to comment
Share on other sites

This page on ffmpeg.org states that AMF is supported by ffmpeg for hardware-accelerated encoding (both standalone and hardware-input) and that it's usable from the ffmpeg command line interface.

 

I'm very interested in this, since the Windows 10 machine I run Emby on has an AMD Radeon HD 6000 series graphics card. I assume that card supports AMF hardware encoding.

 

I also assume that Emby itself would need to be modified to correctly request the hardware acceleration in the command line to ffmpeg.

 

Can anyone with better knowledge of this topic confirm?

 

Thanks!

 

Not only would Emby have to be modified, but we'd need ffmpeg builds that include the required libraries. Currently on windows we use a pretty stock build. We will be redoing that soon so that will give us an opportunity to evaluate amf. Thanks.

  • Like 1
Link to comment
Share on other sites

Waldonnis

My local builds have had AMF enabled for a bit now, and I think Zeranoe's builds also include it now.  I have no ability to test it, though.

 

From the looks of it, decoding isn't implemented directly as a named decoder, so it'll probably mean relying on a hwaccel/d3d approach for that (don't think this is possible within the context of Emby).  On the encoder side, the HEVC encoder looks like it doesn't directly support yuv420p10 inputs.  NV12 is supported, but not having yuv420p10 makes me wonder if it's still an 8-bit "backend".  I'd have to look at the code to be sure, but if someone with a supported AMD card wants to check that out, it would be good to know what actually works.  I also didn't see any hardware filters in the initial commit, but I may have just missed it.  The ffmpeg wiki page seems to indicate/confirm that those haven't been added yet, though, and it's probably not a big deal for now.

 

If someone has a supported AMD card, it should be pretty easy to test out the encoding side of things manually with a recent Zeranoe build.  The encoder options look to be pretty standard stuff, so it shouldn't be too hard to figure out what options to try, and most of the defaults for the more advanced options seem sane.  At a glance: rc, quality, level, and profile would be the obvious options to set...with preanalysis, coder, and vbaq as "worth checking out" options.  I have no idea if the wrapper handles standard settings like -g, -bf, or -refs, so that would be worth checking as well (I could tell easily by looking at the code, but I'm busy...and lazy lol).

 

I'm sure quite a few people here would be interested in the results if anyone does try this...

  • Like 1
Link to comment
Share on other sites

Not only would Emby have to be modified, but we'd need ffmpeg builds that include the required libraries. Currently on windows we use a pretty stock build. We will be redoing that soon so that will give us an opportunity to evaluate amf. Thanks.

 

 

My local builds have had AMF enabled for a bit now, and I think Zeranoe's builds also include it now.  I have no ability to test it, though.

 

Yes, I think since ffmpeg.org points Windows users to https://ffmpeg.zeranoe.com/builds/ then those builds could be called "stock" for Windows. The nightly builds do have amf turned on:

 

C:\apps\ffmpeg\ffmpeg-20180124-4dbae00-win64-static\bin>ffmpeg
ffmpeg version N-89882-g4dbae00bac Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  5.101 / 58.  5.101
  libavdevice    58.  0.101 / 58.  0.101
  libavfilter     7. 11.101 /  7. 11.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
 

If someone has a supported AMD card, it should be pretty easy to test out the encoding side of things manually with a recent Zeranoe build.  The encoder options look to be pretty standard stuff, so it shouldn't be too hard to figure out what options to try, and most of the defaults for the more advanced options seem sane.  At a glance: rc, quality, level, and profile would be the obvious options to set...with preanalysis, coder, and vbaq as "worth checking out" options.  I have no idea if the wrapper handles standard settings like -g, -bf, or -refs, so that would be worth checking as well (I could tell easily by looking at the code, but I'm busy...and lazy lol).

 

 

I'm not sure I could figure it out on my own, but I do have an AMD Radeon HD 6000 series graphics card. I also have the ffmpeg.exe with AMF support as mentioned above. If someone fed me ffmpeg commands to try, I'd be happy to report the results.

Link to comment
Share on other sites

Waldonnis

I'm not sure if it would work on a 6000-series.  The info I've seen all points to later generations (7900ish), but I don't have any solid info on that.  Worth a try, though.

 

An easy test would just be an encode that uses the defaults for everything to make sure it works.  Something like:

ffmpeg -i input.mkv -c:v h264_amf -c:a copy output.mkv

Just substitute your media file for input.mkv and change output.mkv to whatever you want the output to be.  This will copy the audio and just use the defaults for the re-encode.

Link to comment
Share on other sites

ffmpeg -i input.mkv -c:v h264_amf -c:a copy output.mkv
...
Input #0, matroska,webm, from 'input.mkv':
Duration: 00:22:18.41, start: 0.000000, bitrate: 2885 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 720x544, SAR 1:1 DAR 45:34, 24.92 fps, 24.92 tbr, 1k tbn, 49.84 tbc (default)
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_amf))
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264_amf @ 00000125ab679040] DLL amfrt64.dll failed to open
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
amfrt64.dll doesn't exist anywhere on my C: drive. I'm not sure I understand why it's looking for that when ffmpeg should have been compiled with the dependent libraries statically linked. Or maybe that error is related to my card being too old to do AMF? Edited by harrv
Link to comment
Share on other sites

Figured it should have probably been installed with the driver for my card, but I already have the latest for a card that age....

 

Edit: I had a screenshot of the AMD driver installer here showing that my driver was already up to date. Once we confirmed my card is simply too old to to have amf support, I removed the image because it looked huge, and it was unnecessary noise in an otherwise useful thread.

Edited by harrv
Link to comment
Share on other sites

Waldonnis

It may just be too old of a card, then, and seems to only install that file with later generations.  You can probably manually copy it from their driver install package, but it probably wouldn't work anyway.  Found a related link from Xaymar (who's done quite a bit of work on this for both ffmpeg and OBS) that lists most (maybe all) of the cards that support it: clicky.  That page is for his OBS plugin, but it likely applies to ffmpeg as well since it would require the same AMF support.
 

amfrt64.dll doesn't exist anywhere on my C: drive. I'm not sure I understand why it's looking for that when ffmpeg should have been compiled with the dependent libraries statically linked. Or maybe that error is related to my card being too old to do AMF?


I wouldn't expect driver-specific routines like that to be linked into a static binary, actually, for a few reasons that I won't get into.  It's the same with cuda/nvenc (and probably qsv as well), actually, and ffmpeg's really just a wrapper in these cases.

Edited by Waldonnis
Link to comment
Share on other sites

It may just be too old of a card, then, and seems to only install that file with later generations.  You can probably manually copy it from their driver install package, but it probably wouldn't work anyway.  Found a related link from Xaymar (who's done quite a bit of work on this for both ffmpeg and OBS) that lists most (maybe all) of the cards that support it: clicky.  That page is for his OBS plugin, but it likely applies to ffmpeg as well since it would require the same AMF support.

I wouldn't expect driver-specific routines like that to be linked into a static binary, actually, for a few reasons that I won't get into.  It's the same with cuda/nvenc (and probably qsv as well), actually, and ffmpeg's really just a wrapper in these cases.

 

Yeah, I wrote that bit about ffmpeg being statically linked before I realized that the .dll it couldn't find was probably part of the gpu driver.

 

OK, so my HD 6xxx is too old to have amf support. I build that PC in 2012. But guess what? I built another PC in 2014 and I just checked what the gpu is in that one: an R9 270!

 

As a test, I took an hour-long TV episode in 720p and used that to run the command you suggested. I also ran it with 'h264' instead of 'h264_amf' to find out what hardware acceleration would buy me. And finally, unrelated to the amf test, I ran the non-amf version of the command on the PC with the HD 6xxx (where I currently run Emby) so I could compare encoding performance of the two PCs.

 

My 2014 build with the R9 270 and amf:

>ffmpeg -i input.mkv -c:v h264_amf -c:a copy output.mkv
ffmpeg version N-89882-g4dbae00bac Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  5.101 / 58.  5.101
  libavdevice    58.  0.101 / 58.  0.101
  libavfilter     7. 11.101 /  7. 11.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.4 + libmatroska v1.4.7
    creation_time   : 2017-04-30T00:01:01.000000Z
  Duration: 01:02:55.81, start: 0.000000, bitrate: 4833 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      title           : English
    Stream #0:3(eng): Subtitle: subrip
    Metadata:
      title           : English (SDH)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_amf))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))
Press [q] to stop, [?] for help
Output #0, matroska, to 'output.mkv':
  Metadata:
    encoder         : Lavf58.5.101
    Stream #0:0(eng): Video: h264 (h264_amf) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc58.9.100 h264_amf
    Stream #0:1(eng): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: ass (ssa)
    Metadata:
      title           : English
      encoder         : Lavc58.9.100 ssa
frame=90529 fps=177 q=-0.0 Lsize= 1241190kB time=01:02:55.77 bitrate=2692.9kbits/s speed=7.38x
video:944673kB audio:294985kB subtitle:39kB other streams:0kB global headers:1kB muxing overhead: 0.120370%

My 2014 build with the R9 270 without amf (so really, just CPU I think):

>ffmpeg -i input.mkv -c:v h264 -c:a copy output-no-amf.mkv
ffmpeg version N-89882-g4dbae00bac Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  5.101 / 58.  5.101
  libavdevice    58.  0.101 / 58.  0.101
  libavfilter     7. 11.101 /  7. 11.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.4 + libmatroska v1.4.7
    creation_time   : 2017-04-30T00:01:01.000000Z
  Duration: 01:02:55.81, start: 0.000000, bitrate: 4833 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      title           : English
    Stream #0:3(eng): Subtitle: subrip
    Metadata:
      title           : English (SDH)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))
Press [q] to stop, [?] for help
[libx264 @ 0000026f5806de00] using SAR=1/1
[libx264 @ 0000026f5806de00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
[libx264 @ 0000026f5806de00] profile High, level 3.1
[libx264 @ 0000026f5806de00] 264 - core 155 r2893 b00bcaf - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 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=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'output-no-amf.mkv':
  Metadata:
    encoder         : Lavf58.5.101
    Stream #0:0(eng): Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc58.9.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: ass (ssa)
    Metadata:
      title           : English
      encoder         : Lavc58.9.100 ssa
frame=90529 fps= 52 q=-1.0 Lsize=  995511kB time=01:02:55.77 bitrate=2159.9kbits/s speed=2.17x
video:698967kB audio:294985kB subtitle:39kB other streams:0kB global headers:1kB muxing overhead: 0.152883%
[libx264 @ 0000026f5806de00] frame I:1387  Avg QP:18.42  size: 43111
[libx264 @ 0000026f5806de00] frame P:26887 Avg QP:21.36  size: 13727
[libx264 @ 0000026f5806de00] frame B:62255 Avg QP:23.13  size:  4608
[libx264 @ 0000026f5806de00] consecutive B-frames:  5.0%  8.0%  5.7% 81.3%
[libx264 @ 0000026f5806de00] mb I  I16..4: 19.6% 69.6% 10.8%
[libx264 @ 0000026f5806de00] mb P  I16..4:  5.6% 15.5%  1.3%  P16..4: 35.3%  8.3%  4.3%  0.0%  0.0%    skip:29.6%
[libx264 @ 0000026f5806de00] mb B  I16..4:  0.6%  1.4%  0.3%  B16..8: 32.9%  2.7%  0.5%  direct: 1.9%  skip:59.8%  L0:42.9% L1:52.2% BI: 4.9%
[libx264 @ 0000026f5806de00] 8x8 transform intra:67.8% inter:84.4%
[libx264 @ 0000026f5806de00] coded y,uvDC,uvAC intra: 41.5% 47.2% 9.0% inter: 9.1% 11.9% 0.1%
[libx264 @ 0000026f5806de00] i16 v,h,dc,p: 35% 22%  9% 34%
[libx264 @ 0000026f5806de00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 29%  5%  6%  7%  6%  6%  5%
[libx264 @ 0000026f5806de00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 15% 16%  7% 10%  9%  8%  7%  6%
[libx264 @ 0000026f5806de00] i8c dc,h,v,p: 61% 18% 18%  3%
[libx264 @ 0000026f5806de00] Weighted P-Frames: Y:6.6% UV:4.9%
[libx264 @ 0000026f5806de00] ref P L0: 62.3% 11.4% 18.0%  7.9%  0.5%
[libx264 @ 0000026f5806de00] ref B L0: 89.4%  8.4%  2.3%
[libx264 @ 0000026f5806de00] ref B L1: 96.6%  3.4%
[libx264 @ 0000026f5806de00] kb/s:1516.48

My 2012 build (where I currently run Emby) with the HD 6xxx without amf (so again, just CPU):

>ffmpeg -i input.mkv -c:v h264 -c:a copy output.mkv
ffmpeg version N-89882-g4dbae00bac Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  5.101 / 58.  5.101
  libavdevice    58.  0.101 / 58.  0.101
  libavfilter     7. 11.101 /  7. 11.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.4 + libmatroska v1.4.7
    creation_time   : 2017-04-30T00:01:01.000000Z
  Duration: 01:02:55.81, start: 0.000000, bitrate: 4833 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      title           : English
    Stream #0:3(eng): Subtitle: subrip
    Metadata:
      title           : English (SDH)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))
Press [q] to stop, [?] for help
[libx264 @ 00000250c089ffc0] using SAR=1/1
[libx264 @ 00000250c089ffc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 00000250c089ffc0] profile High, level 3.1
[libx264 @ 00000250c089ffc0] 264 - core 155 r2893 b00bcaf - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 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=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'output.mkv':
  Metadata:
    encoder         : Lavf58.5.101
    Stream #0:0(eng): Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc58.9.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Stream #0:2(eng): Subtitle: ass (ssa)
    Metadata:
      title           : English
      encoder         : Lavc58.9.100 ssa
frame=90529 fps= 55 q=-1.0 Lsize=  994497kB time=01:02:55.77 bitrate=2157.7kbits/s speed= 2.3x
video:697953kB audio:294985kB subtitle:39kB other streams:0kB global headers:1kB muxing overhead: 0.153032%
[libx264 @ 00000250c089ffc0] frame I:1387  Avg QP:18.42  size: 43111
[libx264 @ 00000250c089ffc0] frame P:26887 Avg QP:21.36  size: 13702
[libx264 @ 00000250c089ffc0] frame B:62255 Avg QP:23.13  size:  4602
[libx264 @ 00000250c089ffc0] consecutive B-frames:  5.0%  8.0%  5.7% 81.3%
[libx264 @ 00000250c089ffc0] mb I  I16..4: 19.6% 69.6% 10.8%
[libx264 @ 00000250c089ffc0] mb P  I16..4:  5.6% 15.4%  1.3%  P16..4: 35.4%  8.3%  4.3%  0.0%  0.0%    skip:29.7%
[libx264 @ 00000250c089ffc0] mb B  I16..4:  0.6%  1.3%  0.3%  B16..8: 32.9%  2.7%  0.5%  direct: 1.9%  skip:59.8%  L0:42.9% L1:52.2% BI: 4.9%
[libx264 @ 00000250c089ffc0] 8x8 transform intra:67.8% inter:84.4%
[libx264 @ 00000250c089ffc0] coded y,uvDC,uvAC intra: 41.4% 47.1% 9.0% inter: 9.1% 11.9% 0.1%
[libx264 @ 00000250c089ffc0] i16 v,h,dc,p: 35% 22%  9% 34%
[libx264 @ 00000250c089ffc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 15% 29%  5%  6%  6%  6%  6%  5%
[libx264 @ 00000250c089ffc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 15% 17%  7% 10%  9%  8%  7%  6%
[libx264 @ 00000250c089ffc0] i8c dc,h,v,p: 61% 18% 18%  3%
[libx264 @ 00000250c089ffc0] Weighted P-Frames: Y:6.6% UV:4.9%
[libx264 @ 00000250c089ffc0] ref P L0: 62.4% 11.4% 17.9%  7.8%  0.4%
[libx264 @ 00000250c089ffc0] ref B L0: 89.4%  8.4%  2.3%
[libx264 @ 00000250c089ffc0] ref B L1: 96.6%  3.4%
[libx264 @ 00000250c089ffc0] kb/s:1514.28

The AMF encoding was 7.38x faster than real-time. The non AMF on the same machine was 2.17x faster than real-time. And the non AMF on the other machine where I run Emby now was 2.13x faster than real-time.

 

Huge improvement with AMF! Much bigger improvement than simply a faster CPU (the machine that got 2.17 non-amf has a better CPU than the one that got 2.13, yet the better CPU made a negligible difference, compared to GPU hardware acceleration). I know that encoding speed is just part of the equation. I should have measured CPU usage during the test too, but didn't.

 

So anyway, looks like we're in business to test amf on my 2014 build if you want to give me anything else to try. Thanks!

Edited by harrv
  • Like 2
Link to comment
Share on other sites

Waldonnis

Nice!  Looking at the code, here are the other defaults that aren't listed in the help text:

    { "refs",       "-1"  },
    { "aspect",     "0"   },
    { "qmin",       "-1"  },
    { "qmax",       "-1"  },
    { "b",          "2M"  },
    { "g",          "250" },
    { "slices",     "1"   },

So, the default bitrate is 2Mbit, GOP length is ~10secs, and I'm guessing it's using an automatic setting for reference frames (no idea what their auto means).  I found out that their preanalysis option is like nVidia's faux 2-pass solution, so I'm not really sure if it would be too useful in this context.  Let's try a higher bitrate CBR (constant bitrate) encode (8Mbit) with 4 refframes and using their "quality" setting:

ffmpeg -i input.mkv -c:v h264_amf -profile high -rc cbr -b 8M -refs 4 -quality quality -c:a copy output.mkv

Definitely take a look at the output and look for artifacts and how good the quality looks to you compared to the original.  I know your input above is a lower bitrate than 8Mbit, so I'm not expecting miracles on the quality, but more to see how much the increased bitrate and quality settings affect encoding speed.

 

Oh, and you can add -hide_banner to the command if you want to suppress the ffmpeg build info at the top of the console output, and -t <secs> if you want it to stop encoding after a certain amount of time has passed in the video (e.g. -t 60 would stop after 60secs of video/audio). The latter is especially useful if you've got a long movie and don't need to encode the whole thing just to test out some encoding option.  I frequently just use 5-10min clips from longer files (-t 300 or -t 600) since they're usually good/long enough for testing purposes and don't take too long to encode.

Link to comment
Share on other sites

Thank you. I also appreciate the hints to hide the build info (-hide_banner) and limit the length of the output (-t). I am at work, and normally I could still access my home machines to try this but I left that one turned off today, so I'll try this in a few more hours and post the results. I have a variety of media files, and probably do have one with a higher bitrate. What would be the ffmpeg command to simply tell me that kind of detail? (Bitrate, etc.)

Link to comment
Share on other sites

Waldonnis

Easiest way, if they're already in an Emby library, is to just look at the media details.  Otherwise, you can use ffprobe to show details rather easily:

ffprobe -show_streams -show_format -i input.mkv

There are other options for formatting output (-of json is popular) or inspecting things like specific stream properties, individual frames, and so forth, but most of that isn't stuff you'd probably normally need.  Since it's based on ffmpeg, you can also use -hide_banner with it as well.  There's also a tool called mediainfo that does a nice job as well and provides some details that ffprobe won't, such as detecting Atmos metadata in a TrueHD audio stream or Dolby Vision metadata (sometimes) in a video stream.

 

Also, if you just run ffmpeg -i input.mkv without specifying any output, it'll show some basic properties in the input section of the console output.  From the input section of your tests above, for example:

Duration: 01:02:55.81, start: 0.000000, bitrate: 4833 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

This shows us the duration (1hr 22min 55s), start timestamp is 0.00, and bitrate ~4.8Mbit (this is overall bitrate, so video plus audio).  Also, the video is h.264 high profile, non-interlaced (progressive) using a yuv420p pixel format, along with other details like frame dimensions/resolution (1280x720), aspect ratios (sample and display; useful for anamorphic encodings), and framerate (23.976, although rounded).  The output section shows mostly the same info as well, so you can see what the output file will be like by comparison. It's a good way to just eyeball basic info if you don't need the more detailed info that ffprobe or mediainfo would provide.

Edited by Waldonnis
  • Like 1
Link to comment
Share on other sites

5a6bf4a9740b5_Screenshot2018126Emby.png


C:\apps\ffmpeg-20180124-4dbae00-win64-static\bin>ffmpeg -hide_banner -i input.mkv -c:v h264_amf -profile high -rc cbr -b 8M -refs 4 -quality quality -t 600 -c:a copy output.mkv
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.5 + libmatroska v1.4.8
    creation_time   : 2018-01-22T03:04:30.000000Z
  Duration: 00:53:44.89, start: 0.000000, bitrate: 8705 kb/s
    [...multiple lines containing chapter titles, start and end points removed...]
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      BPS             : 8063251
      BPS-eng         : 8063251
      DURATION        : 00:53:44.889000000
      DURATION-eng    : 00:53:44.889000000
      NUMBER_OF_FRAMES: 77320
      NUMBER_OF_FRAMES-eng: 77320
      NUMBER_OF_BYTES : 3250386250
      NUMBER_OF_BYTES-eng: 3250386250
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _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: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      BPS             : 640000
      BPS-eng         : 640000
      DURATION        : 00:53:44.832000000
      DURATION-eng    : 00:53:44.832000000
      NUMBER_OF_FRAMES: 100776
      NUMBER_OF_FRAMES-eng: 100776
      NUMBER_OF_BYTES : 257986560
      NUMBER_OF_BYTES-eng: 257986560
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      BPS             : 75
      BPS-eng         : 75
      DURATION        : 00:52:58.126000000
      DURATION-eng    : 00:52:58.126000000
      NUMBER_OF_FRAMES: 1116
      NUMBER_OF_FRAMES-eng: 1116
      NUMBER_OF_BYTES : 29891
      NUMBER_OF_BYTES-eng: 29891
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: subrip
    Metadata:
      title           : SDH
      BPS             : 84
      BPS-eng         : 84
      DURATION        : 00:52:58.126000000
      DURATION-eng    : 00:52:58.126000000
      NUMBER_OF_FRAMES: 1228
      NUMBER_OF_FRAMES-eng: 1228
      NUMBER_OF_BYTES : 33495
      NUMBER_OF_BYTES-eng: 33495
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Please use -profile:a or -profile:v, -profile is ambiguous
Please use -b:a or -b:v, -b is ambiguous
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_amf))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))
Press [q] to stop, [?] for help
Output #0, matroska, to 'output.mkv':
  Metadata:
    encoder         : Lavf58.5.101
    [chapter info removed]
    Stream #0:0: Video: h264 (h264_amf) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 8000 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 8063251
      BPS-eng         : 8063251
      DURATION        : 00:53:44.889000000
      DURATION-eng    : 00:53:44.889000000
      NUMBER_OF_FRAMES: 77320
      NUMBER_OF_FRAMES-eng: 77320
      NUMBER_OF_BYTES : 3250386250
      NUMBER_OF_BYTES-eng: 3250386250
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc58.9.100 h264_amf
    Stream #0:1(eng): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      BPS             : 640000
      BPS-eng         : 640000
      DURATION        : 00:53:44.832000000
      DURATION-eng    : 00:53:44.832000000
      NUMBER_OF_FRAMES: 100776
      NUMBER_OF_FRAMES-eng: 100776
      NUMBER_OF_BYTES : 257986560
      NUMBER_OF_BYTES-eng: 257986560
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: ass (ssa)
    Metadata:
      BPS             : 75
      BPS-eng         : 75
      DURATION        : 00:52:58.126000000
      DURATION-eng    : 00:52:58.126000000
      NUMBER_OF_FRAMES: 1116
      NUMBER_OF_FRAMES-eng: 1116
      NUMBER_OF_BYTES : 29891
      NUMBER_OF_BYTES-eng: 29891
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc58.9.100 ssa
frame=14386 fps= 41 q=-0.0 Lsize=  422965kB time=00:09:59.97 bitrate=5775.1kbits/s speed= 1.7x
video:375827kB audio:46875kB subtitle:9kB other streams:0kB global headers:1kB muxing overhead: 0.060025%

It looks to me like it didn't use hardware acceleration. Perhaps because of this:
 

Please use -profile:a or -profile:v, -profile is ambiguous
Please use -b:a or -b:v, -b is ambiguous
Edited by harrv
Link to comment
Share on other sites

I tried again with adding ':v" to those two commands:

ffmpeg -hide_banner -i input.mkv -c:v h264_amf -profile:v high -rc cbr -b:v 8M -refs 4 -quality quality -t 600 -c:a copy output.mkv
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    encoder         : libebml v1.3.5 + libmatroska v1.4.8
    creation_time   : 2018-01-22T03:04:30.000000Z
  Duration: 00:53:44.89, start: 0.000000, bitrate: 8705 kb/s
    [chapter info removed]
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      BPS             : 8063251
      BPS-eng         : 8063251
      DURATION        : 00:53:44.889000000
      DURATION-eng    : 00:53:44.889000000
      NUMBER_OF_FRAMES: 77320
      NUMBER_OF_FRAMES-eng: 77320
      NUMBER_OF_BYTES : 3250386250
      NUMBER_OF_BYTES-eng: 3250386250
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _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: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      BPS             : 640000
      BPS-eng         : 640000
      DURATION        : 00:53:44.832000000
      DURATION-eng    : 00:53:44.832000000
      NUMBER_OF_FRAMES: 100776
      NUMBER_OF_FRAMES-eng: 100776
      NUMBER_OF_BYTES : 257986560
      NUMBER_OF_BYTES-eng: 257986560
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      BPS             : 75
      BPS-eng         : 75
      DURATION        : 00:52:58.126000000
      DURATION-eng    : 00:52:58.126000000
      NUMBER_OF_FRAMES: 1116
      NUMBER_OF_FRAMES-eng: 1116
      NUMBER_OF_BYTES : 29891
      NUMBER_OF_BYTES-eng: 29891
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: subrip
    Metadata:
      title           : SDH
      BPS             : 84
      BPS-eng         : 84
      DURATION        : 00:52:58.126000000
      DURATION-eng    : 00:52:58.126000000
      NUMBER_OF_FRAMES: 1228
      NUMBER_OF_FRAMES-eng: 1228
      NUMBER_OF_BYTES : 33495
      NUMBER_OF_BYTES-eng: 33495
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_amf))
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (subrip (srt) -> ass (ssa))
Press [q] to stop, [?] for help
Output #0, matroska, to 'output.mkv':
  Metadata:
    encoder         : Lavf58.5.101
    [chapter info removed]
    Stream #0:0: Video: h264 (h264_amf) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 8000 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS             : 8063251
      BPS-eng         : 8063251
      DURATION        : 00:53:44.889000000
      DURATION-eng    : 00:53:44.889000000
      NUMBER_OF_FRAMES: 77320
      NUMBER_OF_FRAMES-eng: 77320
      NUMBER_OF_BYTES : 3250386250
      NUMBER_OF_BYTES-eng: 3250386250
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc58.9.100 h264_amf
    Stream #0:1(eng): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
    Metadata:
      BPS             : 640000
      BPS-eng         : 640000
      DURATION        : 00:53:44.832000000
      DURATION-eng    : 00:53:44.832000000
      NUMBER_OF_FRAMES: 100776
      NUMBER_OF_FRAMES-eng: 100776
      NUMBER_OF_BYTES : 257986560
      NUMBER_OF_BYTES-eng: 257986560
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: ass (ssa)
    Metadata:
      BPS             : 75
      BPS-eng         : 75
      DURATION        : 00:52:58.126000000
      DURATION-eng    : 00:52:58.126000000
      NUMBER_OF_FRAMES: 1116
      NUMBER_OF_FRAMES-eng: 1116
      NUMBER_OF_BYTES : 29891
      NUMBER_OF_BYTES-eng: 29891
      _STATISTICS_WRITING_APP: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v19.0.0 ('Brave Captain') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-22 03:04:30
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-22 03:04:30
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      encoder         : Lavc58.9.100 ssa
frame=14386 fps= 41 q=-0.0 Lsize=  422965kB time=00:09:59.97 bitrate=5775.1kbits/s speed=1.69x
video:375827kB audio:46875kB subtitle:9kB other streams:0kB global headers:1kB muxing overhead: 0.060025%
Link to comment
Share on other sites

Waldonnis

Yeah, that was an oversight on my part.  It's been a busy few days here, so I was a bit distracted when I typed it initially.  Good catch  :)

 

The performance hit was a bit more than expected.  For live transcoding, though, one wouldn't use most of those options anyway.  Some of those options would be useful for manual transcodes (probably along with their vbaq option instead of doing a cbr encode since it lacks true two-pass ability), but enabling quality settings is usually a good way to stress things a bit.  There was also a SRT->ASS subtitle encode going on, but I doubt it would've caused much of a hit compared to the video.  Still, it was faster than the native framerate on average and would've at least been watchable with little to no buffering interruptions.  I'd say Emby could probably get away with the default -quality value (speed) or maybe balanced at worst if speed ends up hurting video quality too much.  Also, they could probably just leave the refs at default as well, again assuming not a big hit on quality.

 

How was the video quality compared to the original?

 

I actually have a system in the house for a day or two that I'm setting up for a cousin that has a 4th gen GCN card in it (think it's a 550...a bit on the low side for gaming, but should be capable for transcoding).  I'll knock out some quick testing on it tomorrow to see if later generations improve that performance even with more quality settings enabled.  I'd also like to understand how their vbaq mode works, so...bonus.  I'm glad this thread popped up or I wouldn't have thought about trying it otherwise.

  • Like 1
Link to comment
Share on other sites

You asked about the video quality of the output compared to the original. It was good. I couldn't detect a difference.

 

Good luck with your testing. I know before I offered to try stuff with my card you said you didn't really have time. I appreciate your willingness to help move this along. :)

 

Let me know if you think of other commands you'd like to see the output of.

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