Dear all:
    I want to sync four rtsp streams from ip camera says:
        rtsp://192.168.0.128/11
        rtsp://192.168.0.129/11
        rtsp://192.168.0.130/11
        rtsp://192.168.0.131/11
    And I'm trying to sync these streams to the system clock by adding the
stream start time, then I calculate the elapsed time with the current pts
like following:
        1. avformat_open_input();
        2. startTime = system_clock::now()
        3. while (run) :
        4.     av_read_frame()
        5.     avcodec_decode_video2(&frame, &packet);
        6.     playTime = startTime + packet.pts * av_q2d(stream.time_base);
        7.     add { frame : playTime } into queue
    But seems that the playTIme of every rtsp stream is not match, so
there's 300ms delay of every rtsp source sometime. Can anybody help about
this? Thanks very much.

Sincerely
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to