this problem is so weird, i am here to get some help.
vlc streaming is always works, but source code using libvlc still didn't worked.
i don't know the reason?
source rtsp stream url:
rtsp://xxx.xxx.xxx.xxx:554/test.sdp
in vlc player, i have had to set rtsp stream using wizard gui to re-stream, like this:
Code: Select all
:sout=#transcode{vcodec=h264,scale=0.5,acodec=none}:rtp{sdp=rtsp://:8554/test.sdp} :sout-keep
Code: Select all
...
const char *sout = "#transcode{vcodec=h264,scale=0.5,acodec=none}:rtp{sdp=rtsp://:8554/test.sdp}";
const char *params[] = {
":sout-keep"
};
libvlc_instance_t * vlc = libvlc_new(0, NULL);
libvlc_vlm_add_broadcast(vlc, media_name, "rtsp://xxx.xxx.xxx.xxx:554/test.sdp", sout, 1, params, true, false);
libvlc_vlm_play_media(vlc, media_name);
...