Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do we find the frame boundaries when we call transcode()?

boundaries frame transcode
0
Posted

How do we find the frame boundaries when we call transcode()?

0

You don’t have to. The camera’s proprietary data format transcoder data stream is self-synchronizing. That is, the data format is set up so that an arbitrary block of data can be recorded from the camera, sent to the transcode() function, and if it is possible to get a JPEG out of that data stream, the transcode() function will do that. (Or, of course, it will crash trying.) This actually isn’t so far fetched as you might think. One way to build such a data stream is to have a sequence of 8 bytes that marks the beginning of each new stream segment (what MPEG calls a “key frame.”) After the key frame is sent, the camera sends a series of smaller chunk, each one indicating a set of differences from the last frame. Then, at some later point in time, another key frame is sent. The camera guarantees that the 8-byte sequence only appears in the data stream at the beginning of key frames. (There are several ways that the camera can guarentee this, including escaping data that would contain th

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123