Hi Rob,  

I use OBS for my online lectures and have never experienced audio-video desynchronization. For this, I’ve been using VAAPI-accelerated encoding.  

Best regards,  
Andrey


ср, 31 дек. 2025 г., 06:52 Rob Prowel via Cin <cin@lists.cinelerra-gg.org>:
It's not cinelerra per se, but does anyone have reliable recipes for
saving USB webcam audio and video synced (and at a reasonable framerate
 >=24fps)?

I swear that ffmpeg will drive even the most easy going man totally
insane!

Anyway, post rant...

I have an HD logitech webcam (Webcam C310) and I'm trying to save
workstation sessions so I can create online tutorials.  To do this I
need to save content in a low-loss format.  I chose mjpeg with quality
value 2 and pcm_s16le audio at 44.1khz.  I'm trying to do 1280x720 proof
format and scale down after editing.  That format IS SUPPORTED at 25 and
30fps by my webcam.

The booger is that the exact same ffmpeg recording command will about
50% of the time create a compressed audio stream of up to five minutes,
while the video is going on well longer (tested up to 20 minute clip)

Sometimes the audio is correct and sometimes just chipmunks squeeking.

Here is the command

#! /bin/bash

out=${1-~/record.mov}

ffmpeg \
     -y \
     -f pulse  \
     -i default  \
     -f v4l2  \
     -input_format mjpeg -video_size 1280x720 -framerate 25  \
     -i /dev/video0 -c:v mjpeg -q:v 2 -ac 2 -c:a pcm_s16le -ar 44100 \
     ${out}


When it works the audio is only one or two frames off, but it fails more
often than it is correct.

Another weird symptom is that I see regular periodic clusters of a video
frame repeating itself 14 times, which obviously shows up when viewing.

anybody have alternate recipes for 720p A/V capture from a USB2 webcam
that supports MJPEG?

I am considering running audio save to a separate file (arecord for
audio and ffmpeg for video) and muxxing them in cinelerra later on, but
obviously would prefer it work out of the box.


_______________________________________________
Cin mailing list -- cin@lists.cinelerra-gg.org
To unsubscribe send an email to cin-leave@lists.cinelerra-gg.org