How to record from webcam, with ffmpeg?
Hi Folks,

I need to record some videos, and it would be nice to be able to use the PBP for this. Unfortunately, I'm having some trouble getting ffmpeg to do an acceptable job of keeping recorded audio and video in sync. I wonder if anyone has any tips, or has had any luck recording decent videos?

Here's the command I've been using:

v4l2-ctl --set-fmt-video=width=640,height=480 -d /dev/video4 #this video format gets a decent framerate

#I'm not sure if its necessary to force key frames. It seemed to help some.
ffmpeg -f v4l2 -i /dev/video4 \
       -f alsa -i default \
       -c:v libx264 -preset ultrafast -force_key_frames 00:00:00.000\
       -c:a aac \

I'm running an up-to-date manjaro system.


Messages In This Thread
How to record from webcam, with ffmpeg? - by gleachkr - 08-28-2020, 09:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Webcam not working in Manjaro with Cheese, but works in Armbian petaramesh 1 1,264 09-30-2022, 10:09 AM
Last Post: crazyquark
  WORKING Moonlight with FFMpeg on 5.10.11 ShootTheMoon2 2 3,457 11-12-2021, 09:42 PM
Last Post: tblindba
  webcam framerate bottleneck on linux? gleachkr 0 1,911 10-04-2020, 12:55 PM
Last Post: gleachkr

Forum Jump:

Users browsing this thread: 1 Guest(s)