Before creating the post I was looking but I can't find a solution to my problem.
I am trying to broadcast my microphone's default output live.
If you paste in the cmd replacing the ip, it will start transmitting sound from your microphone.
"C:\Program Files\VideoLAN\VLC\vlc.exe" --qt-start-minimized dshow:// :dshow-vdev=none :dshow-adev= :sout=#transcode{vcodec=none,acodec=mp3,ab=128}:standard{access=http,mux=mp3,dst=192.168.1.253:8080}
So I decided to move that command from cmd to c ++
std::cout<<"BEGIN BROADCAST"<<std::endl;
libvlc_instance_t *vlc;
const char *url = "dshow://";
const char *sout = "#transcode{vcodec=none,acodec=mp3,ab=128}:http{mux=mp3,dst=192.168.1.253:8080}";
const char *media_name = "Radio";
vlc = libvlc_new(0, NULL);
std::cout<< libvlc_vlm_add_broadcast(vlc, media_name, url, sout, 0, NULL, true, false);
std::cout<<"END BROADCAST"<<std::endl;
According to the official documentation, it returns an int if the transmission was successful -> int libvlc_vlm_add_broadcast
https://videolan.videolan.me/vlc-3.0/group__libvlc__vlm.html#gaa8d58569f07229edabe9fdaab41b1c3d
It returns 0 to me.
But when I open another VLC to access: http://192.168.1.253:8080 it won't connect ...
Is there someone who can help me? I really appreciate it, greetings.
One of the posts that comes closest is this: Use libvlc to stream mp3 to network