2014-11-26 16:32 GMT+02:00 wm4 <[email protected]>:

> On Wed, 26 Nov 2014 16:24:35 +0200
> Anton Shekhovtsov <[email protected]> wrote:
>
> > Hi,
> > I have some inconsistencies with pcm audio stream in avi format.
> > The file is transcoded from valid h264, aac mp4 with simple ffmpeg
> command
> > line "-c:v h264 -c:a pcm_s16le". Also repeated same transcoding to mov
> > format.
> >
> > 1) AVStream.duration is not specified - fine in mov
>
> It doesn't need to be set. Whether it is depends on the format. You
> could probably fallback to the overall duration.
>
> > 2) AVStream.nb_frames is the number of samples (the same as expected
> > duration) - same in mov
> >
> > 3) AVIndexEntry.timestamp is in bytes not samples - fine in mov
> > I guess it is in bytes because if I take timestamp from last index entry,
> > add size and divide by 4 I get exactly the number of samples.
>
> This is private API. AVIndexEntry isn't explicitly marked private,
> but the only place where it's used (AVStream.index_entries) is marked
> as not being part of the public API.
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
>


1)
I understand it is optional but seems unnecessary complication to not set
it when it should be trivially available.

3)
Sorry, I was disappointed by generic av_index_search which takes timestamp
directly. Now I see where it is: avi_read_seek does multiply timestamp by
sample_size. I will rethink my code.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to