jnohlgard / python-v4l2capture

Python extension to capture video with video4linux2 (fork of https://launchpad.net/python-v4l2-capture)
133 stars 83 forks source link

I need an alternative to the MJPG format #14

Open nicolastrognot opened 8 years ago

nicolastrognot commented 8 years ago

Hello,

I implemented your code (from capture_video.py) into my own Python script, I tried a lot of thing to edit the format (from MJPG to something else like avi or mp4). How can we record into the avi format ?

What I tried to edit: Line 41: video.mjpg > video.avi Line 26: fourcc='MJPG' > I tried a lot of codecs which were compatible with AVI format but no one was able to work. (from this list: http://www.fourcc.org/codecs.php)

I never succeeded to display the result on VLC

Sorry for my english, I'm French,

Thank you

despdx commented 6 years ago

So, did you even get MJPG to play? I can't seem to decode it. I cannot even confirm the output file is MJPG.

BTW, the set_format doesn't accept any kwargs anymore, on the version I have, at least. So, I'm perhaps all of this is deprecated?