Hello, looking at the code of libavformat/mpegtsenc.c I experienced a 1-cycle delay with the mpegts muxer that could be avoided (at least for Opus codec) by putting the following lines: ( https://ffmpeg.org/doxygen/4.1/mpegtsenc_8c_source.html#l01777 )
memcpy(ts_st->payload + ts_st->payload_size, buf, size); ts_st->payload_size += size; ts_st->opus_queued_samples += opus_samples; ... just above this line ( https://ffmpeg.org/doxygen/4.1/mpegtsenc_8c_source.html#l01734 ): if (pkt->dts != AV_NOPTS_VALUE) { Otherwise, at the first muxing cycle, none of the blocks with mpegts_write_pes() function is executed. I did not write a patch for that because I don't know if it works with other codecs as well and I'm not sure if there could be other consequent issues, but given that Opus can be used with low-latency, it would be good to consider this. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".