I am using the libvlc for a surveillance application. The init code and options I used is as follows (I am using Qt):
Code: Select all
const char * const vlcargs[] = {
"--plugin-path=C:\VideoLan\VLC",
"--sout-udp-caching=0",
"--udp-caching=0",
"--rtsp-caching=0",
"--sout-rtp-caching=0",
"--skip-frames",
"--sout-x264-fast-pskip",
"--sout-x264-fast-pskip"
};
m_pInstVlc = libvlc_new(sizeof(vlc_args)/ sizeof(vlc_args[0]),vlc_args);
Code: Select all
const char * const vlmargs[] = {
"--no-sout-rtp-sap",
"--no-sout-standard-sap",
"--ttl=1",
"--sout-keep"};
libvlc_vlm_add_broadcast(m_pInstVlc, "test", strInput, "#rtp{dst=192.168.55.100,port=5004,mux=ts}", sizeof(vlmargs)/ sizeof(vlmargs[0]), vlmargs, true, 0);
libvlc_vlm_play_media(m_pInstVlc, "test");
With sufficient bandwidth, the above does not have problem, I am able to watch the video using VLC open network stream from another computer.
However when the bandwidth is not enough (20~30% of that required), the vlm broadcast does not skip o drop automatically the frames that it could not transmit. On the other computer I saw that slowly the first seconds arrived, but then it froze and never updated anymore.
Have I used correctly the parameters as in "vlcargs", or is there some other way to let the VLM broadcast automatically drop the frames when it could not manage to transmit the frames ?
Many thanks again.