November 30, 2020, 04:06:15 am

News:

--


Recent posts

Pages1 2 3 ... 10
1
Windows / Re: Nvidia HEVC problems
Last post by eumagga0x2a - November 29, 2020, 04:25:20 pm
According to the log provided, dual-pass definitely doesn't work with Avidemux, the only missing bit of info is whether the stats file is populated or empty.

It would be valuable to know whether some of rate control modes which don't use presets (i.e. "constant quality", "constant bitrate" and "variable bitrate") in single-pass mode work.
2
Windows / Re: Nvidia HEVC problems
Last post by eumagga0x2a - November 29, 2020, 04:08:48 pm
Quote from: Jiehfeng on November 29, 2020, 04:03:20 pmSo does this mean avidemux needs a fix somewhere?

Sure it does, as the options for the NVIDIA HEVC encoder plugin were copied from the H.264 one without any chance to test whether they work or not. If we're lucky, it will be enough to remove non-working options. If we're not, it might be necessary to upgrade or patch the bundled FFmpeg.
3
Windows / Re: Nvidia HEVC problems
Last post by eumagga0x2a - November 29, 2020, 04:05:50 pm
Quote from: Jiehfeng on November 29, 2020, 04:03:20 pmTried that as well, used the slow preset which says it uses 2 pass, the -rc 2 pass seems to be deprecated.

If there was no stats file, it wasn't a 2-pass mode.
4
Windows / Re: Nvidia HEVC problems
Last post by Jiehfeng - November 29, 2020, 04:03:20 pm
Quote from: eumagga0x2a on November 29, 2020, 02:16:38 pmThank you, this means that NVENC actually works for HEVC, but not the usual rate control settings (the output bitrate is very low and quantizer is quite high for a "high quality" preset).

I see, great!

Quote from: eumagga0x2a on November 29, 2020, 02:16:38 pmCould you please continue testing with ffmpeg which modes produce usable results and which don't? Does it help to specify a fixed, high enough bitrate?

I tried the lossless option, bitrate is much higher at 59000kbps, looks more or less the same as the source.

Then I tried Constant Bitrate Mode (the regular one, not the hq one) with the same bitrate as the source, the resulting bitrate is lower (as you said that is expected), but the quality is great, almost like the original:



cbr hq also gave similar results, but slightly lower bitrate at 11000kbps.

vbr hq also gave more or less the same result and bitrate.

Quote from: eumagga0x2a on November 29, 2020, 02:16:38 pmI also suspect that dual-pass mode is broken (is the stats file really populated or empty?).

Tried that as well, used the slow preset which says it uses 2 pass, the -rc 2 pass seems to be deprecated. I specified the bitrate to the same as the source here as well. Bitrate was around 11000kbps and quality is more or less the same as the source.

So all in all, all the modes I tried gave similar results and all of them look the same to me and to the source. So does this mean avidemux needs a fix somewhere?
5
Windows / Re: Nvidia HEVC problems
Last post by eumagga0x2a - November 29, 2020, 02:16:38 pm
Thank you, this means that NVENC actually works for HEVC, but not the usual rate control settings (the output bitrate is very low and quantizer is quite high for a "high quality" preset).

Could you please continue testing with ffmpeg which modes produce usable results and which don't? Does it help to specify a fixed, high enough bitrate?

I also suspect that dual-pass mode is broken (is the stats file really populated or empty?).

ffmpeg -h encoder=hevc_nvenc
lists all available options.

PS: Would you please quote only the parts of the text you directly refer to, instead of a complete reply? Thanks!
6
Windows / Re: Nvidia HEVC problems
Last post by Jiehfeng - November 29, 2020, 01:53:06 pm
Quote from: eumagga0x2a on November 28, 2020, 06:49:18 pm
Quote from: Jiehfeng on November 28, 2020, 04:02:59 pmI chose CUDA acceleration when I first started the project, but when exporting, selecting HEVC has it locked to "Software Encoding" and I can't change it. I think the GPU is utilised but I guess it's still Software Encoding according to you.

Looks like Premiere is able to detect that something doesn't work right with the NVIDIA HW accelerated HEVC encoder.

Quote from: Jiehfeng on November 28, 2020, 04:02:59 pmAh I see, by quality not respected, is it a bad enough difference to not choose HEVC?

As the NVENC is apparently broken with Avidemux (with libavcodec as used in Avidemux) on Windows with the NVIDIA graphics card and drivers you use (and maybe with all driver versions available for this card), it is up to you to either select the only software HEVC encoder available (x265, superior by far to NVENC but very expensive computationally) or to choose a different codec alltogether. By choosing H.264, you pay the price by needing a higher bitrate for given quality (but get a better compatibility in return).

Quote from: Jiehfeng on November 28, 2020, 04:02:59 pmWhat about Handbrake? Though the GPU load was low at 4%, it wasn't at 0% which is what it was at when the rendering finished. Does it also use Software Encoding for HEVC? The output was fine.

Can't tell, probably Handbrake is using GPU for decoding only. Encoding a video with bare command-line ffmpeg and hevc_nvenc might provide some clues:

ffmpeg -i "DriveLetter:\Path\To\SourceVideo" -c:v hevc_nvenc -preset:v hq -c:a copy "DriveLetter:\Path\To\OutputVideo.mkv"

I see, thanks for the recommendation.

Also, I think I've been mistaken to look at GPU Load, cause in these new GPUs the encoding work is done in a separate area, so I opened up task manager while I was using ffmpeg as you said and the Video Encode section was at 100% the whole time.

The output has a higher bitrate than avidemux, the quality is decent, but not very clear, however not terrible like how it was with avidemux.



Here's what the CMD looked like:

C:\Users\alain\Documents\ShareX\Tools>ffmpeg -i "E:\SharePlay\The Witcher 3\The Witcher 3 2020.11.02 - 13.58.08.04.DVR.mp4" -c:v hevc_nvenc -preset:v hq -c:a copy "C:\Users\alain\Desktop\Tester\Witcher.mp4"
ffmpeg version git-2020-05-27-8b5ffae Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 49.100 / 56. 49.100
  libavcodec     58. 87.101 / 58. 87.101
  libavformat    58. 43.100 / 58. 43.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 83.100 /  7. 83.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\SharePlay\The Witcher 3\The Witcher 3 2020.11.02 - 13.58.08.04.DVR.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-11-02T08:28:11.000000Z
    date            : 2020
  Duration: 00:07:19.27, start: 0.000000, bitrate: 26934 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt470m), 2560x1440 [SAR 1:1 DAR 16:9], 26731 kb/s, 60 fps, 60 tbr, 90k tbn, 120 tbc (default)
    Metadata:
      creation_time   : 2020-11-02T08:28:11.000000Z
      handler_name    : VideoHandle
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 196 kb/s (default)
    Metadata:
      creation_time   : 2020-11-02T08:28:11.000000Z
      handler_name    : SoundHandle
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_nvenc))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Output #0, mp4, to 'C:\Users\alain\Desktop\Tester\Witcher.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    date            : 2020
    encoder         : Lavf58.43.100
    Stream #0:0(und): Video: hevc (hevc_nvenc) (Main) (hev1 / 0x31766568), yuv420p, 2560x1440 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 60 fps, 15360 tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2020-11-02T08:28:11.000000Z
      handler_name    : VideoHandle
      encoder         : Lavc58.87.101 hevc_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 196 kb/s (default)
    Metadata:
      creation_time   : 2020-11-02T08:28:11.000000Z
      handler_name    : SoundHandle
frame=26356 fps= 84 q=31.0 Lsize=   75437kB time=00:07:19.25 bitrate=1406.9kbits/s speed= 1.4x
video:64413kB audio:10537kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.650333%

C:\Users\alain\Documents\ShareX\Tools>
7
Windows / Re: Nvidia HEVC problems
Last post by eumagga0x2a - November 28, 2020, 06:49:18 pm
Quote from: Jiehfeng on November 28, 2020, 04:02:59 pmI chose CUDA acceleration when I first started the project, but when exporting, selecting HEVC has it locked to "Software Encoding" and I can't change it. I think the GPU is utilised but I guess it's still Software Encoding according to you.

Looks like Premiere is able to detect that something doesn't work right with the NVIDIA HW accelerated HEVC encoder.

Quote from: Jiehfeng on November 28, 2020, 04:02:59 pmAh I see, by quality not respected, is it a bad enough difference to not choose HEVC?

As the NVENC is apparently broken with Avidemux (with libavcodec as used in Avidemux) on Windows with the NVIDIA graphics card and drivers you use (and maybe with all driver versions available for this card), it is up to you to either select the only software HEVC encoder available (x265, superior by far to NVENC but very expensive computationally) or to choose a different codec alltogether. By choosing H.264, you pay the price by needing a higher bitrate for given quality (but get a better compatibility in return).

Quote from: Jiehfeng on November 28, 2020, 04:02:59 pmWhat about Handbrake? Though the GPU load was low at 4%, it wasn't at 0% which is what it was at when the rendering finished. Does it also use Software Encoding for HEVC? The output was fine.

Can't tell, probably Handbrake is using GPU for decoding only. Encoding a video with bare command-line ffmpeg and hevc_nvenc might provide some clues:

ffmpeg -i "DriveLetter:\Path\To\SourceVideo" -c:v hevc_nvenc -preset:v hq -c:a copy "DriveLetter:\Path\To\OutputVideo.mkv"
8
Windows / Re: Nvidia HEVC problems
Last post by Jiehfeng - November 28, 2020, 04:02:59 pm
Quote from: eumagga0x2a on November 28, 2020, 03:06:54 pm
Quote from: Jiehfeng on November 28, 2020, 02:24:05 pmNo, but should I try that?

No, please don't bother then, too much of a hassle.

Quote from: Jiehfeng on November 28, 2020, 02:24:05 pmI tried Adobe Premiere Pro and its HEVC option, the exported video has 7000kbps bitrate while the original is 23000kbps, maybe HEVC's nature is to lower the bitrate? The quality looks almost identical to me either way.

Does Premiere use the NVENC hardware encoder or perform encoding on the CPU? Software encoders are not expected to be affected by the NVENC issue.

Regarding lower bitrate: of course, this is the purpose of HEVC to provide a quality similar to H.264 at a much lower bitrate (3x lower is perfectly possible depending on source). The problem with NVENC was the specified quality not respected.

I chose CUDA acceleration when I first started the project, but when exporting, selecting HEVC has it locked to "Software Encoding" and I can't change it. I think the GPU is utilised but I guess it's still Software Encoding according to you.

Ah I see, by quality not respected, is it a bad enough difference to not choose HEVC? It looks almost the same to me.

What about Handbrake? Though the GPU load was low at 4%, it wasn't at 0% which is what it was at when the rendering finished. Does it also use Software Encoding for HEVC? The output was fine.

EDIT: Also, in Premiere Pro the GPU load was over 10%.
9
Windows / Re: Nvidia HEVC problems
Last post by eumagga0x2a - November 28, 2020, 03:06:54 pm
Quote from: Jiehfeng on November 28, 2020, 02:24:05 pmNo, but should I try that?

No, please don't bother then, too much of a hassle.

Quote from: Jiehfeng on November 28, 2020, 02:24:05 pmI tried Adobe Premiere Pro and its HEVC option, the exported video has 7000kbps bitrate while the original is 23000kbps, maybe HEVC's nature is to lower the bitrate? The quality looks almost identical to me either way.

Does Premiere use the NVENC hardware encoder or perform encoding on the CPU? Software encoders are not expected to be affected by the NVENC issue.

Regarding lower bitrate: of course, this is the purpose of HEVC to provide a quality similar to H.264 at a much lower bitrate (3x lower is perfectly possible depending on source). The problem with NVENC was the specified quality not respected.
10
Windows / Re: Nvidia HEVC problems
Last post by Jiehfeng - November 28, 2020, 02:24:05 pm
Quote from: eumagga0x2a on November 28, 2020, 02:00:08 pmSure, I understand. You will have to wait for NVIDIA to sort things out then.

By the way, do you have a Linux system installed as dual-boot on the same hardware to test whether the issue is cross-platform?

No, but should I try that? Will it help you?
I tried Adobe Premiere Pro and its HEVC option, the exported video has 7000kbps bitrate while the original is 23000kbps, maybe HEVC's nature is to lower the bitrate? The quality looks almost identical to me either way.
Pages1 2 3 ... 10