I have a media .h264 live streaming server, and want to mux .h264 frames to fragmented mp4 files. I am wondering does any library could support this?
As far as I know, ffmpeg.exe and Bento4 could support this, but I want to use a library to do that in my code, not executing another process.
To specify my point, I want to generate fragmented mp4 files, which could be achieved by executing ffmpeg.exe like below,
ffmpeg -i xx.h264
-vcodec copy -an -f mp4 -reset_timestamps 0
-movflags empty_moov+default_base_moof+frag_keyframe -loglevel quiet
xxx.mp4"
I want to mux mp4 files in my code, not create another process to do it.
Thanks.
More detailed:
and then later:
where formatContext is pointer of AVFormatContext obtained when output file is opened using: avformat_alloc_output_context2 and avio_open functions.