rigaya / NVEnc

NVENCによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-17.html
Other
1.07k stars 112 forks source link

Qestion: Why a video encoded by NVEncC plays differently as an encoded by x265? #186

Closed karmantyu closed 1 month ago

karmantyu commented 4 years ago

Dear Friends,

I have a file to encode , here it is a cut, but unchanged [part](https://www.dropbox.com/s/zzlm0tid0ua6wq0/ROtest.mkv?dl=0 3).

If I encode this file with NVEncC then the video plays with visual errors. In the flyby part we see the fast moving target in blurred playback by CoreELEC on S905x hardware player. The encoded part is [here](https://www.dropbox.com/s/3a7ypkcxngjxlsy/ROnvencc.mkv?dl=0 2).

Encode with standard x265 codec (similar settings and quality as NVEncC) plays OK (no motion blur) on s905x.

Do you have any idea what may be strange in the NVEncC encode not playing well?

devil40xxx commented 4 years ago

You need to post your exact setting in encoding so anyone can verfiy it .

Check it with Windows-base player can handle x265 like mpc-hc .Use software mode to see if it's an CoreELEC compatible problem because NVEncC encoded videos always playback very good in PC platfrom.

karmantyu commented 4 years ago

My encoding .bat file lines: "P:\Program Files\StaxRip\Apps\Plugins\both\ffms2\ffmsindex.exe" "E:\MEGA\Test\ROtest.mkv" "E:\MEGA\Test\ROtest.mkv.ffindex" "p:\Program Files\Hybrid\64bit\NVEncC.exe" --cqp 18 --codec h265 --preset quality --output-depth 10 --max-bitrate 260000 --aq-strength 1 --aq --lookahead 32 --nonrefp --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(100000000,1)" --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --max-cll "10000,180" --aud -i "E:\MEGA\TEST\RO.avs" -o "E:\MEGA\TEST\ROtest.h265" My RO.avs file: LoadPlugin("P:\Program Files\StaxRip\Apps\Plugins\both\ffms2\ffms2.dll") FFVideoSource("E:\MEGA\Test\ROtest.mkv", cachefile="E:\MEGA\TEST\ROtest.mkv.ffindex") AssumeFPS(23.976)

On Windows I've checked with KODI and mpc-hc and both played the NVEncC encoded video without a glitch. So I suspect there is something NVEncC doing with the frame structure or there may be some slight incompatibility with CoreELEC or Amlogic S905x. I've posted this on CoreELEC too.

rigaya commented 4 years ago

As I also see no problem in mpc-hc (LAV decoder + dxva2n) nor VLC, the problem might be that output might be over the limitation of the hardware decoder of CoreELEC or S905x.

Options below might reduce the load of the decoder.

karmantyu commented 4 years ago

Thank You for the suggestions. I've tried all the settings recommended with NVEncC version 4.60. Had no luck, all the video files had the same blur error on CoreElec S905x.

21jump commented 4 years ago

I had the exact same problem with a Sony 900e. The file play perfectly on all devices, exept on my main one... :-( . I love the NVENC encoder, but I can't use it now because of this... I use staxrip 2.0.8.0 with this command line: --cqp 25 --codec h265 --preset quality --profile main10 --output-depth 10 --aq --aq-temporal --lookahead 32 --vpp-edgelevel strength=10,threshold=15,black=5,white=2 --cabac but I had tried it with least parameter like your suggestion without success --cqp 25 --codec h265 --output-depth 10 --aq --aq-temporal --ref 2 -b 0. If someone have a idea for this... Thank you!

21jump commented 4 years ago

Hi, after a multiples tests, I have found a way to reduce significatly the blur, but not totally.

--gop-len 23 --strict-gop and no lookahead set improve a lot the problem, but I don't find a way to eliminate it completly.

The Bframes 0 and the Default preset doesn't seem to help, in fact, it's worse in many tests.

With this information @rigaya , have you a idea to improve it? I love encoding with nvenc and I don't want to go back on cpu encoding...

@karmantyu Can you try on your side and give me a comeback with your file?

Thanks! I use 4.69 with StaxRip beta 2.1.0.7 for now, but tested with 2.0.8.0

karmantyu commented 4 years ago

Hi @21jump . Sorry for the late answer. I’ve made some tests with your recommended settings too. I see no positive changes in quality concerning fast moving objects in picture. I’m quite busy now so I will investigate this issue further in the next weeks.

rigaya commented 1 month ago

I’ll close the issue as I’ll not be able to support specific playback environments.