Thanks a lot for your detailed explanations, the things got more clear now. First of all, lowering time_base solved the memory consumtion issue: http://permalink.gmane.org/gmane.comp.video.ffmpeg.libav.user/4636
> If you know that your video has a constant framerate of 10 then you > should set time_base to 1/10 when opening the muxer and then use > av_rescale_q(pts, time_base_1kHz, st->time_base). Just to clarify: time_base_1kHz is AVRational having num=1, den=1000 - right? > That rescales your 1 kHz PTS:es to whichever time base the muxer chose for > that stream (it > might not always end up being what you requested). Also, make sure your > PTS:es are actually in the 1 kHz time base by checking that the values are > 100 ms apart. That's exactly the problem - the stream is not stready enough, i.e. sometimes the above rescaling of 2 sequental frames pts's gives the same resulting pts -- and the frame is dropped by the muxer. My tests show that there're up to 300 dropped frames in a 5-minut segment of 10fps stream. By the way, if I get video and audio (lets assume they are more or less synchronized, and the audio comes in 250ms chunks), what would be the algorithm for time_base and pts calculation for the audio? Can I set its time_base to be equal to that of the video, and rescale millisecond timestamps of the chunks just like I do with the video ones? Thanks! _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
