作者:爱她一生2502876055 | 来源:互联网 | 2023-09-25 10:22
Ihaveamedia.h264livestreamingserver,andwanttomux.h264framestofragmentedmp4files.I
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?
我有一个媒体.h264直播服务器,并希望mux .h264帧到碎片mp4文件。我想知道任何图书馆都可以支持吗?
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.
据我所知,ffmpeg.exe和Bento4可以支持这个,但是我想用一个库在我的代码中执行它,而不是执行另一个进程。
To specify my point, I want to generate fragmented mp4 files, which could be achieved by executing ffmpeg.exe like below,
要指定我的观点,我想生成碎片化的mp4文件,这可以通过执行ffmpeg.exe来实现,如下所示,
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.
我想在我的代码中复用mp4文件,而不是创建另一个进程来执行它。
Thanks.
2 个解决方案