- open the video file for reading
- open a video file for writing
- see if there are still frames available; if not, then end the process
- read a frame
- embed something in the frame
- write the modified frame
- loop back
- It is common for videos to be processed through a lossy compression algorithm. If that is a possibility for you, then you should not assume that the bits you add into any one frame can all be extracted again later. You cannot control which frames will become key frames and which ones will not
- Since you have multiple frames in a video, you do not need to embed everything on every frame. For example if you had 100 frames, you could embed the first 1/5th of the data on the first 20 frames, the second 1/5 on the next 20 frames, and so on. With multiple copies of the data being written, you have more opportunities for extracting the data.