[FFmpeg-devel] [PATCH] allow v4l2 to capture mjpeg streams

Luca Abeni lucabe72
Mon Dec 14 11:41:56 CET 2009


Hi Ramiro,

Ramiro Polla wrote:
[...]
>> I think the application will see the wrong bit_rate for the stream
>> (unless something else sets it to the correct value). In my opinion, the
>> line
>>        st->codec->bit_rate = s->frame_size * 1/av_q2d(st->codec->time_base) * 8;
>> should be conditional to s->frame_size > 0. Anyway, I can do it after
>> committing your patch.
> 
> Works fine on the device I have. Thanks.

I performed some other tests, and everything seems to work correctly, so I
committed the patch.

> By the way if the frame rate isn't specified ffmpeg reads data until
> it can guess the frame rate (I think?). This is not a good behaviour
> on capture devices since it seems to just hang, there's no feedback to
> the user...

I encountered this same problem some time ago, and I worked on it but
I did not manage to come up with an acceptable patch. I hope to find some
time to address this issue during Christmas vacations (I suspect all inputs
with variable frame rate should have similar problems, so I guess it can be
fixed).



				Luca



More information about the ffmpeg-devel mailing list