Add mime type to sout so browser will play mp3 stream
Posted: 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:
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:
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.
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