I develop an Qt application that can capture video from webcam and stream it using RTSP. On the other side my app receive video stream.
But I noticed a stable delay about 3-4 seconds. Does anybody know how to reduce this lag?
Code for video capturing and streaming.
Code: Select all
m_vlcInstance = libvlc_new(0, NULL);
libvlc_vlm_add_broadcast(m_vlcInstance, "mybroadcast", "dshow://", "#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:5544/}", 0, NULL, TRUE, 0);
libvlc_vlm_play_media(m_vlcInstance, "mybroadcast");
Code: Select all
inst = libvlc_new (0, NULL);
m = libvlc_media_new_path (inst, "rtsp://127.0.0.1:5544/");
mp = libvlc_media_player_new_from_media (m);
libvlc_media_release (m);
libvlc_media_player_set_hwnd (mp, ui->widget->winId());
libvlc_media_player_play (mp);