[FFmpeg-devel] compressed v4l2 images
Sat Dec 5 11:17:29 CET 2009
On Fri, Sep 11, 2009 at 6:27 AM, Luca Abeni <lucabe72 at email.it> wrote:
> Luca Abeni wrote:
>>> Sorry for the ridiculously late reply but I lost track of this thread
>>> about 2 years ago. Now someone contacted me and tested a few patches up to
>>> the point where we got it working again.
>> Ugh... Very old thread, indeed. I completely forgot it :)
>> But I now have (somewhere in one of my local trees) a patch that
>> should add support for compressed v4l2 (only JPEG, for now)....
>> I tested it with a "logitech something" webcam (providing MJPEG
>> compressed video), and I have some reports that it works with other
>> v4l2 compressed sources (but I have no details about them).
>> I'll search for such patch and post it (it might be just a forward port
>> of the patch you are posting), after re-testing (just to make sure that
>> some recent change did not break it).
> Sorry for the delay... I attach my patch (a little bit old, but it still
> applies). I think it's just a different version of the patch just re-posted
> by Ramiro.
> I just tested this patch with a logitech something webcam (which produces
> MJPEG video), and it works wonderfully with both ffmpeg and ffplay (I cannot
> use "-vcodec copy" in ffmpeg, because I get the "non-monotone timestamp"
> error, but I think this is an unrelated issue).
> More testing (and/or feedback) is welcome.
I found the old webcam and tested again, and your patch worked. I send
here an updated version with proper indentation and a few cosmetic
changes (a comma after io_compressed in io_method, removed empty lines
before return AVERROR(EIO);). A couple of differences from my patch
were that I had av_free(st) which IIRC really isn't necessary even if
the function fails, and I set st->codec->width/height.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2164 bytes
Desc: not available
More information about the ffmpeg-devel