Decoding pcm s16l from pipe?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
thomasa88
New Cone
New Cone
Posts: 4
Joined: 12 Jan 2009 18:41

Decoding pcm s16l from pipe?

Postby thomasa88 » 12 Jan 2009 18:59

Is it possible to pipe raw pcm s16le data to vlc?

I tried this but it does not work:

Code: Select all

cat /var/run/pulse/fifo_output | cvlc - -v

Code: Select all

[00000001] main libvlc debug: translation test: code is "C" [00000375] dummy interface: using the dummy interface module... libdvdread: Using libdvdcss version 1.2.10 for DVD access libdvdread: Can't stat - No such file or directory [00000385] dvdnav demux warning: cannot open dvdnav [00000393] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [00000001] main libvlc error: option sub-original-fps does not exist [00000384] main input error: demux doesn't like DEMUX_GET_TIME [00000384] main input error: demux doesn't like DEMUX_GET_TIME [00000384] main input error: demux doesn't like DEMUX_GET_TIME
When adding --demux=wav I get this: (but it is listed as a demuxer :S)

Code: Select all

[00000388] main demux warning: no demux module matching "wav" could be loaded [00000384] main input error: no suitable demux module for `/wav://-'

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Decoding pcm s16l from pipe?

Postby Jean-Baptiste Kempf » 12 Jan 2009 20:59

demux raw?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

thomasa88
New Cone
New Cone
Posts: 4
Joined: 12 Jan 2009 18:41

Re: Decoding pcm s16l from pipe?

Postby thomasa88 » 12 Jan 2009 21:17

demux raw?

Code: Select all

[00000388] main demux error: no demux module matched "raw" [00000384] main input error: no suitable demux module for `/raw://-'
:(

edit.
Are there any other flags I could specify to set the format?

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

Re: Decoding pcm s16l from pipe?

Postby Rémi Denis-Courmont » 13 Jan 2009 22:28

There is no raw PCM demux, although it would be easy to implement.

As I infer you're using PulseAudio as input, you can always:
- stream L16 over RTP/UDP/IP over the loopback interface, or
- echo a binary .WAV file header, before you cat the FIFO into VLC:
(echo XXXX; cat /var/run/pulse/fifo_output) | cvlc -v- -
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

thomasa88
New Cone
New Cone
Posts: 4
Joined: 12 Jan 2009 18:41

Re: Decoding pcm s16l from pipe?

Postby thomasa88 » 13 Jan 2009 22:49

It works! Thank you! :D

Code: Select all

ffmpeg -f s16le -ar 192000 -i /var/run/pulse/fifo_output -vn -acodec copy -f wav - | cvlc -
(It's a bit choppy but I have to look at all the rate settings for ffmpeg and caching in vlc)

edit.
Ie the second option, the first spills to much multicast traffic ;)


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 40 guests