Compile ffmpegin windows. Generally, mingww.msys. compile the windowsexecutable file ffmpeg.exe.
When I read the FFMPEG source code, I found that FFMPEG supports pipe. In other words, the input file parameters and output file parameters transmitted to the ffmpeg.exe process do not need to be the hard disk file path. The entire process can be completed directly in the memory.
Test method:
1. Use VC to call createnamedpipe to create a named pipe. Note that the opened space must contain at least one frame of data.
2. Call connectnamedpipe to connect to the named pipe.ProgramWill be suspended until a process connects to the named pipe.
3. Open the command line, go to the FFMPEG directory, and enter the command line:FFmpeg-F rawvideo-pix_fmt rgb24-s 320x240-I-f Avi-s 320x240 C: \ out. Avi
4. When the VC process is awakened, The FFMPEG process suspends and waits for the image data to be written. The VC process calls writefile to write image data to the named pipe. (Note that the written data format must be the same as the parameters passed in by the command line)
5. When the named pipe is written to data, FFmpeg automatically wakes up for encoding. After encoding, it continues to wait for the next frame of data.