On 03/15/2011 03:07 AM, Durrand, Paul (Contractor) wrote: > UNCLASSIFIED > > I am using FFMPEG/libavformat to try to write KLV metadata to the > private stream of an MPEG-TS file. I use av_write_frame() to write the > KLV at the appropriate frame on the video however I have to pad the > packet to force the packet to be written at the correct time. If I don't > do this, the then the packet is not big enough to meet the > DEFAULT_PES_PAYLOAD_SIZE limit to enable the packet to the flush and it > buffers until sufficient data is ready. > > My issue is that when I pad manually, the Adaptation field is not set > indicating that padding/stuffing follows. > > I have had a look at the mpegtsenc.c file and it indicates that the > packet is written immediately if the codec is CODEC_TYPE_SUBTITLE, > otherwise is waits until there is enough data. Is there a way to force > this write without waiting for the PES payload limit to be reached?
I started hacking better generic data support on a branch of my public tree, I'm glad to see others have similar issues so I'm not just doing it for fun. Probably the best way to handle that is to write that metadata using the DATA type even if then might be necessary to fix the decoder and encoder to arrange it the same way you need. Possibly this could be discussed on libav-devel since seems an interesting development field, not just normal usage of the library. lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero _______________________________________________ libav-user mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-user
