<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2014-11-26 16:32 GMT+02:00 wm4 <span dir="ltr"><<a href="mailto:nfxjfg@googlemail.com" target="_blank">nfxjfg@googlemail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Wed, 26 Nov 2014 16:24:35 +0200<br>
Anton Shekhovtsov <<a href="mailto:shekh.anton@gmail.com">shekh.anton@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
> I have some inconsistencies with pcm audio stream in avi format.<br>
> The file is transcoded from valid h264, aac mp4 with simple ffmpeg command<br>
> line "-c:v h264 -c:a pcm_s16le". Also repeated same transcoding to mov<br>
> format.<br>
><br>
> 1) AVStream.duration is not specified - fine in mov<br>
<br>
</span>It doesn't need to be set. Whether it is depends on the format. You<br>
could probably fallback to the overall duration.<br>
<span class=""><br>
> 2) AVStream.nb_frames is the number of samples (the same as expected<br>
> duration) - same in mov<br>
><br>
> 3) AVIndexEntry.timestamp is in bytes not samples - fine in mov<br>
> I guess it is in bytes because if I take timestamp from last index entry,<br>
> add size and divide by 4 I get exactly the number of samples.<br>
<br>
</span>This is private API. AVIndexEntry isn't explicitly marked private,<br>
but the only place where it's used (AVStream.index_entries) is marked<br>
as not being part of the public API.<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br><br>1)<br><div class="gmail_extra">I understand it is optional but seems unnecessary complication to not set it when it should be trivially available.<br><br>3)<br></div>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.<br><br></div></div>