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

[h264_nvenc] How to enable decode on GPU? #25072

Open
steam3d opened this issue Apr 30, 2020 · 2 comments
Open

[h264_nvenc] How to enable decode on GPU? #25072

steam3d opened this issue Apr 30, 2020 · 2 comments
Labels

Comments

@steam3d
Copy link

@steam3d steam3d commented Apr 30, 2020

I use ffmpeg and i can decode video on GPU using h264_nvenc

cmd = '{0}  -i "{1}" -vcodec h264_nvenc  -acodec aac  "{2}"'
# {0} - ffmpeg path
# {1} - input file
# {2} - output file

How can i use h264_nvenc in post-processing options?

@steam3d steam3d added the question label Apr 30, 2020
@kfur
Copy link

@kfur kfur commented May 3, 2020

Try --postprocessor-args

@steam3d
Copy link
Author

@steam3d steam3d commented May 3, 2020

I tried this and got error

youtube_dl.utils.DownloadError: ERROR: h264_nvenc: Invalid argument

options = {
    'mp4': {'nocheckcertificate': True,
            'outtmpl': dlpath,
            'ffmpeg_location': ffmpegpath,
            'forcefilename': True,
            'format': 'bestvideo/best',
            'postprocessors': [{
            'key': 'FFmpegVideoConvertor',
            'preferedformat':'mp4'
			}],
            'logger': MyLogger(signal),
            'progress_hooks': [my_hook],
            'postprocessor_args': ['h264_nvenc'],
            },
}

Update. I replaced 'postprocessor_args': ['h264_nvenc'] to 'postprocessor_args': ['-c:v h264_nvenc'], and got this error

youtube_dl.utils.DownloadError:` ERROR: At least one output file must be specified

But i choose the output file 'outtmpl': dlpath,

@steam3d steam3d mentioned this issue May 4, 2020
6 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.