【问题标题】:How to programmatically output fragmented mp4 file using Bento4如何使用 Bento4 以编程方式输出分段的 mp4 文件
【发布时间】:2017-11-17 06:43:08
【问题描述】:

我想录制视频会议。我可以从视频会议服务器接收 rtp 媒体。我想为实时流输出分段的 mp4 文件格式。那么,如何使用 Bento4 以编程方式编写一个碎片化的 mp4 文件呢?

【问题讨论】:

    标签: mp4 mpeg-dash mpeg-4


    【解决方案1】:

    MP4Box 支持 DASH。我提供以下简单示例:

    MP4Box -dash 4000 -frag 4000 -rap -segment-name test_input.mp4

    '-dash 4000' to segment the input mp4 file into 4000ms chunks
    
    '-frag 4000' since frag = dash, actually segments are not fragmented further.
    
    '-rap' to enforce each segment to start random access points, i.e. at keyframes. In such case the segment duration may differ from 4000ms depending on distribution of key frames.
    
    '-segment-name' to specify the pattern of segments names. So in this case, the segments will be named like this: test_1.m4s, test_2.m4s, ...
    

    【讨论】:

      猜你喜欢
      • 2016-03-29
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 2011-06-15
      • 2010-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多