c++ - How to flush buffer data to disk when using FFmpeg to write a mp4 file? -
i using ffmpeg write mp4 file, grab bitmap images remote ip camera , encode h.264, media container mp4 file, no problem generate mp4 file if record several minutes, problem ffmpeg never flushs buffer data disk when call method "av_interleaved_write_frame"(all encoded data in memory, never free them), when call method "avio_close(oc->pb);", flush encoded data disk, tried call method "avcodec_flush_buffers" every time after calling "av_interleaved_write_frame", no effect. newbie ffmpeg, if familiar ffmpeg, please me.
thanks in advance.
sean
i got problem, caused never write audio frame, if want encode several bmps video file, please note:
1) don't add audio stream(add_stream). 2) don't open audio stream(open_audio).
hope helps others.
sean
Comments
Post a Comment