[Libav-user] Encoding AC3

Gonzalo Garramuno ggarra13 at gmail.com
Sat Aug 3 17:41:56 CEST 2013


On 03/08/13 00:14, Anshul maheshwari wrote:
>
> Mai
> On Aug 3, 2013 2:56 AM, "Gonzalo Garramuno" <ggarra13 at gmail.com 
> <mailto:ggarra13 at gmail.com>> wrote:
> >
> > I copied the latest docs/example muxing.c and decoding_enconding.c 
> and modified it to my needs.
> > I am able to save a movie with synced sound if I use audio codec 
> pcm_s16le and convert the float values into s16 values using 
> swresample.  However, when I want to save ac3 to keep the data in 
> float (fltp), the video gets created fine, but the audio comes out of 
> sync.  My guess is that I am not using proper pts/dts values.
> > _______________________________________________
> > Libav-user mailing list
> > Libav-user at ffmpeg.org <mailto:Libav-user at ffmpeg.org>
> > http://ffmpeg.org/mailman/listinfo/libav-user
>
> Hi gonzalo
>
> Are u passing, the pts ur self.
> Or they are auto generated?
>
> Thanks
> Anshul
>
>
Sorry.  They are autogenerated.  There's a generation of pts in the 
following code (taken from the examples):

      audio_time += audio_st->pts.val * av_q2d(audio_st->time_base);


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130803/10246bdc/attachment.html>


More information about the Libav-user mailing list