[Libav-user] Creating mp4 (h264 codec) video from OpenGL frames

Alex Druml alex3.dr at googlemail.com
Thu May 10 16:16:21 CEST 2012



hello!

i am currently trying to encode frames (RGB) rendered with opengl into a 
mp4 file encoded with h264.

i already managed to convert the frames from RGB to YUV (swscale) and i
use the video_encode_example example from
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/decoding_encoding.c;h=cb63294b142f007cf78436c5d81c08a49f3124be;hb=HEAD 


to encode the frames into a h264 file (vlc already plays the file). now
i want to write this encoded file into a common container like mp4.

i found a muxing example here
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/muxing.c;h=9d338dee670699d07b1f87505d78ee52a17cb920;hb=HEAD

but is it possible to write the encoded frames directly into a mp4 file?

best regards!


More information about the Libav-user mailing list