Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GPU h264_nvenc encoding not working. #2121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xiaomofa
Copy link

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
make
sudo make install

git clone https://github.com/FFmpeg/FFmpeg.git
./configure --prefix=/usr/local/ffmpeg --enable-shared --disable-static --disable-doc  --enable-gpl --enable-libx264 --enable-cuda --enable-cuvid
make
sudo make install

ffmpeg -decoders | grep cuvid

# Transcoding h264 video with GPU
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i test.mp4 -c:v h264_nvenc  -y test-gpu.mp4

# Transcoding using CPU decoding and GPU encoding.
ffmpeg -i test.mp4 -c:v h264_nvenc -y test-gpu.mp4

Reference: https://trac.ffmpeg.org/wiki/HWAccelIntro#NVENC

@coveralls
Copy link

coveralls commented Feb 25, 2024

Coverage Status

coverage: 81.89% (-0.01%) from 81.904%
when pulling e798541 on xiaomofa:fix-gpu-h264_nvenc
into bc8d1a8 on Zulko:master.

@Paillat-dev
Copy link
Contributor

I bump this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants