Problems recording stream output into file

This forum is about all development around libVLC.
twopelu
New Cone
New Cone
Posts: 1
Joined: 08 Jun 2010 17:43

Problems recording stream output into file

Postby twopelu » 08 Jun 2010 18:04

Hi all,

I´m having a lot of problems trying to record a MPEG4 stream (served via RTSP, Bosch camera) into a file (.avi).

The thing is that I can reproduce the stream quite easily, but I´m not able to record it into a file.

I´m using the DZ VLC Library (component in C# Windows Form application.

This is how I reproduce the stream:

DZ VLC component for C# (inside the form designer):

Code: Select all

private DZ.MediaPlayer.Vlc.WindowsForms.VlcPlayerControl vlcPlayerControl1;
Initialization of the component (inside onLoad Form method):

Code: Select all

vlcPlayerControl1.Initialize();
Code to reproduce the stream (inside Play button callback):

Code: Select all

mediaInput = new MediaInput(MediaInputType.NetworkStream, "rtsp://192.168.0.1"); vlcPlayerControl1.Play(this.mediaInput);
So far eveything is ok, and the stream gets reproduced fine, with no problem.

This is how I try to record the stream into a File (inside Record button callback):

Code: Select all

PlayerOutput playerOutput = new PlayerOutput(); OutFile outputFile = new OutFile(@"D:\Videos\test.avi"); playerOutput.Files.Add(outputFile); MediaLibraryFactory mediaLibraryFactory = new VlcMediaLibraryFactory( new string[] { "--no-snapshot-preview", "--ignore-config", "--no-osd" }); Player player = mediaLibraryFactory.CreatePlayer(playerOutput); player.SetMediaInput(this.vlcPlayerControl1.CurrentPlaying); player.Play();
Here, when I reach the Play method, it cracks. A not initialized or null COM Exception raises.

Of course, the file path exists, and the plugins and libraries are correctly places into the bin folder.

I´ve tried creating a new MediaInput the same way I did in the Play button (and not playing it before), to use it instead the this.vlcPlayerControl1.CurrentPlaying, but that´s not the problem (both ways it fails when I call the player.Play()).

Anybody could help me with this? Is there any easier way to record using just the DZ VLC component?

Thanks in advance.

Dani.

P.S. Any other possibility or idea to get this thing working (even not using DZ library) will be really apreciated.

DanLErickson
New Cone
New Cone
Posts: 1
Joined: 20 Oct 2010 15:57

Re: Problems recording stream output into file

Postby DanLErickson » 20 Oct 2010 16:02

I'm having the same problem. Have you found a solution to this yet?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 5 guests