Page 1 of 1

Record Live Stream & Transcoding using VLC Plugin

Posted: 04 Nov 2008 19:29
by ArmandoGDIT
Hi, I am trying to record a live stream using the Mozilla Plugin (0.9.4) , HTML and Javascript . I want to be able to view the video that is been recorded while is recorded and I also want the recorded video to be transcoded to mpg2 format.

The problem that I am having is that while I can record the stream to hard drive, i can not seem to be able to change the recording settings, and the recorded movies are very large (close to 1 GB for 15 minutes).

Using the standalone version of the VLC Media Player, I was able to generate a command string that does the recording, the preview, and the transcoding, and it also seems to workwhen used with the command line. The generated string looked similar to this:

Code: Select all

:sout=#transcode{vcodec=mp2v,vb=3072,scale=1,acodec=mpga,ab=128,channels=2}:duplicate{dst=display,dst=std{access=file,mux=ps,dst="C:\VLC\myTestMovie.MPG"}}
I have tried various methods of providing a similar string to the VLC plugin but most of them do not record anything or if they record, the file size is huge. So my problem is not knowing how to pass the same parameters to the VLC plugin component.

For example setting the options using Javascript like this does not work at all:

Code: Select all

var options = "sout=#transcode{vcodec=mp2v,vb=3072,scale=1,acodec=mpga,ab=128,channels=2}:duplicate{dst=display,dst=std{access=file,mux=ps,dst=C:\VLC\myTestMovie.MPG";
The simplified version of my code looks like this. It records, but regardless of setting I use for the "vb=3072", the file size is always the same, so I am thinking that the transcode parameters are not been used at all.

Code: Select all

function record() { var oVlc = document.getElementById("vlc1"); var mrl = "udp://@239.1.1.1:4444"; var options = ":sout=#transcode{vcodec=mp2v,vb=3072,scale=1,acodec=mpga,ab=128,channels=2} :sout=#duplicate{dst=display,dst=std{access=file,mux=ps,dst=C:\\VLC\\media\\myTestMovie.mpg"; var vId = oVLc.playlist.add(mrl, "vlc1", options); ovlc.playlist.playItem(vId); }
Anyway, any advice or help will be greatly appreciated. Have a great day!

Thanks.
A.

Re: Record Live Stream & Transcoding using VLC Plugin

Posted: 09 Dec 2008 21:46
by thannoy
I can suggest you to close brackets, but I think you did it actually:

Code: Select all

var options = ":sout=#transcode{vcodec=mp2v,vb=3072,scale=1,acodec=mpga,ab=128,channels=2} :sout=#duplicate{dst=display,dst=std{access=file,mux=ps,dst=\"C:\\VLC\\media\\myTestMovie.mpg\"}";
You can also have a look to revolunet page: http://code.revolunet.com/VLCcontrols/V ... anced.html. It use transcoding.

Re: Record Live Stream & Transcoding using VLC Plugin

Posted: 14 Dec 2008 01:49
by dynamitemedia
is it possible to get a live TV stream from a TV tuner card using the plugin or just a uri or file?

im interested in doing that if possible

Re: Record Live Stream & Transcoding using VLC Plugin

Posted: 14 Aug 2009 10:21
by jasonMarZ
Did you used plugin to display and record video on web??
I tried this

Code: Select all

var options = ":sout=#duplicate{dst=display,dst=std{access=file,mux=mp4,dst=\"C:\\kkkkk.mp4\"}}"; vlc.playlist.clear(); var test = vlc.playlist.add(targetURL, "vlc", options); vlc.playlist.playItem(test);
and it working,but when play recording file ,it has video but no audio.
I have no idea how it happened!
Is there someone can help me!!!!
Thanks!!!

Re: Record Live Stream & Transcoding using VLC Plugin

Posted: 14 Aug 2009 15:51
by rh
Simply download the newest player and use the converting / save wizzard ... and yes, vlc can capture stream from a tv card

Re: Record Live Stream & Transcoding using VLC Plugin

Posted: 17 Aug 2009 04:37
by jasonMarZ
Thanks,
But I try the latest vlc v1.0.1 to play file and still no audio.
I play the record file with vlc player saving,then it's ok,having video and audio.
And I play another one with activeX saving on web used command,but no audio.
So I thought it's no player's problem,isn't it???
Does anyone has the same problem with me???
I used v1.0.0 plugin.