Page 1 of 1

display freeze while sout recording to file

Posted: 07 Jun 2018 13:28
by nammy
hello,
i am using vlc.net for a c# app,
everything working great, except when i decide to record a stream to a file.avi, the display on my vlcControl1 freeze, so i can't monitor it... BUT the file is saved perfectly tho!
It is freezing completly, not a bit. Only the first frame is displayed, and nothing more then. It stays on it.

here is the code... maybe something to change to the "sout" line :

Code: Select all

vlcControl1.SetMedia(medias[0], new string[] { ":sout=#transcode{vcodec=h264,vb=1024,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=display,dst=std{access=file,mux=avi,dst='C:\stream\videos\name.avi'}}" }); vlcControl1.Play();
i tried to put the "dst=display" after the "dst=std" and before. nothing changed

Any help and suggestion welcomed!
Thank you

Re: display freeze while sout recording to file

Posted: 09 Jun 2018 09:58
by Jean-Baptiste Kempf
Sout=display does not work in vlcControl1.

Re: display freeze while sout recording to file

Posted: 10 Jun 2018 19:16
by nammy
thank you for your answer... but is there any alternative then? anything?

Re: display freeze while sout recording to file

Posted: 12 Jun 2018 19:12
by gancho93
hello,
i am using vlc.net for a c# app,
everything working great, except when i decide to record a stream to a file.avi, the display on my vlcControl1 freeze, so i can't monitor it... BUT the file is saved perfectly tho!
It is freezing completly, not a bit. Only the first frame is displayed, and nothing more then. It stays on it.

here is the code... maybe something to change to the "sout" line :

Code: Select all

vlcControl1.SetMedia(medias[0], new string[] { ":sout=#transcode{vcodec=h264,vb=1024,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=display,dst=std{access=file,mux=avi,dst='C:\stream\videos\name.avi'}}" }); vlcControl1.Play();
i tried to put the "dst=display" after the "dst=std" and before. nothing changed

Any help and suggestion welcomed!
Thank you
Hi,

I want to refresh this issue as I have exactly the same issue.

I'm using vlc.net for a C# app and firstly I implemented the display, and vlc.Control1() worked great! But when I added the duplicate module the first frame freeze.

I'll add the code later.

Is there any solution?

Thanks a lot

Re: display freeze while sout recording to file

Posted: 12 Jun 2018 19:24
by nammy
@gancho93
hello, for your info, i found a weird workaround you can find on stackoverflow.
Looks klike there is no solution for now, but the thing im doing is working.

https://stackoverflow.com/questions/507 ... 4#50802154
regards

Re: display freeze while sout recording to file

Posted: 13 Jun 2018 11:31
by gancho93
@gancho93
hello, for your info, i found a weird workaround you can find on stackoverflow.
Looks klike there is no solution for now, but the thing im doing is working.

https://stackoverflow.com/questions/507 ... 4#50802154
regards
Thanks a lot Nammy! I'll give it a try!

Eventhough I'm posting what I've done so far, so if someone knows how to do it without the workaround can tell us.

Code: Select all

// Firstly I tried this, as VLC suggests, the module duplicate, demuxes the stream so you can display and record at the same time. vlcControl1.SetMedia("rtsp://" + Server_IP + ":8554/test", ":sout=#duplicate{dst=display,dst=std{access=file,mux=mp4,dst=C:\\Users\\Username\\Desktop\\test.mp4}");
But it didn't work at all so i made the following:

Code: Select all

// I tried to create a second VlcControl object so one will be displaying and the other one will be recording backwards vlcControl1.SetMedia("rtsp://" + Server_IP + ":8554/test", "#transcode{vcodec=mp4v,acodec=none,vb=128,deinterlace}"); vlcControl_recorder.SetMedia("rtsp://" + Server_IP + ":8554/test", ":sout=#std{access=file,mux=mp4,dst=C:\\Users\\Username\\Desktop\\test.mp4}");
Let's see if Nammy's solution works for me!

Thanks a lot!

EDIT 1:

I'll also try this:

https://stackoverflow.com/questions/130 ... e-location

I'll keep you updated

Re: display freeze while sout recording to file

Posted: 21 Jun 2018 01:20
by gancho93
Hi,

I've tried both of the solutions, but nothing worked. I think that's got something to do with the libraries, as the VLC Media Player doesn't allow me to play and record an RTSP stream at the same time neither.

Any idea about what's going on?

Thanks!!