Hi Stephane,

Stephane List wrote:
> I'm writing a small application that receive RTP packets containing
> video and write everything in a mp4 file. I'm using
> av_write_header, av_write_trailer, and av_write_frame.
> 
> Everything works fine except the speed of the movie when I play it with
> mplayer for example.
> 
> Frame rate is not constant, and I've got a 90000 parameter for the video.

Which kind of compressed video is in the RTP payload? I've never seen 
variable frame rate video in RTP...


> How to convert the timestamp received in RTP packets into a timestamp to
>  fill in the struct AVPacket ?

This depends on how you are receiving the RTP packets. If you are using 
libavformat, then timestamps are in "time_base units" (like the 
timestamps for all the other input formats). If you are using some other 
library, then you have to read the documentation for such library.

Once you know the time units for your input timestamps, you can convert 
them in the correct time units for the output by using av_rescale_q() or 
similar.


                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to