I'm writing simple VLC Player on Tpanel in C++ builder program. It worked fine using the following code. And using "libvlc_media_add_option" worked for recording to file. But this file was video only, i.e. no sound stream. Is that a known bug in libvlc or did I do something wrong?
void __fastcall TForm1::Button1Click(TObject *Sender)
{
libvlc_instance_t* instance = libvlc_new(0, NULL);
libvlc_media_t* VlcMedia;
VlcMedia = libvlc_media_new_location(instance,"rtsp://yourid:[email protected]:554/nphMpeg4/g726-640x480");
media_player = libvlc_media_player_new_from_media(VlcMedia);
libvlc_media_add_option(VlcMedia,":sout=#duplicate{dst=display,dst=std{access=file,mux=mp4,dst=test.mp4}"); // no sound
libvlc_media_release(VlcMedia);
libvlc_media_player_set_hwnd(media_player,Panel2->Handle);
libvlc_media_player_play(media_player);
}
tried other libvlc_media_add_option but failed.