简体   繁体   English

将压缩的帧写入mpeg4块C ++

[英]Write compressed frames to mpeg4 chuncks c++

I'm looking to write already compressed (h264) image data into an MPEG-4 video file. 我希望将已压缩(h264)的图像数据写入MPEG-4视频文件。 Since this code needs to be optimized to run on an embedded platform the code should be as simple as possible. 由于需要优化此代码才能在嵌入式平台上运行,因此代码应尽可能简单。 Best would be to just give some header information (like height width format fourcc etc.) and a filename and the compressed data and have that transformed into a data chunck and writen to that file. 最好是仅提供一些头信息(例如,高宽格式fourcc等),文件名和压缩数据,然后将其转换为数据块并写入该文件。

So what i need either of these: 所以我需要这些之一:

  • MPEG-4 header information (what goes where exactly) MPEG-4标头信息(确切的位置)
    • Is there a main header or are there just headers for each data chunck 是否有一个主标题或每个数据块的标题
    • What header information is needed for a single video stream (rectangular) 单个视频流(矩形)需要什么标题信息
    • What header information is needed for adding audio 添加音频需要什么标题信息
  • A simple MPEG-4 file writer that does not have to do the compression itself and also allows to add audio frames. 一个简单的MPEG-4文件编写器,不必自己进行压缩,还可以添加音频帧。 (c/c++) (C / C ++)

.MP4 file format is described in MPEG-4 Part 14 specification. .MP4文件格式在MPEG-4 Part 14规范中描述。 It is not just main header and subheaders, it has certain hierarchy and so called boxes in there. 它不仅是主标题和子标题,它还具有一定的层次结构,并且在其中称为“框”。 Some of your choice to write data into .MP4 file: 您可以选择将数据写入.MP4文件:

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM