如何将音频数据添加到SinkWriter创建的视频文件中? [英] How to add audio data to a video file created by a SinkWriter ?

查看:73
本文介绍了如何将音频数据添加到SinkWriter创建的视频文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

 

我正在使用Microsoft Visual Studio 2010和Windows 7 Pro x64进行工作(C ++) 。我必须使用视频流复用音频流。为此,我正在使用Media Foundation,特别是SinkWriter,它似乎完成了这项任务......

I am using Microsoft Visual Studio 2010 with Windows 7 Pro x64 for my work (C++). I have to mux an audio stream with a video stream. For that, I am using Media Foundation, in particular the SinkWriter, which seems to do this task...

我使用Microsoft MSDN提供的教程来编码视频流:在SinkWriter的输入中,我给出了一个未压缩的RGB 32位图像的缓冲区,在输出中我收到一个编码为H264的视频流。在示例中,图片是相同的(静态)
并且表示纯绿色矩形。这不是最重要的,而不是我在这里。视频似乎很好,我可以用Windows Media Player阅读它(没有编解码器问题或其他)。我使用了.mp4容器。

I used a tutorial, provided by Microsoft MSDN, to encode a video stream : in input of the SinkWriter, I give a buffer of uncompressed RGB 32bits pictures and in output I receive a video stream encoded H264. In the exemple, pictures are the same (static) and represent a solid green rectangle. That is not the most important and not what I am here. The video seems to be good, I can read it with Windows Media Player (no codec problem or something else). I used a .mp4 container.

我的问题是在这个视频中添加一个音频流(例如AAC)。怎么做 ?我是否必须创建另一个仅处理音频的SinkWriter,并在将此音频流添加到视频后?或者,我应该直接添加到创建的SinkWriter
(视频)处理音频流吗?

My problem is to add an audio stream (AAC, for example) to this video. How to do that ? Do I have to creat another SinkWriter, which will only treat audio, and after add this audio stream with the video ? Or, should I add directly to the created SinkWriter (video) the treatment of an audio stream ?

 

请,我正在等待你的答案......

Please, I am waiting for your helpful answers...

非常感谢你!

 

Julien

推荐答案

有人对我的问题感兴趣吗?

Is somebody interested about my problem?

请你能帮助我吗?我真的需要你的帮助!

Please, can you help me? I really need your help!

 

祝你好运。

 

Julien


这篇关于如何将音频数据添加到SinkWriter创建的视频文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆