Page 1 of 1

libvlc 3.0.0 is not saving anymore a stream to file

Posted: 28 May 2017 22:28
by AntonioTringali
Hi!

I am working on a project involving libvlc.

Until now, I have been using the 2.2.x stable branch. But I strongly need two features that made me pass to libvlc 3.0.0 (nightly build May 27 2017): grab a frame from an mp4 file and stream a list of files to RTP. Both of these features deadlock using libvlc 2.2.5.1.

Now I am a little baffled: a feature that used to work well in libvlc 2.2.5.1 is not working anymore. That is, saving an RTSP stream into an MP4 file.

The code would be like this:

Code: Select all

const char * const args1[] = { "--sout", transcode.c_str(), msecDelay.c_str() }; size_t argsCount1 = sizeof(args1) / sizeof(args1[0]); it->second.p_lib = libvlc_new(argsCount, p_args);
with the string named transcode like:

Code: Select all

transcode = "#transcode{acodec=mp3}:duplicate{ dst=file{ dst=" + string(it->second.fDump) + " }, dst=display }";
which is fed to libvlc_media_player_play(p_player) to start the process.

Now, when I execute the same code with libvlc 3.0.0 I can see the video, but no file.

Any idea of what I am doing wrong?

Thank you in advance,
Antonio

Re: libvlc 3.0.0 is not saving anymore a stream to file

Posted: 29 May 2017 17:46
by RĂ©mi Denis-Courmont
http://www.videolan.org/developers/vlc/ ... _core.html
Warning
There is absolutely no warranty or promise of forward, backward and cross-platform compatibility with regards to libvlc_new() arguments. We recommend that you do not use them, other than when debugging.
If you want to use command line arguments, run the VLC binary (as a child process).

LibVLC support for streaming output is not implemented yet (and never was): https://trac.videolan.org/vlc/ticket/5037

Re: libvlc 3.0.0 is not saving anymore a stream to file

Posted: 11 Jun 2017 15:38
by Jean-Baptiste Kempf
Any idea of what I am doing wrong?
Please share your logs.