It is possible? which library allows me to make this? It's possible to manage a video stream as a vector of pointer to frames data structure? and then construct a new stream reordered?
Thanks
It is possible? which library allows me to make this? It's possible to manage a video stream as a vector of pointer to frames data structure? and then construct a new stream reordered?
Thanks
Have you looked at DirectShow? You would need to extract the video to it's individual frames, reorder them and then re-encode them.
You can't just swap frames of video in most formats, as they are compressed and the compression is reliant upon many elements (different for each type of compression) but in general it relies on the frames being stored in the order which they were recorded. Such that the compression can use this predictability to work out differences between each frame and sets of frames (sets of frames and their separation is normally referred to as key frames).
Key frames are identified and used to mark a set of frames in some way to allow the compression to focus on the major elements contained within that section. I.e. if one element of the movie was filmed in the dark, synergies can be obtained compressing those frames as a segment.
Once you uncompress a video, each frame is stored individually, like a set of screen shots that are added up to make the images on the screen appear as if they are moving but the cost of this level of detail is the amount of space required to store this information. Dependant on the compression algorithm used it can be many orders of magnitude in difference.