r/ffmpeg • u/News8000 • Nov 17 '25
Bitrate change and scaling transcoding, using Intel iGPU not CPU?
I have 4K 30fps DJI drone videos that come in at 120Mbps bitrate, which makes huge files.
They're 3840 × 2160 H.264 (High Profile) 122566 kbps mp4.
I'm needing more like 2560x1440 at 10-40Mbps max, not 120Mbps. I have to set jellyfin player transcoding down to under 20Mbps bitrate for it to play on most of my not so new machines.
I can set bitrate and scale with ffmpeg using CPU only, using the following:
ffmpeg -i input.mp4 -vf "scale=2560x1440" -b:v 40M output.mp4
The resulting output.mp4 plays nice and looks nice. On anything.
BUT CPU TRANSCODING SO SLOW, cpu fan working hard. i5-10500T machine.
I want to transcode via the iGPU not CPU. I got the following to work and it codes at like 5x the rate the CPU does:
ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device foo -i input.mp4 -filter_hw_device foo -vf 'format=nv12|vaapi,hwupload' -c:v h264_vaapi output.mp4
BUT the output has same issue, huge size, bitrate, and still 4K.
How can ffmpeg combine scaling down, and setting a lower bitrate, with the iGPU instead?
I've spent countless hours looking up and trying possible solutions and running out of steam after the latest push. I just want to have a cli tool to quickly bulk copy/transpose the DJI 3.8GB chunks into a more manageable size.
TIA all!
EDIT adding info:
Ubuntu 24.04.3 LTS, i5-10500T
ffmpeg version 7.1.1 via GIT repo
View all comments
Show parent comment
1
u/News8000 Nov 18 '25
Ran:
ffmpeg -encoders | grep -E "(qsv|vaapi|nvenc|amf|videotoolbox)"
Gets (after banner):
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.101 / 61. 19.101
libavformat 61. 7.100 / 61. 7.100
libavdevice 61. 3.100 / 61. 3.100
libavfilter 10. 4.100 / 10. 4.100
libswscale 8. 3.100 / 8. 3.100
libswresample 5. 3.100 / 5. 3.100
libpostproc 58. 3.100 / 58. 3.100
V..... av1_qsv AV1 (Intel Quick Sync Video acceleration) (codec av1)
V....D av1_vaapi AV1 (VAAPI) (codec av1)
V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
V....D h264_vaapi H.264/AVC (VAAPI) (codec h264)
V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc)
V....D hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)
V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)
V....D mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)
V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)
V....D mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)
V....D vp8_vaapi VP8 (VAAPI) (codec vp8)
V....D vp9_vaapi VP9 (VAAPI) (codec vp9)
V..... vp9_qsv VP9 video (Intel Quick Sync Video acceleration) (codec vp9)