mpv-webm icon indicating copy to clipboard operation
mpv-webm copied to clipboard

NVENC doesn't work anymore

Open glu8716 opened this issue 3 years ago • 4 comments

mpv version and platform

Artix Linux

mpv 0.33.1-dirty Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
FFmpeg library versions:
   libavutil       56.70.100
   libavcodec      58.134.100
   libavformat     58.76.100
   libswscale      5.9.100
   libavfilter     7.110.100
   libswresample   3.9.100
FFmpeg version: n4.4

Description

I can't encode videos with NVENC anymore. It used to work fine days ago, now it suddenly fails. It happens on every file. I can use h264_nvenc fine with Simplescreenrecorder.

Log file

a.log

glu8716 avatar Jun 06 '21 14:06 glu8716

Hmm, the logs doesn't seem to show anything really insightful, do you mind running the encode command with verbose flags?

mpv 'simplescreenrecorder-2021-06-06_16.07.45.mkv' '--start=0:00:00.000' '--end=0:00:16.855' --loop-file=no --no-pause --ovc=h264_nvenc --oac=aac --vid=1 --aid=1 --sid=no --sub-ass-override=yes --sub-ass-vsfilter-aspect-compat=yes --sub-auto=exact '--sub-delay=0.000000' --video-rotate=0 --deinterlace=no --ovcopts-add=b=1186k --ovcopts-add=crf=10 '--o=./simplescreenrecorder-2021-06-06_16.07.45-[00.00.000-00.16.855]-audio.mp4' -v --log-file=encode.log

ekisu avatar Jun 13 '21 00:06 ekisu

I had to use another video as I don't have the one I used for the first post anymore. I kept the same settings for an easier reference. Line 326 seems to be the one before the process fails. encode.log

glu8716 avatar Jun 13 '21 00:06 glu8716

It seems like something changed with 0.33.1 because it still works with version 0.33.0. Tried to find the reason but the debugging messages aren't really helping.

UtilFunction avatar Dec 04 '21 21:12 UtilFunction

I also have the same issue, I have a working nvidia driver with cuda & nvenc, and I can record using ffmpeg just fine, but it doesn't work with the addon. Hope it gets fixed Nvidia driver: 495.44 mpv: 34v

mez0ru avatar Dec 29 '21 17:12 mez0ru

It seems like this can be fixed by setting bframes to 0, as builds after this change https://github.com/FFmpeg/FFmpeg/commit/a0949d0bcb0eee2f3fffcf9a4810c0295d14c0dc are when it stopped working. Perhaps somebody familiar with the project can implement this into the nvenc profile that the script uses?

Spkiylfafr avatar Mar 23 '23 23:03 Spkiylfafr