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

Peter Rabbitson rabbit+list at rabbit.us
Tue Dec 16 10:59:11 CET 2014

On 12/16/2014 10:55 AM, Carl Eugen Hoyos wrote:
>> Which brings me back to the question about ffplay -
>> how does it manage to compensate for (apparently)
>> perfect timing as long as I feed it STDIN
>> in special chunks at special times?
> I don't understand this question.

See question 2) of 

> 2) (the more interesting question) I want to understand what exactly
> causes ffplay to process the apparently broken stream. I took the strace
> of the reader thread, and after some manipulation ended up with a "read
> schedule" as seen in [2.3]. Then I wrote a simple "delayed cat" program
> that reads out [1] as per the schedule - it can be found in [2.4]. The
> result is:
> Hang every ~2.5 secs: `cat stdin.mkv | ffplay -i -`
> Smooth no-hang video: `./scheduler | ffplay -i -`

The "scheduler" program is available in the same gist

More information about the ffmpeg-user mailing list