ffmpeg encoding & decoding webcam stream into h264 file using Intel Quick Sync Video hw accelerated decoding

723 Views Asked by At

Using ubuntu 18.04 on NUC. I'm succeeding to use it from a file input. How can I get my webcam input to work with the HW accelerated.

Succeeded running the following: ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -vf hwdownload,format=nv12 -pix_fmt yuv420p output.yuv

1

There are 1 best solutions below

0
coder80 On

Did you try to use v4l2?

ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0

framerate and resolution can be taken by command:

ffmpeg -f v4l2 -list_formats all -i /dev/video0