In Python, how do I convert an h264 byte string to images OpenCV can read, only keeping the latest image?
Long version:
Hi everyone.
Working in Pytho
Use any of these:
ffmpeg -i - -pix_fmt bgr24 -f rawvideo -
ffmpeg -i pipe: -pix_fmt bgr24 -f rawvideo pipe:
ffmpeg -i pipe:0 -pix_fmt bgr24 -f rawvideo pipe:1
You didn't provide much info about your input so you may need to add additional input options.
You didn't specify your desired output format so I just chose rawvideo. You can see a list of supported output formats (muxers) with ffmpeg -muxers (or ffmpeg -formats if your ffmpeg is outdated). Not all are suitable for piping, such as MP4.
See FFmpeg Protocols: pipe.