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

Mohamed Moanis mohamed_moanis at outlook.com
Sun Dec 6 22:03:05 CET 2015


I prefer to turn it to C++, to avoid all the hassle.
Regards. 
From: 249165510 at qq.com
To: libav-user at ffmpeg.org
Date: Sun, 6 Dec 2015 10:05:10 +0800
Subject: [Libav-user] 回复:  How to Demux mp4 to video/audio stream and Remuxthem back to mp4 using API?

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.
Regards. 		 	   		  
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20151206/b0fad9ad/attachment.html>


More information about the Libav-user mailing list