lisamelton / video_transcoding

Tools to transcode, inspect and convert videos.
MIT License
2.39k stars 160 forks source link

Use nvidia gpu for transcode #252

Closed random404-bot closed 5 years ago

random404-bot commented 5 years ago

with handbrake we can use gpu to accelerate and for me it s realy a big deal i try to do this by myself since with handbrakecli you can use gpu but not working at all. im on windows with ubuntu terminal install from windows store

samhutchins commented 5 years ago

I don't think HandBrake can "see" the GPU when its running in the Ubuntu terminal on Windows, unfortunately. This is a limitation of WSL

There's a guide on installing these tools on Windows natively, so they're accessed via CMD, here: https://github.com/JMoVS/installing_video_transcoding_on_windows#pre-windows-10-creators-update-and-earlier

This is how I installed the tools, and I can add --encoder nvenc_h264 to my transcode-video command to use my GPU.

lisamelton commented 5 years ago

@samhutchins Thanks! I would have had no idea what the problem was there.

@alex37330 Did Sam answer your question sufficiently?

damorrison commented 5 years ago

How does one find out which hardware encoders are available? My windows box has a Radeon GPU and my other is a 2018 MacBook pro

On Sun, 10 Feb 2019 at 17:09, Don Melton notifications@github.com wrote:

@samhutchins https://github.com/samhutchins Thanks! I would have had no idea what the problem was there.

@alex37330 https://github.com/alex37330 Did Sam answer your question sufficiently?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/donmelton/video_transcoding/issues/252#issuecomment-462151939, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYJDdkhMowCZyuDaVDj2FkVOoAz-w9Zks5vMFJIgaJpZM4azEv6 .

-- Kind regards, Dave

lisamelton commented 5 years ago

@damorrison Good question! You have to get the answer from HandBrake itself by checking the output of HandBrakeCLI --help to find out if your platform has any of these video encoders available.

I'm in the process of rewriting the FAQ to make that clearer based on a great suggestion from @vr8hub. See our discussion in issue #251.

samhutchins commented 5 years ago

@damorrison Just to expand on Don's answer a little, the --help output will look something like this:

   -e, --encoder <string>  Select video encoder:
                               x264
                               x264_10bit
                               nvenc_h264
                               x265
                               x265_10bit
                               x265_12bit
                               nvenc_h265
                               mpeg4
                               mpeg2
                               VP8
                               VP9
                               theora

It'll be in the Video Options section of the output

lisamelton commented 5 years ago

@samhutchins Thanks! I'll try to use that Video Options clarification in the FAQ, too.

damorrison commented 5 years ago

So my MacBook doesn’t seem to have one built in? I’m using the brew version which is 1.2

                           x264
                           x264_10bit
                           vt_h264
                           x265
                           x265_10bit
                           x265_12bit
                           vt_h265
                           mpeg4
                           mpeg2
                           VP8
                           VP9
                           theora

David Morrison

On 10 Feb 2019, at 19:29, Sam Hutchins notifications@github.com wrote:

@damorrison https://github.com/damorrison Just to expand on Don's answer a little, the --help output will look something like this:

-e, --encoder Select video encoder: x264 x264_10bit nvenc_h264 x265 x265_10bit x265_12bit nvenc_h265 mpeg4 mpeg2 VP8 VP9 theora It'll be in the Video Options section of the output

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/donmelton/video_transcoding/issues/252#issuecomment-462163619, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYJDUq_sMvdWHQ4cWruXL9f18C8KkM8ks5vMHMegaJpZM4azEv6.

random404-bot commented 5 years ago

thank you very much I haven't the time to do it now still thank you

lisamelton commented 5 years ago

@damorrison No, you have both the Apple VideoToolbox vt_h264 and vt_h265 hardware encoders available, just like my MacBook Pro. You can try the H.264 version this way:

transcode-video --encoder vt_h264 "/path/to/Movie.mkv"

Does that work for you?

lisamelton commented 5 years ago

@alex37330 You are very welcome! I'll close this once I learn that @damorrison has resolved his issue.

damorrison commented 5 years ago

Ah - handily named I see to make it obvious it’s the Apple encode :P

Yes - thanks that works, I’ll have a play. .

David Morrison dave@the-morrisons.com

On 10 Feb 2019, at 20:19, Don Melton notifications@github.com wrote:

@damorrison https://github.com/damorrison No, you have both the Apple VideoToolbox vt_h264 and vt_h265 hardware encoders available, just like my MacBook Pro. You can try the H.264 version this way:

transcode-video --encoder vt_h264 "/path/to/Movie.mkv" Does that work for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/donmelton/video_transcoding/issues/252#issuecomment-462168140, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYJDZiV3tB2xb7gin3zKqg1Zo7echZDks5vMH7SgaJpZM4azEv6.

lisamelton commented 5 years ago

@damorrison Great! BTW, the Apple VideoToolbox encoders are usually the Intel Quick Sync Video encoders on macOS. But HandBrake and FFmpeg have to use the VideoToolbox API to get to them. Go figure.

Anyway, I'll close this now.