Le quintidi 25 brumaire, an CCXXI, hatred a écrit : > It provides AVFrame's with nb_samples = 1152, but when I open output codec > it have frame_size = 576 and when I encode audio frame I take error message: > more samples than frame size (avcodec_encode_audio2) > > I think that I must split one AVFrame into two or more and encode this > resulting frames. Is it valid way? Do I must do it manualy with > av_samples_copy?
Yes. This is clumsy but currently unavoidable. A simpler API was suggested at some point, but no one did anything for it. You could use a filter to do the work, but it would probably be overkill. > How I can recalculate PTS for resulting frames? A simple extrapolation based on the sample rate versus time base, using av_rescale_q. If the time base is the same as the sample rate, it is even easier. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
