piping vlc output

About encoding, codec settings, muxers and filter usage
hakova
Blank Cone
Blank Cone
Posts: 16
Joined: 20 Dec 2007 02:45

piping vlc output

Postby hakova » 04 Apr 2009 00:41

Hi there,

Is there a way to pipe vlc output as an input to another software?

Thanks in advance for replies.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: piping vlc output

Postby Rémi Denis-Courmont » 04 Apr 2009 12:43

As any other software.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

hakova
Blank Cone
Blank Cone
Posts: 16
Joined: 20 Dec 2007 02:45

Re: piping vlc output

Postby hakova » 04 Apr 2009 23:28

As any other software.
But if I run this:

Code: Select all

cvlc http://xx.xx.xxx.xx:8795 - | another-command-here
All it does is to play the stream but not pipe it to standard output as an object to the other command. I could not find any specific option in help, long-help and online documentation. I am probably missing something very obvious, please excuse my ignorance here.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: piping vlc output

Postby Rémi Denis-Courmont » 05 Apr 2009 12:31

That command line says play the http URL, then play the pipe...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

hakova
Blank Cone
Blank Cone
Posts: 16
Joined: 20 Dec 2007 02:45

Re: piping vlc output

Postby hakova » 05 Apr 2009 20:12

That command line says play the http URL, then play the pipe...
OK, I know I am probably sounding stupid to you with the lack of my knowledge in coding / command line, but would you please point me towards the right direction? I tried this too:

Code: Select all

cvlc http://xx.xx.xxx.x:8875 --sout '#duplicate{dst=std{access=file,mux=mp4,dst=-}}' | other-command
but it didn't look like it did the job either.
Please?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: piping vlc output

Postby Rémi Denis-Courmont » 05 Apr 2009 22:17

Works fine here. Check that the codecs are compatible with the MPEG4 container.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

hakova
Blank Cone
Blank Cone
Posts: 16
Joined: 20 Dec 2007 02:45

Re: piping vlc output

Postby hakova » 07 Apr 2009 03:25

OK, I think this is what the problem is with piping the output of an mp4a stream. Please correct me if I am wrong because obviously I am not as knowledgeable.

If I save an mp4a stream as a file and then try to play/decode/stream everything works fine 8) .
If I try to save it as a nameless pipe, it still probably works, although I cannot replay/decode it on the fly.
If I try to save it as a named pipe, vlc refuses to do so, the named pipe remains at zero bytes in size. This might be a format/codec issue that might be incompatible with the pipe format.
If I start saving the mp4 stream as a file and attempt to play it sometime later but before I stop recording process, vlc refuses to do so, and complains about the absence of moov box / atom. It only succeeds once the recording/saving is stopped. Therefore, with my limited knowledge, I speculate that a moov box / atom, which is needed to play an mp4 file, is added to the saved file only after the saving / recording stops. This is probably not the case with formats like wav, mp2, etc. I think this is why I failed my attempts so far.
If one kills the vlc process or terminates it rather than manually stopping, the mp4 file is still unreadable, probably because of the same issue, i.e. moov box / atom was not added.
None of the transcode options vlc is capable of works for mp4a stream with the vlc version that came with Mandriva 2009.0 (0.9.3 Grishenko), in case anybody else was trying.
Regards.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: piping vlc output

Postby Rémi Denis-Courmont » 07 Apr 2009 21:16

Actually, MP4 muxing requires seek/read on the output stream, so it is no wonder that it fails on a pipe.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

popper
Blank Cone
Blank Cone
Posts: 25
Joined: 17 Oct 2008 20:55

Re: piping vlc output

Postby popper » 10 Apr 2009 07:52

it seems this VL org MB isnt used very much these days for viable tryed and tested answers, and so your lucky if you will find any real A,B,C instructions here, but i tryed to find you some real life command options that you might adapt.

perhaps we NEED to start inviting other VLC potential users here to get the content and membership up to scratch and make it a really helpful informative place like the Ubuntu MBs etc are today..... it seems people are not using, Advocating or coding much for VLC anywere as much these days, and thats a shame...

http://search.virginmedia.com/results/i ... ut+pipeing+
http://search.virginmedia.com/results/i ... ut+pipeing+

gives you these old posts
http://mailman.videolan.org/pipermail/v ... 11735.html
and
http://mailman.videolan.org/pipermail/v ... 12429.html

im not good with pipes, but i beleave you can make fixed size FIFO pipes ? so it seems if the current code works as then, with pipes, you might be able to adapt these /dev/stdin/ and /dev/stdout with some fixed FIFO buffering ?

good lcuk and report back if and how you get it working 100% for others to find and learn from later.

PS i originally thought this thread was infact a PIP (picture In Picture) question, and id like to know if VLC can take and make a command line of several video_audio inputs and put out a single PIP'ed AVC TS stream with these two or more video files included as seperate stacked and/or seperate streams inside it.

1-CIF-AVC-AAC----input
-------------------------transcode-inputs<>PIP'-combined-single-output.ts
2-CIF-AVC-AAC----input

viewed output result
|--------|---------|
| 1-cif....| 2cif.......|
|--------|---------|


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests