Many thanks to the MX dev team for the great work getting hardware acceleration integrated in the FFmpeg 3.x build. (Probably Stevo's handy work).
Video transcoding is something I do every day, and I just took it for granted that FFmpeg was the same on all distros. Oh, no it's not!
At a friend's house last nite (a wool-dyed Ubuntu/Mint family) and he was transcoding a 96 minute bluray mkv movie to dvd quality mp4 to load on his phone. After an hour went by, I volunteered to do it on my MX17 tablet.
It took 4 mins.
To my surprise, his FFmpeg build had no GPU support.
I got home and felt so grateful that this stuff just works for me on MX without a big fight.
FFmpeg hardware accelerated transcoding
-
- Posts: 136
- Joined: Sat May 02, 2015 4:35 pm
FFmpeg hardware accelerated transcoding
Son, someday all this will belong to your ex wife.
Re: FFmpeg hardware accelerated transcoding
Give credit to the Debian team for having the hardware acceleration built in for ffmpeg, not me; I just backport their configuration...though if you're talking about using Handbrake with Intel GPU support, we're porting the deb-multimedia version which leverages libmfx for that, which the Debian/Ubuntu/Mint versions do not.
-
- Posts: 136
- Joined: Sat May 02, 2015 4:35 pm
Re: FFmpeg hardware accelerated transcoding
Excellent. I use the heck out of FFmpeg because it has hardware accel. I'd use Handbrake a lot more if it had it, too. Can't wait.Stevo wrote: ↑Thu Sep 13, 2018 1:17 pm Give credit to the Debian team for having the hardware acceleration built in for ffmpeg, not me; I just backport their configuration...though if you're talking about using Handbrake with Intel GPU support, we're porting the deb-multimedia version which leverages libmfx for that, which the Debian/Ubuntu/Mint versions do not.
Son, someday all this will belong to your ex wife.
Re: FFmpeg hardware accelerated transcoding
What was it using in your tablet? Did you have to pass any special flag in the ffmpeg command?clicktician wrote: ↑Thu Sep 13, 2018 2:11 pmExcellent. I use the heck out of FFmpeg because it has hardware accel. I'd use Handbrake a lot more if it had it, too. Can't wait.Stevo wrote: ↑Thu Sep 13, 2018 1:17 pm Give credit to the Debian team for having the hardware acceleration built in for ffmpeg, not me; I just backport their configuration...though if you're talking about using Handbrake with Intel GPU support, we're porting the deb-multimedia version which leverages libmfx for that, which the Debian/Ubuntu/Mint versions do not.
-
- Posts: 136
- Joined: Sat May 02, 2015 4:35 pm
Re: FFmpeg hardware accelerated transcoding
Oh, yeah. You have to tell FFmpeg explicitly to use Nvidia, AMD, or Intel. It has a special set of args for them. On my tablet (a dinky Intel atom with 6xx gpu), it's the standard vaapi set. So, I used something like this:
Code: Select all
/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mkv -vf 'hwupload,fps=29.97,scale_vaapi=w=864:h=486:format=nv12' -c:v h264_vaapi -threads 0 -qp 20 -acodec copy output.mp4
I have the 965 driver installed, along with vainfo.
Code: Select all
apt-get install i965-va-driver vainfo
Son, someday all this will belong to your ex wife.