Page 1 of 1
Playing and recording video from web-cam
Posted: 13 Oct 2007 04:27
by SyRenity
Hi.
I'm trying to simultaneously view and record video from the web-cam. The following command line parameters work great:
vlc.exe dshow:// :dshow-vdev="" :dshow-adev="none" :dshow-size="" :sout=#transcode{vcodec=DIV3,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=file,mux=ogg,dst="C:\test.ogg"}}
Problem is, that I don't know how to translate them to ActiveX correctly. I tried various options, and only reached this one so far:
(VB6)
vlcLive.addTarget "dshow:// :dshow-vdev=""""", Array(":dshow-adev=""none"" :dshow-size="""" :sout=#transcode{vcodec=DIV3,vb=1024,scale=1} :duplicate{dst=display,dst=std{access=file,mux=ogg,dst=""C:\test.ogg""}}"), VLCPlayListReplaceAndGo, -666
This one displays the ActiveX with web-cam video, but doesn't produce any recordings.
Am I doing something incorrect?
Thanks in advance.
Re: Playing and recording video from web-cam
Posted: 14 Oct 2007 23:08
by SyRenity
Hi.
Has anyone tried something similar to the above? Perhaps someone can provide reliable instructions how to show video AND record it in the same time?
Thanks in advance.
Re: Playing and recording video from web-cam
Posted: 15 Oct 2007 22:30
by MuNk
viewtopic.php?f=16&t=41319#p128898
read this reply, you seam to be formatting your MRL string wrongly..
and :duplicate{dst=display,dst=std{access=file,mux=ogg,dst=""C:\test.ogg""}}
dst=display is for display to monitor
dst=std{access=file,mux=ogg,dst=""C:\test.ogg""} is run as a secound display and record it to this file.
Re: Playing and recording video from web-cam
Posted: 21 Oct 2007 20:51
by SyRenity
Hi MuNk.
I already placing the options string in the MLR position, you can see in the example above:
vlcLive.addTarget "dshow:// :dshow-vdev=""""", Array(":dshow-adev=""none"" :dshow-size="""" :sout=#transcode{vcodec=DIV3,vb=1024,scale=1} :duplicate{dst=display,dst=std{access=file,mux=ogg,dst=""C:\test.ogg""}}"), VLCPlayListReplaceAndGo, -666
where
* URL is "dshow:// :dshow-vdev=""
* MRL is Array(":dshow-adev="none" :dshow-size="" :sout=#transcode{vcodec=DIV3,vb=1024,scale=1} :duplicate{dst=display,dst=std{access=file,mux=ogg,dst="C:\test.ogg"}}")
* Mode is VLCPlayListReplaceAndGo
* position is number.
Any idea why it doesn't work?
Regards.
Re: Playing and recording video from web-cam
Posted: 22 Oct 2007 00:47
by MuNk
the MRL should be one string, and not a array from what i know, in C== , C# , Delphi the mrl is a string and not a array so i assume this rule applys to vbscrip, javascript and even VisualBasic (all versions), try that might work>?
Re: Playing and recording video from web-cam
Posted: 22 Oct 2007 01:44
by SyRenity
Without array, it doesn't work at all, there is no video from the local camera.
I also remember that I read on these forums, and you have to specify the options in an Array.
Any idea?
Re: Playing and recording video from web-cam
Posted: 22 Oct 2007 15:51
by Mathelem
i sort of have the same problem, although i am trying to stream out from the web cam and not write to a file. I can safely say I tried all possible formats from strings to arrays for sout. I think there is a problem with the sout option and addTarget.
You can also try another way to do this by:
var vlc = document.getElementById("vlc");
var options = [":sout=#transcode{vcodec=H263,vb=1024,scale=1}", ":duplicate{dst=std{access=udp,mux=ts,dst=47.135.122.226:30002}}"];
vlc.playlist.clear();
vlc.playlist.add('dshow:// :dshow-vdev="" :dshow-adev="" :dshow-size="176x144" ', null, options);
vlc.playlist.play();
didnt work for me, but in theory should do the same as addTarget.
Let us know if you find a solution. I do hope that someone addresses this issue once and for all cause its being brought up in a lot of threads.
Re: Playing and recording video from web-cam
Posted: 23 Oct 2007 14:22
by revolunet
hello all
this syntax seems to work with Mozilla :
:sout = "#duplicate{dst=display,dst=std{access=file,mux=ps,url=c:\\movie.mpg}}"
enjoy
Re: Playing and recording video from web-cam
Posted: 23 Oct 2007 21:09
by SyRenity
Hi.
I'm using a desktop environment rather then a browser. Can you perhaps post an example working on VB or C#?
Also, according to your example the transcode={} section, specifying the codec parameters is entirely dropped. Have you managed to create with this option a playable file?
Thanks.
Re: Playing and recording video from web-cam
Posted: 24 Oct 2007 19:29
by revolunet
This works with the IE activex too so i think its the same ?
i didn't try to transcode yet..
if someone has an example string, i can try it
Re: Playing and recording video from web-cam
Posted: 25 Oct 2007 11:49
by SyRenity
Try mine, for example (change as necessary for HTML):
vlcLive.addTarget "dshow:// :dshow-vdev=""""", Array(":dshow-adev=""none"" :dshow-size="""" :sout=#transcode{vcodec=DIV3,vb=1024,scale=1} :duplicate{dst=display,dst=std{access=file,mux=ogg,dst=""C:\test.ogg""}}"), VLCPlayListReplaceAndGo, -666
Re: Playing and recording video from web-cam
Posted: 25 Oct 2007 12:30
by revolunet
Hello dude
it's working for me with this option :
:sout="#transcode{vcodec=DIV3,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=file,mux=ogg,dst=C:\\test.ogg}}";
in the plugin log, i have :
VLC: main private : using sout stream module "stream_out_standard"
VLC: main private : using sout stream module "stream_out_duplicate"
VLC: main private : set sout option: sout-transcode-vcodec to DIV3
VLC: main private : set sout option: sout-transcode-vb to 1024
VLC: main private : set sout option: sout-transcode-scale to 1
VLC: stream_out_transcode private : codec video=DIV3 0x0 scaling: 1.000000 1024kb/s
VLC: main private : using sout stream module "stream_out_transcode"
and c:\test.ogg is created !!
youhou, vlc rox
Re: Playing and recording video from web-cam
Posted: 26 Oct 2007 19:52
by SyRenity
Thanks man, that works indeed
.
Here is the final code:
vlcLive.addTarget "dshow://:dshow-vdev=""""", Array(":dshow-adev=""none"":dshow-size=""""", ":sout=#transcode{vcodec=DIV3,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=file,mux=ogg,dst=C:\\test.ogg}}"), VLCPlayListReplaceAndGo, -1
This both displays the webcam, and records it to an OGG file.
Re: Playing and recording video from web-cam
Posted: 20 Jan 2008 17:17
by lvasco
Hello all,
i spend i lot of time to slove my issue (connecting my logitech web cam thru vlc by using VLC ActiveX plugin and c#)
all forums gives me hints to go fwd. thank you all and here is my solution:
this.axVLCPlugin1.addTarget("dshow://",
new string[] { ":dshow-vdev=Logitech QuickCam Pro 9000", ":dshow-adev=\"\"", ":dshow-size=\"320x240\"" },
AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666);
it works for me...
good luck to you all,
regards,
laïd B