[Libav-user] how to send av packets to rtmp server when changing encoding setting

qw applemax82 at 163.com
Tue Nov 22 16:10:08 EET 2016


I have one question about sending rtmp stream.

If audio/video encoding settings are not changed, I can send only once one data message of '@setDataFrame', one audio message of 'AAC sequence header', and one video message of 'AVC sequence header'. But I want to change audio or video encoding setting in the middle, such as width, height, and sample rate. Then I need send the three important RTMP messages again, i.e. '@setDataFrame', 'AAC sequence header', 'AVC sequence header'. But I can't call twice avformat_write_header(). How to update my new A/V encoding setting in the same RTMP session?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161122/343bdfe2/attachment.html>

More information about the Libav-user mailing list