Hi Luca, On Monday 29 June 2009 23:18:05 Luca Lesinigo wrote: > Hello there. > > I spent some time googling around and looking at the list archives, > but I cannot find a (non-X11) software that would let me do a 'simple' > video recording without any fancy stuff or reencoding. > > I'm using a logitech S7500 for my tests, it's an UVC cam with support > for MJPEG. I could use mencoder to record the 'raw' mjpeg stream > without any re-encoding but that also means without audio: it > segfaults if I try to record audio too (either from the cam usb audio > source or from the alsa soundcard in the pc). > > I can still record audio in another process and mix everything > afterwards, no big problem. The _real_ problem is that video is never > recorded at constant speed. It probably depends on the camera varying > the framerate (autoexposure or stuff like that, probably) and/or usb > or the hci loosing some data here and there. But this is also not a > problem (loosing frames) as long as I get a playable video. Too bad > this is not the case: the actual speed will vary and some parts will > be faster than others. > > I'm not an expert but I suspect this is due to the "timestamps not > implemented" that I read on UVC homepage.
Implementing timestamps support shouldn't be extremely difficult, do you want to give it a try ? Many users will be thankful :-) To be honest, I'm not sure if this would be enough to avoid all audio/video sync issues. Both the audio and the video devices can suffer from data loss. Video frames can be corrupted or completely lost, and audio samples can be missed as well. To resynchronize the two streams in such a case, you need 1. to timestamp each video and audio sample (or groups of samples), and 2. to use the timestamps during plyaback The uvcvideo driver currently uses the system time to timestamp video frames. This is not a perfect solution but is probably accurate enough for most applications. Implementing timestamps support would provide a better accuracy in the timestamp value. The usbaudio driver doesn't, as far as I know, timestamp audio data. If samples are lost, I don't think the driver will notice. You should ask the usbaudio developer(s) for confirmation. As mentioned already in an answer to your mail, you will need to use a container that supports timestamps, otherwise the player will not be able to resynchronize audio and video. > I'm working on a more-or-less embedded platform (the prototype > actually is a notebook without any human operator and also without > X11) and I'm looking for a software (or a combination of) that would > let me: > - set the cam to turn off fancy stuff and run as constant fps as it > can - don't need ultrafast, 640x...@25fps would be enough > - record the video with the lowest possible cpu usage - I think a > direct MJPEG recording from the cam to file should be the best option > - playback / reencode the video afterwards and get a 'constant wall > clock speed' video (no problems if it looses frames as long as this is > accounted for) > - audio recording in the same file would be a bonus but not needed, > alsarec is already doing its job > > I don't really need anything else, the system will start recording > right after boot and keep on until power off. Right now I'm using the > latest stable kernels from kernel.org, but applying any patch and > recompiling is not a problem. If possible, I plan to stick to UVC > cameras with MJPEG support, probably logitech ones. > Any help would be really appreciated, thanks. Best regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
