Page 1 of 1

Stream output with custom Mux

Posted: 26 May 2016 12:36
by rhegner
We chose VLC for our current project because of its great extensibility :)

I'm currently implementing a custom muxer but I got stuck.

Consider a mkv file containing the following streams:
0: Video stream
1: Audio stream @ 44.1kHz
2: Audio stream @ 8kHz
3: Audio stream @ 8kHz

Streams 2 and 3 do not contain actual audio data but other arbitrary data which needs to be in sync with the video. They are therefore losslessly coded (with flac).

What I'm trying to achieve is the following:
- Play the default video stream (0) and the default audio stream (1) normally in VLC.
- Send decoded data samples from streams 2 and 3 via UDP to some external application. Every UDP packet contains data from both stream 2 and stream 3 - that's why I want to implement a custom mux to join the data of these two streams.

I start VLC with the following parameters:

Code: Select all

--sout "#duplicate{dst=display,select="es=0-1",dst=udp{mux=mymuxer,dst=127.0.0.1:11234},select="es=2-3"}" --sout-all
Now the data I get from the streams in my Mux function seems to be rather strange. What exactly do I receive in my muxer? What I need is the decoded raw audio samples without headers or anything. Could it be that I get a FLAC bitstream instead? Do I need to change the stream output configuration?

Any help is greatly appreciated!!

Image

Re: Stream output with custom Mux

Posted: 27 May 2016 12:07
by rhegner
I'm still trying to get raw decoded audio samples inside my custom mux. My last experiments were with explicitly transcoding the audio streams with something like this:

Code: Select all

--sout "#duplicate{dst=display,select="es=0-1",dst="transcode{acodec=s16l}:udp{mux=mymuxer,dst=127.0.0.1:11234}",select="es=2-3"}" --sout-all --sout "#duplicate{dst=display,select="es=0-1",dst="transcode{acodec=s16l}:std{access=udp,mux=mymuxer,dst=127.0.0.1:11234}",select="es=2-3"}" --sout-all
But both of them don't even seem to be valid stream chain descriptions (I get errors like "ignore unknown option `udp'" or " ignore unknown option `std'").

Please could anyone have a look at this and give me a hint on how I can get raw decoded audio samples inside my mux?

Re: Stream output with custom Mux

Posted: 28 Jun 2016 10:14
by Jean-Baptiste Kempf
try your muxer with simpler chains, seriously.