[Libav-user] avi pcm messed up

wm4 nfxjfg at googlemail.com
Wed Nov 26 15:32:46 CET 2014


On Wed, 26 Nov 2014 16:24:35 +0200
Anton Shekhovtsov <shekh.anton at gmail.com> 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.


More information about the Libav-user mailing list