Hi.
> Sorry for the noob question but where is this qscale parameter (what data > structure), or better what is it? > I'm not remember straight of my head which structure uses it (most probably AVCodec), but this is the value that controls what would be the end quality of the movie on VBR encoding. It works in reverse, meaning as lower the value, the more the quaity. So you might get it a better quality by setting the qscale to something like 3. > > About the solution for recording, here goes. > > I set the timebase to 1/1000 which is 1 millisecond, and then just specify > in which millisecond I want for certain frame (picture or AVPacket) to be > presented to the user. > That is I calculate time difference (milliseconds) in frames camera gives > me > and then add that much milliseconds to AVPacket's pts. > > In detail: > > I remember last AVPacket pts in variable (first is of course 0) > > int64_t last_pts = 0; > > and then at each next AVPacket->pts I add the time difference between > frames > to the last pts value > > pkt.pts= last_pts + frame_time_diff; > So, no matter what the frame rate from your source (IP camera) , even if it's only 7 fps for example, instead of setting 1/7 you set 1/1000, and the set the correct millisecond the moment you receive the frame? Does it work reliably? Regards. _______________________________________________ libav-user mailing list libav-user@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/libav-user