Logitech C310摄像头在Armbian系统下录制帧率异常问题求助
Hey there, let's get your Logitech C310 recording at full 720p/30fps on Armbian—your issue is actually pretty straightforward once you dig into the v4l2-ctl output you shared.
The Root Cause
Looking at your camera's streaming parameters from the provided config:
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 5.000 (5/1)
Read buffers : 0
Your camera is currently locked to a default framerate of 5fps—that's exactly why your recording is stuttering! Windows automatically negotiates the full 30fps specification, but Linux's V4L2 stack isn't doing that by default here.
Step-by-Step Fixes
1. Confirm your camera supports 720p/30fps first
Run this command to list all supported resolution/framerate combinations for your C310:
sudo v4l2-ctl --list-formats-ext --device=/dev/video0
You’ll see an entry for 1280x720 under the YUYV format with a framerate range that includes 30fps (the C310 absolutely supports this).
2. Force the correct framerate directly in ffmpeg
Your original command only specified resolution, but didn’t tell ffmpeg to request 30fps or match the camera’s active pixel format. Use this command instead:
sudo ffmpeg -f v4l2 -input_format yuyv422 -framerate 30 -s 1280x720 -i /dev/video0 output.wmv
-input_format yuyv422: Matches the camera’s active pixel format (from your config) to ensure proper parameter negotiation with the device.-framerate 30: Explicitly tells ffmpeg to pull 30fps from the camera instead of using the default 5fps.
3. Alternative: Pre-set the camera’s framerate manually
If the above command doesn’t work, you can lock the camera to 30fps first with v4l2-ctl, then record:
sudo v4l2-ctl --device=/dev/video0 --set-fps=30 sudo ffmpeg -f v4l2 -s 1280x720 -i /dev/video0 output.wmv
4. Bonus: Optimize for Armbian’s performance
If you still see lag, it might be CPU or USB bandwidth constraints:
- Check your USB port: Ensure your OrangePi is using a USB 2.0 or 3.0 port—the C310 needs USB 2.0 minimum to handle 720p/30fps.
- Use hardware encoding: OrangePi devices often have hardware H.264 support to reduce CPU load. Try recording to MP4 with hardware acceleration:
sudo ffmpeg -f v4l2 -input_format yuyv422 -framerate 30 -s 1280x720 -i /dev/video0 -c:v h264_omx -b:v 2M output.mp4
That should get you smooth, full-spec 720p/30fps recordings just like you get on Windows!
内容的提问来源于stack exchange,提问作者Nick Saw

