[FFmpeg-user] Help needed to work around incorrect DTS when capturing H264 from a Logitech C920

Georgi Chorbadzhiyski gf at unixsol.org
Tue Dec 16 12:02:09 CET 2014


On 12/16/2014 12:55 PM, Peter Rabbitson wrote:
> On 12/16/2014 11:25 AM, Georgi Chorbadzhiyski wrote:
>> On 12/16/2014 11:07 AM, Peter Rabbitson wrote:
>>> On 12/15/2014 06:49 PM, Carl Eugen Hoyos wrote:
>>>> Peter Rabbitson <rabbit+list <at> rabbit.us> writes:
>>>>
>>>>> ffmpeg -r 30 -f v4l2 -s 1920x1080 -vcodec h264
>>>>
>>>> I believe -r 30 does not do what you think it does
>>>> and it may be the reason for the issues you see.
>>>> Is there a problem if you remove it?
>>>>
>>>>> -i /dev/v4l/by-id/*HD_Pro_Webcam_C920* \
>>>>>      -c:v copy -f matroska -
>>
>> I've used Logitech C920 and noticed that the camera drops it's frame rate
>> without signaling it. So what happened was that I was seeing stuttering
>> in high resolutions and only when I dropped the camera resolution to 640x480
>> I was able to get steady input fps.
>>
>> The lowering of frame rate occurred when the camera lens do not receive
>> enough light.
>>
>> You are may be seeing similar problem.
> 
> Ha! This may very well be my problem... Could you please look at the 
> video at http://vimeo.com/114550042 and tell me if this "feels" similar 
> to the stuttering you were witnessing? As first order of business I want 
> to find out if my particular camera is to blame, or there is something 
> happening with the cmera->driver pipeline.
> 
> I tried with more light and smaller frame-size - didn't notice any 
> difference.
> 
> I guess next step is the USB device redirected to a windows VM and 
> trying things with a windows version of ffmpeg. Bleh!

Exactly what I was seeing. I incorrectly called it stuttering but it is
more like a freeze frame from time to time.

Logitech driver under Linux (uvcvideo) have extra settings but they are
accessible only via gstreamer (neither ffmpeg, nor vlc supports them) when
using gstreamer there are were no frame freezes AFAIR.

http://kakaroto.homelinux.net/2012/09/uvc-h264-encoding-cameras-support-in-gstreamer/

-- 
Georgi Chorbadzhiyski | http://georgi.unixsol.org/ | http://github.com/gfto/


More information about the ffmpeg-user mailing list