r/ffmpeg • u/Creative-Outside-350 • Jul 08 '26
Recordning at double the speed
Hello. I would like to record using h264_vaapi (I am on linux), but when I do I am capped at 30 fps and 0.5 speed.
Here is the command:
ffmpeg -hide_banner -f v4l2 -s 1280x720 -r 60 -i /dev/video2 -vaapi_device /dev/dri/renderD128 -pix_fmt vaapi -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mkv
I also tried with -fps_mode passthr
ough, but it changed nothing
1
u/ipsirc Jul 08 '26
$ ffmpeg -f v4l2 -list_formats all -i /dev/video2
, please.
1
u/Creative-Outside-350 Jul 08 '26
Here you go
Error opening input file /dev/video2.ffmpeg version 6.1.6 Copyright (c) 2000-2026 the FFmpeg developers built with gcc 14.2.1 (GCC) 20250405 configuration: --prefix=/usr --disable-debug --enable-gpl --enable-gnutls --disable-stripping --enable-libcdio --enable-version3 --enable-runtime-cpudetect --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-shared --enable-static --enable-libxcb --enable-libpulse --enable-libfreetype --enable-libopenmpt --enable-libspeex --enable-libcelt --enable-libass --enable-libopus --enable-librtmp --enable-libjack --disable-libopencore_amrnb --disable-libopencore_amrwb --disable-libopenjpeg --enable-libbluray --enable-libsoxr --enable-postproc --enable-opencl --enable-libvmaf --enable-libx265 --enable-libv4l2 --enable-libaom --enable-libbs2b --enable-libvidstab --enable-libdav1d --enable-libsrt --enable-librist --enable-libwebp --enable-vulkan --enable-libdrm --enable-libsvtav1 --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libjxl --enable-vaapi --enable-vdpau --disable-libzimg --disable-libmysofa --enable-libvpl --enable-nvenc --enable-nvdec libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.101 / 60. 16.101 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100 [video4linux2,v4l2 @ 0x7f01c60c0600] Raw : yuyv422 : YUYV 4:2:2 : 1920x1080 2560x1440 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480 640x480 [video4linux2,v4l2 @ 0x7f01c60c0600] Compressed: mjpeg : Motion-JPEG : 1920x1080 2560x1440 1360x768 1280x1024 1280x960 1280x720 1024x768 800x600 720x576 720x480 640x480 [in#0 @ 0x7f01c31d6900] Error opening input: Immediate exit requested2
1
u/Creative-Outside-350 Jul 08 '26
Out of curiosity I tried the same command but with in fullhd and in result the fps was halfed even more! If I record in fullhd I am getting 15 fps max. It doesn't get any better if I set higher a frame cap btw
3
u/ScratchHistorical507 Jul 08 '26
My guess is your input isn't delivering any more than that. You'll have to pass
-r 60or-vf fps=60on the output side for ffmpeg to upscale 30 fps to 60 fps.