Stream output with custom Mux

This forum is about all development around libVLC.
rhegner
Blank Cone
Blank Cone
Posts: 10
Joined: 29 Mar 2016 12:21

Stream output with custom Mux

Postby rhegner » 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:

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

rhegner
Blank Cone
Blank Cone
Posts: 10
Joined: 29 Mar 2016 12:21

Re: Stream output with custom Mux

Postby rhegner » 27 May 2016 12:07

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?

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: Stream output with custom Mux

Postby Jean-Baptiste Kempf » 28 Jun 2016 10:14

try your muxer with simpler chains, seriously.
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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests