Record Live Stream & Transcoding using VLC Plugin

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
ArmandoGDIT
New Cone
New Cone
Posts: 1
Joined: 03 Nov 2008 21:30

Record Live Stream & Transcoding using VLC Plugin

Postby ArmandoGDIT » 04 Nov 2008 19:29

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.

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: Record Live Stream & Transcoding using VLC Plugin

Postby thannoy » 09 Dec 2008 21:46

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.

dynamitemedia
Blank Cone
Blank Cone
Posts: 60
Joined: 15 Jul 2007 23:30

Re: Record Live Stream & Transcoding using VLC Plugin

Postby dynamitemedia » 14 Dec 2008 01:49

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

jasonMarZ
New Cone
New Cone
Posts: 4
Joined: 14 Aug 2009 09:42

Re: Record Live Stream & Transcoding using VLC Plugin

Postby jasonMarZ » 14 Aug 2009 10:21

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!!!

rh
Cone that earned his stripes
Cone that earned his stripes
Posts: 158
Joined: 21 Sep 2006 13:11
VLC version: 2.0.2
Operating System: Lin / Win / Andr
Location: Germany

Re: Record Live Stream & Transcoding using VLC Plugin

Postby rh » 14 Aug 2009 15:51

Simply download the newest player and use the converting / save wizzard ... and yes, vlc can capture stream from a tv card
scarcely you do it right it works ...
Greetings, rh

jasonMarZ
New Cone
New Cone
Posts: 4
Joined: 14 Aug 2009 09:42

Re: Record Live Stream & Transcoding using VLC Plugin

Postby jasonMarZ » 17 Aug 2009 04:37

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 39 guests