<p>On May 11, 2012 8:43 PM, "Alex Druml" <<a href="mailto:alex3.dr@googlemail.com">alex3.dr@googlemail.com</a>> wrote:<br>
><br>
> Thx for the fast reply! is there an example for muxing a h264 stream into a mp4 file using the C API ?<br>
><br>
> BR,<br>
> Alex</p>
<p>The best example is ffmpeg.c<br>
sincerely, <br>
Alex Cohn</p>
<p>> Am 10.05.2012 17:19, schrieb Alex Cohn:<br>
>><br>
>> On Thu, May 10, 2012 at 5:16 PM, Alex Druml<<a href="mailto:alex3.dr@googlemail.com">alex3.dr@googlemail.com</a>> wrote:<br>
>>><br>
>>><br>
>>> hello!<br>
>>><br>
>>> i am currently trying to encode frames (RGB) rendered with opengl into a mp4<br>
>>> file encoded with h264.<br>
>>><br>
>>> i already managed to convert the frames from RGB to YUV (swscale) and i<br>
>>> use the video_encode_example example from<br>
>>> <a href="http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/decoding_encoding.c;h=cb63294b142f007cf78436c5d81c08a49f3124be;hb=HEAD">http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/decoding_encoding.c;h=cb63294b142f007cf78436c5d81c08a49f3124be;hb=HEAD</a><br>
>>><br>
>>> to encode the frames into a h264 file (vlc already plays the file). now<br>
>>> i want to write this encoded file into a common container like mp4.<br>
>>><br>
>>> i found a muxing example here<br>
>>> <a href="http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/muxing.c;h=9d338dee670699d07b1f87505d78ee52a17cb920;hb=HEAD">http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/muxing.c;h=9d338dee670699d07b1f87505d78ee52a17cb920;hb=HEAD</a><br>
>>><br>
>>> but is it possible to write the encoded frames directly into a mp4 file?<br>
>>><br>
>>> best regards!<br>
>><br>
>><br>
>> No, you must conform to mp4 container logic. This is what the muxer is for.<br>
>><br>
>> BR,<br>
>> Alex Cohn<br>
>> _______________________________________________<br>
>> Libav-user mailing list<br>
>> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
>> <a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
><br>
> _______________________________________________<br>
> Libav-user mailing list<br>
> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
> <a href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</p>