jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Sample code for real-time libav usage from raspivid?

Mon Apr 04, 2016 6:42 pm

I'd like to take the H.264 codec stream from the hardware encoder, and write it directly to MP4 (rather than raw H.264).
Presumably I need to use the libavformat library, and functions like avformat_write_header() and such.
To get that going, I need to descend a tree of codec and muxer configuration options in the libav library family, to set everything up "just so" before starting to write.

I could do all this from scratch by reading documentation and header files.
Or I could ask the internet if there's some source code/project that is kind-of sort-of close to what I want to do already, to get a jump start on that.
So I ask the internet! :-)

What's a good example for how to go from a MMAL H.264 encoded buffer stream to a MP4 container file, as it's being recorded rather than as a post-process?

Return to “Camera board”