[FFmpeg-devel] [patch][GSoC]WTV muxer (2_wtvenc.patch, 3_add_wtv_muxer.patch)

zhentan feng spyfeng at gmail.com
Tue Aug 23 05:40:15 CEST 2011


Hi,

Thanks your reviewing.

On Sat, Aug 20, 2011 at 11:20 PM, Peter Ross <pross at xvid.org> wrote:

> Hi. Comments against 2_wtvenc.patch and 3_add_wtv_muxer.patch
>
> [...]
> > +// table 2
> > +static void write_table_entries_events(AVFormatContext *s)
> > +{
> > +    AVIOContext *pb = s->pb;
> > +    //WtvContext *wctx = s->priv_data;
> > +
> > +    //FIXME: output frame_nb, position pairs
> > +    //avio_wl64(pb, 0x2);   avio_wl64(pb, 0xc0);
> > +    avio_wl64(pb, 0x2);   avio_wl64(pb, 0x170);
>
> I thought this single-entry had to be present for WMC to playback the file
> _and_ that
> it had to point to the a chunk.
>
> 0x170 is the file-offset (aka position) within the timeline file. 0x170 was
> just
> hard-coded for testing. Should this be caclulated from write_headers()?
>
>

Here is the sample data from sample WTV files:
02 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00
32 00 00 00 00 00 00 00 50 ab 00 00 00 00 00 00
64 00 00 00 00 00 00 00 30 2a 07 00 00 00 00 00
96 00 00 00 00 00 00 00 e8 41 0b 00 00 00 00 00
c8 00 00 00 00 00 00 00 e8 bd 10 00 00 00 00 00
fa 00 00 00 00 00 00 00 68 75 16 00 00 00 00 00

I thought:
1) the first 8 bytes is the frame_nb
2) the last 8 bytes is the position of the frame_nb in the timeline file.
I implemented this, but the file can't work with WMC.

I checked it again and I think you were right before we discussed on MSN:

for the last 8 bytes of the each line, it is the position in timeline
file pointing to the sync_chunk.
I don't know the first 8 bytes' meaning.
However, it seems that the first syn_chunk is always 0x02.
So, I'll add only one entry here, and calculated the position for the first
sync_chunk.
The field is critical for WMC palyback.

I'll update the patch later.

Thanks.
zhentan


> [...]




-- 
Best wishes~


More information about the ffmpeg-devel mailing list