<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>>From: 249165510@qq.com<br>>To: libav-user@ffmpeg.org<br>>Date: Thu, 3 Dec 2015 23:32:36 +0800<br>>Subject: [Libav-user] How to Demux mp4 to video/audio stream and Remux them      back to mp4 using API?<br>><br>>Hi, I'm newbie to FFmpeg, could anyone tell how to demux a mp4 file to:<br>>video stream:  .h264<br>>audio stream: .aac<br>>then remux them back using C/C++ API, not the command tools.<br>><br>>equivalent to command:<br>>ffmpeg -i media\input.mp4 -vn -f aac media\output.aac<br>>ffmpeg -i media\input.mp4 -an media\video_only.mp4<br>>ffmpeg -i media\video_only.mp4 -i media\audio_only.aac  media\restore.mp4<br>><br>>Thanks a lot!</div><div><br></div><div><br></div><div>this <a href="https://ffmpeg.org/doxygen/2.8/transcoding_8c-example.html">example </a> from the ffmpeg site do exactly what you want with an additional filtering stage.</div><div><br></div><div>Regards.</div>                                         </div></body>
</html>