timaschew
timaschew

Reputation: 16622

VLC: How to stream a wave via HTTP

I want to stream from my rapsberry the microphone via HTTP with VLC.

This command works fine:

vlc -vvv alsa://hw:1,0 --sout '#transcode{vcodec=none,acodec=mpga,ab=128,channels=2,samplerate=44100}:standard{access=http,mux=mp3,dst=192.168.178.30:8080}'

But when changing the code to s16l and mux to wav I can't hear anything in the VLC.

This is the command I've tried:

vlc -vvv alsa://hw:1,0 --sout '#transcode{vcodec=none,acodec=s16l,channels=1,samplerate=16000,scodec=none}:standard{access=http,mux=wav,dst=192.168.178.30:8080}' 

Bu the same codec using RTP works:

vlc -vvv alsa://hw:1,0 --sout '#transcode{vcodec=none,acodec=s16l,channels=1,samplerate=16000,scodec=none}:rtp{dst=192.168.178.30,port=1234,sdp=rtsp://192.168.178.30:8080/test.sdp}'

Some logs: https://gist.github.com/timaschew/9e7e027cd1b371b01b0f186f23b47068

Upvotes: 0

Views: 2140

Answers (2)

mail2subhajit
mail2subhajit

Reputation: 1150

Wave is a file container type, it can hold different types of codec data (compressed /uncompressed).

[Wiki]

Audio in WAV files can be encoded in a variety of audio coding formats, such as GSM or MP3, to reduce the file size.

This is a reference to compare the monophonic (not stereophonic) audio quality and compression bitrates of audio coding formats available for WAV files including PCM, ADPCM, Microsoft GSM 06.10, CELP, SBC, Truespeech and MPEG Layer-3.

For HTTP streaming using VLC

Select the Codec you need to stream like mp3 codec.

Note : Muxing is not applicable here

Upvotes: 1

Sal
Sal

Reputation: 1317

Not all codecs can be muxed, check VLC documentation.

Currently PCM(wave) can be muxed only in RTP.

mux is the encapsulation method required for streaming. wav in VLC is a container intended for storing.

Upvotes: 1

Related Questions