Hi all,
First time coming here.
when I use libVlc library to develop my application on whidows 7, I wanna finish the fuction as following:
1.play a rtsp on the screen
2.at the same time, saving the video contents from RTSP into a local file such as "D:\1.mp4"
so, I did the following programing:(*not very suitable in programming grammar description,just focus on the meaning)
1.Media = libvlc_media_new_location(RTST_URL); // creating media
2.libvlc_media_add_option(Media, optionString); //use duplicate option for streaming to local file when playing
optionString ==> :sout=#duplicate{dst=display,dst="std{access=file,mux=mp4,dst='D:\\1.mp4'}"} :sout-all :sout-keep
3.MediaPlayer = libvlc_media_player_new(VlcInstance); // creating media player
4.libvlc_media_player_set_media(MediaPlayer,Media ); //set media to player
5.libvlc_media_player_play(MediaPlayer); //play the media
As program running result, it works well(video is playing on screen, sound of video playback on speaker normally,video recoding is ok , and record file (1.mp4) is OK too!).
however, I cannot control sound of playing video on screen (such as set mute, change volume ,etc) by libvlc API: libvlc_audio_set_volume(MediaPlayer) and libvlc_audio_set_mute(MediaPlayer).
Is this a bug of libvlc? Otherwise how can I do to control the sound in this case?
waiting for answers!
B.T.W: Without using streaming when playing (donot setting the duplicate option), the APIs works very well!(video playing is ok, audio control is OK too)