Stream output with custom Mux
Posted: 26 May 2016 12:36
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:
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!!
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
Any help is greatly appreciated!!