I use this code:
libvlc_media_add_option(m,"--sout #transcode{vcodec=h264,vb=500,scale=1,acodec=mp4a,ab=32,channels=2,samplerate=22050}:duplicate{dst=std{access=file,mux=mp4,dst=D:\\test4.mp4}}",&ex);
But it can not work.How to record webcam video into file?