[FFmpeg-devel] [PATCH 1/2] Modified to generate PAT/PMT on every video keyframe. This is so that TS fragments produced by http://code.google.com/p/httpsegmenter/ would be compatible with JW Player.

Pavel Koshevoy pkoshevoy at gmail.com
Fri Feb 10 21:03:02 CET 2012

On 2/10/2012 12:29 PM, Reimar Döffinger wrote:
> On Fri, Feb 10, 2012 at 12:06:36PM -0700, pkoshevoy at gmail.com wrote:
> Please format the commit message so that after a short summary
> you have an empty line and then details.
> The short summary should be preferably be max. 60 characters to
> nicely fit into the email subject.

Yes, sorry about the long subject line.  This is the first time I am 
using git or submitting to ffmpeg-devel.  I am used to writing 
descriptive paragraphs for CVS/SVN commits.  I didn't know git 
format-patch and git send-email would do what they did.

>> @@ -788,10 +788,12 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
>>       int afc_len, stuffing_len;
>>       int64_t pcr = -1; /* avoid warning */
>>       int64_t delay = av_rescale(s->max_delay, 90000, AV_TIME_BASE);
>> +    int force_pat = key&&  (st->codec->codec_type == AVMEDIA_TYPE_VIDEO);
> The () are unnecessary.

Yes, () are unnecessary from compilers perspective, but they do enhance 
readability for humans (at least in this instance in my opinion).  Is 
this a rejection then?

> I don't know enough about TS to comment much, except that this
> is possibly a bit crazy for the intra-only use case.

Yes, this would add some overhead in intra-only case, but that would not 
break compatibility.  When intra-only is used does anyone really care 
about file size?  It's going to be bloated anyway.  However, if someone 
can suggest to me a way to detect intra-only stream I can change the 
patch.  I am still very new to ffmpeg code base, I don't know everything 
that is available.

One thing that I would like to know -- does AV_PKT_FLAG_KEY refer to I 
frames or IDR frames?  I am only interested in IDR frames...  
httpsegmenter starts a new TS fragment file when it sees 
AV_PKT_FLAG_KEY, it would be unfortunate if this was not an IDR frame.

Thank you,

More information about the ffmpeg-devel mailing list