UNCLASSIFIED

 
Thanks for the advice Luca. I need the output video to have
compatibility with other systems so I'm trying to avoid anything which
requires specific changes to norm with encoding and decoding.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Luca Barbato
Sent: Tuesday, 15 March 2011 12:51 PM
To: [email protected]
Subject: Re: [libav-user] Writing KLV Metadata to MPEG-TS
[SEC=UNCLASSIFIED]

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

IMPORTANT: This email remains the property of the Department of Defence
and is subject to the jurisdiction of section 70 of the Crimes Act 1914.
If you have received this email in error, you are requested to contact
the sender and delete the email.

_______________________________________________
libav-user mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-user

Reply via email to