Add mime type to sout so browser will play mp3 stream

About encoding, codec settings, muxers and filter usage
thatjackelliott
New Cone
New Cone
Posts: 1
Joined: 13 Sep 2020 16:37

Add mime type to sout so browser will play mp3 stream

Postby thatjackelliott » 13 Sep 2020 16:56

Hi,
I am using VLC 2.1.5 to transcode and stream mp3 audio from a capture device over the internet using HTTP protocol to a second computer. On the second computer, I am using VLC to play the stream by connecting to the IP:port of the computer hosting the streaming VLC. It works perfectly.

This is the sout on the stream-sending VLC:

Code: Select all

:sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=ts,dst=:8080/} :sout-keep

I would like to be able to listen to that audio stream with a browser instead of VLC. But Chrome and Firefox see it as an "application/octet-stream" and offer to download it.

I have tried to add the mime type to the sout, like:

Code: Select all

:sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mime=audio/mpeg,mux=ts,dst=:8080/} :sout-keep
But the stream does not start. I have not found many examples of adding mime type to sout, so I do not know what next to try. Thank you.

Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 34 guests