[Libav-user] Recording and streaming at the same time

Steve Green steve.green at flosports.tv
Mon Feb 27 22:10:08 EET 2017


I’ve seen examples for the ffmpeg executable that can do this but I’m unsure how to go about setting this up with libav.  Specifically, I only want to pay the h264 and aac encoding price once.

I probably need 2 AVFormatContexts, but then do I need 2 streams (muxed audio/video) per?

avcodec_encode_video2() needs the AVCodecContext from the video stream, but which one?

Does the “copy” codec that I’ve seen used with ffmpeg make sense to use here, and how?

Any high level pointers would be appreciated.  Sample code even better :)

Thanks..



More information about the Libav-user mailing list