[Libav-user] 回复: How to Demux mp4 to video/audio stream and Remuxthem back to mp4 using API?

wucg 249165510 at qq.com
Sun Dec 6 03:05:10 CET 2015

Thank you very much,  I have download the example but not notice that.
Another problem is : 
is it possible to build the file in Visual C++ 2010 ? It doesn't support c99,  code like :
(AVRational){1, enc_ctx->sample_rate} AVPacket packet = { .data = NULL, .size = 0 }; av_err2str(ret) is not support in VC2010. I found c99-c89 tools can do that, but don't know how to make VC2010 invoke the tool to preprocess the source file. Maybe it need MinGW(etc.) to do that,  but I'm just using the FFmpeg, not build it all from the source, don't wanna make it so complicated.

Best Regards.

------------------ 原始邮件 ------------------
发件人: "Mohamed Moanis";<mohamed_moanis at outlook.com>;
发送时间: 2015年12月6日(星期天) 凌晨3:32
收件人: "This list is about using libavcodec, libavformat, libavutil, libavdeviceand libavfilter."<libav-user at ffmpeg.org>; 

主题: Re: [Libav-user] How to Demux mp4 to video/audio stream and Remuxthem back to mp4 using API?

 >From: 249165510 at qq.com
>To: libav-user at ffmpeg.org
>Date: Thu, 3 Dec 2015 23:32:36 +0800
>Subject: [Libav-user] How to Demux mp4 to video/audio stream and Remux them	back to mp4 using API?
>Hi, I'm newbie to FFmpeg, could anyone tell how to demux a mp4 file to:
>video stream:  .h264
>audio stream: .aac
>then remux them back using C/C++ API, not the command tools.
>equivalent to command:
>ffmpeg -i media\input.mp4 -vn -f aac media\output.aac
>ffmpeg -i media\input.mp4 -an media\video_only.mp4
>ffmpeg -i media\video_only.mp4 -i media\audio_only.aac  media\restore.mp4
>Thanks a lot!

this example  from the ffmpeg site do exactly what you want with an additional filtering stage.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20151206/cea7f57f/attachment.html>

More information about the Libav-user mailing list