I have an char* array of binary data.
It is binary media-stream encoded with h.264.
It has next structure: …
stream_header is 64 bytes struct.
I’ve already done reinterpret_cast(charArray) where chararray represents first 64 bytes of stream. I’m successfully get all header data. In this header there is an nLength variable, which tell us how many bytes of media data is in next stream_data.
For example 1024 bytes.
I read next 1024 bytes in char* data array, and here my question begins: how I can get from this data set of video frames (in structure i have info about resolution of this frames), and save it in *.jpg files such as (1.jpg 2.jpg 3.jpg …..)
Maybe someone has already done something simmilar??? Help me plz..
You need an H264 decoder library, best option is ffmpeg
But even then it’s a bit complicated to use the library – although decoding is simpler since you have less options to worry about.
Do you really need to do this in a program? It’s very simple to use the ‘ffmpeg’ executable to save a video as jpegs