简体   繁体   English

如何从我从实时流媒体接收的H264原始数据创建Mp4文件

[英]How to create an Mp4 file from H264 raw data that I am receiving from a live streamer

How to create an Mp4 file from H264 raw data that I am receiving from a live streamer (no predefined duration or moov atom), unfortunately can't use FFMPEG, I have to write my own code using live555. 如何从我从实时流媒体接收的H264原始数据创建Mp4文件(没有预定义的持续时间或moov原子),不幸的是无法使用FFMPEG,我必须使用live555编写自己的代码。 Can somebody help me with Mp4 container and how h264 data has to be pushed into it.? 有人可以帮助我使用Mp4容器,以及如何将h264数据推入其中吗? Thank you in advance : ) 先感谢您 : )

There are several operations to be made to store H.264 raw data into MP4, among them: 有几种操作可以将H.264原始数据存储到MP4中,其中包括:

  • create box structures, in particular the moov box 创建盒子结构,特别是moov盒子
  • store the NAL units in a mdat box, possibly storing non-VCL NAL units in the moov box 将NAL单元存储在mdat框中,可能将非VCL NAL单元存储在moov框中
  • replace start codes with length fields 用长度字段替换起始代码

It also depends on your requirements. 这也取决于您的要求。 If you want to do the conversion on-the-fly, you have to use fragmented mp4. 如果要即时进行转换,则必须使用片段化的mp4。 If you can store the H264 and then do the conversion, you may use non-fragmented mp4. 如果您可以存储H264然后进行转换,则可以使用非片段化mp4。 In particular using MP4Box : 特别是使用MP4Box

MP4Box -add file.264 file.mp4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用管道而不是文件从原始 h264 创建 mp4 文件 - Create mp4 file from raw h264 using a pipe instead of files 如何在Android上从h264编码的帧创建mp4文件? - How to create mp4 file from h264 encoded frames on android? ffmpeg:如何将h264原始数据保存为mp4文件 - ffmpeg: how to save h264 raw data as mp4 file 如何使用gstreamer从mp4(h264 / aac)到mp4(h264 / mp3)进行转码和调整大小? - How to use gstreamer for transcoding and resizing from mp4(h264/aac) to mp4(h264/mp3)? 如何从 H.264 帧和音频帧的集合创建 mp4 文件? - How do I create an mp4 file from a collection of H.264 frames and audio frames? 使用avconv从.mov转换为.mp4(或h264) - Convert from .mov to .mp4 (or h264) using avconv 我如何通过 libavformat 将 H264 流混合到 MP4 文件中 - How can i mux H264 stream into MP4 file via libavformat 如何使用gstreamer从mp4 / mkv中提取h264和aac基本流 - How to extract h264 and aac elementary stream from an mp4 / mkv using gstreamer 如何在iOS中播放.h264文件(或)如何以编程方式将.h264文件转换为.mp4文件 - How to play a .h264 file in iOS (or) How to convert .h264 file in to .mp4 file programmatically 使用 Node JS 将 h264 文件转换或包装为 mp4 - Convert or wrap h264 file to mp4 with Node JS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM