how to choose the capture device in libvlc?[SOLVED]

This forum is about all development around libVLC.
freesunshine
Blank Cone
Blank Cone
Posts: 32
Joined: 18 Mar 2012 13:37

how to choose the capture device in libvlc?[SOLVED]

Postby freesunshine » 19 Mar 2012 02:22

now i can stream the cam to a file with code below
inst=libvlc_new(0,null);
m=libvlc_media_new_path(inst,"dshow://");
libvlc_media_add_option(m,":sout=#transcode{vcode=h264} :duplicate{dst={access=file,mux=ts,dst=c:\\file.ts}}");
mp=libvlc_media_player_new_from_media(m);
libvlc_media_player_play(mp);

but it always open the first cam.how can i choose the second device?i can do this with ":dshow-vdev="usb camera2"" in commandline but it does not work in libvlc
Last edited by freesunshine on 19 Mar 2012 18:09, edited 1 time in total.

freesunshine
Blank Cone
Blank Cone
Posts: 32
Joined: 18 Mar 2012 13:37

Re: how to choose the capture device in libvlc?

Postby freesunshine » 19 Mar 2012 17:51

Someone please help!

freesunshine
Blank Cone
Blank Cone
Posts: 32
Joined: 18 Mar 2012 13:37

Re: how to choose the capture device in libvlc?

Postby freesunshine » 19 Mar 2012 18:09

solved.
libvlc_media_add_option(m,":dshow-vdev=usb camera2");


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests