GNOME Bugzilla – Bug 642595
[camerabin2] audio recording support (sync audio and video)
Last modified: 2012-04-27 22:52:18 UTC
It's been some days since I've started adding audio recording support for camerabin2, and after some discussions and tries I decided to file a bug to gather ideas on how to solve this. Camerabin2 has a videosrc that is running from the start and feeding the viewfindersink. When the user decides to start a video capture, the audiosrc is set to playing and starts pushing buffers into encodebin, as does the videosrc. The problem is that the timestamps of the audiosrc starts at a non-zero value and encodebin plugs an audiorate element that fills the gap from 0 to the first timestamp with empty gap buffers and the muxer uses those. If audiorate wouldn't do this, both video and audio would have the same timestamps getting to the muxer (in terms of running_time, at least) and we'd all be happy I think, but this gap filling is nice for other situations. So the problem is how to make the muxer drop/ignore this initial GAP data or how to deal with this situation in general? Remember that some muxers (qt) can support segments. Do we need some kind of 'stream/segment synchronization element'? Should audiorate have a skip-to-first property just like videorate and how to set it from outside of encodebin? Making the muxers drop buffers is dangerous because it is dropping encoded data. So I ran out of more ideas for today, any help is appreciated here. Btw, thanks to Win and Jan who already helped me a lot on understanding this issue :)
You may want to look at the "skip-to-first" property that I added to videorate, I think you may want a similar solution here.
This is working for some time already. Marking as obsolete.