[FFmpeg-devel] compressed v4l2 images

Ramiro Polla ramiro
Sun Sep 6 02:48:12 CEST 2009


Hi,

Luca Abeni wrote:
> On Wed, 2007-02-07 at 23:18 -0200, Ramiro Polla wrote:
> [...]
>> Had to make some modifications for it to work.
>>
>> - Change int64_t_C to INT64_C
>> - Move setting pkt->pts to after av_new_packet
>> - Set st->codec->{width,height,time_base} after compressed_device_init works
>> - Make device_init return an error when the device changes the pixelformat
>>
>> I think that's it... (altough the code could use some cleanup =)
> Ok; I think I did that cleanup... ;-)
> 
> Can you please try if the attached patch still works for you? (sorry to
> ask you to test again, but I have no way to check if I simplified too
> much ;-)
> 
> If it works (as I hope), I'll committ it after testing that it does not
> break uncompressed grabbing (I have no computers with video capture
> cards right now, so I'll have to wait the end of next week... - So, you
> can take your time for your testing)

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.

I no longer have the webcam to test, but I tried it earlier this year 
and always got stuck in an error where capturing stops at the 15th 
frame. Apparently it's because it should use V4L2_PIX_FMT_JPEG instead 
of V4L2_PIX_FMT_MJPEG. But I also remember I got it working 2 years ago 
with V4L2_PIX_FMT_MJPEG, so I don't know if something changed in the 
kernel or it's a regression there or these cameras just plain suck... 
Does anyone else have a camera to test this?

Here's an updated patch. I can't test it myself but I can relay the 
patch to the tester.

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4l2_compressed.diff
Type: text/x-patch
Size: 2299 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090905/d8390680/attachment.bin>



More information about the ffmpeg-devel mailing list