Page 1 of 1

VLC/shoutcast/icecast2 streaming

Posted: 16 Nov 2008 20:13
by whoisalsocalledraich
Good evening out there!

to my problem: my goal is to stream an arbitrary web radio stream to a shoutcast server (i. e. also transcoding is needed). I tried some hours to find a working output string and searched the web but it didnt work out. What I tried till now:

Streaming incoming ogg stream to icecast2, generated with the vlc gui (selected streaming context menu entry in the playlist window)

Code: Select all

:sout=#duplicate{dst=std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/live}}
Result: working

Added now mp3 transcoding

Code: Select all

:sout=#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/live}}
Result: not working, also when indication as mux=raw or mux=mpeg1

Then found some reasonable hints in a forum (maybe here? lost the link...), that the output module shout requires some parameters and that mp3 streams do not have mountpoints (take root mountpoint...) in icecast2

Code: Select all

:sout=#transcode{ab=24,samplerate=11025}:standard{access=shout{mp3},mux=raw,dst=source:hackme@localhost:8000/}
or

Code: Select all

:sout=#transcode{acodec=mp3,ab=128,channels=2}:std{access=shout{mp3=1,bitrate=128},mux=mpeg1,dst=source:hackme@localhost:8000/}}
Result: both not working, although the latter one gave me finally the correct (?) content type (Content Type: audio/mpeg) in the webadmin interface of icecast2. And it was working for this guy.

Then I switched to shoutcast (running on my mac, OS-X 10.4) because icecast2 seems to encourage ogg streams and was designed for that (but shouldnt it also stream mp3? anyway...) but also this didnt help. But I noticed, that the source is disconnecting because there is no data sent. (shoutcast console window: [source] no data (30s timeout). disconnecting). Then I went back to icecast2 and also there mountpoint is vanishing, even though after a shorter time. This lead me to the assumption that the transconding isnt working. So I tried it both under linux and windows environment and with mp3 input streams but always the same result, which means, I think, that this is not a platform dependent mp3 encoder issue (under linux I compiled the ffmpeg with libmp3lame support because the encoder wasnt found). The vlc messages dont show any useful information or errors.

Could anyone help me with this problem? I would appreciate it very much!

raich

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 00:34
by Jean-Baptiste Kempf
You cannot put mp3 in ogg...
Try to put vorbis instead!

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 09:26
by whoisalsocalledraich
Hi, what I tried was transcoding ogg to mp3. Is that not considered to work? As you can see in my first output string I putted already transcoding to ogg and indicating mux=ogg which was working. But than changing to mp3 is not working! Is my string generally ok?

Thank you for your help,

raich

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 11:19
by Jean-Baptiste Kempf
You don't understand me.
Your codec (mp3) does not fit in your muxer (ogg)

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 14:44
by whoisalsocalledraich
Yeah but I changed also the mux, see here

Code: Select all

:sout=#transcode{acodec=mp3,ab=128,channels=2}:std{access=shout{mp3=1,bitrate=128},mux=mpeg1,dst=source:hackme@localhost:8000/}}
is this mux correct? The stream is unfortunately not working.

Greetz,

raich

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 15:01
by Jean-Baptiste Kempf
why not do acodec=vorb ?

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 15:07
by whoisalsocalledraich
Because I need mp3 as outcoming stream (my target devices support only that) : :-|

The situation is that the stream connects properly to shoutcast/icecast but is then kicked because no data is sent. Therefore encoding is not working I guess. But what am I doing wrong? Lacking some encoders (under linux, as I said, I compiled ffmpeg with libmp3lame support with no success)?

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 15:25
by Jean-Baptiste Kempf
To help you, we need messages, to completely understand what your problems is.
To fix this, please be sure before you start the playback to:
  1. Open: Tools -> Messages.
  2. Set Verbosity to 2
  3. Start playback to reproduce your issue
  4. Save text in a file or copy into clipboard
  5. Then paste the full resulting log here between [​code]and[​/code] (or use Pastebin.com if it's too long)
Also don't forget to name your Operating System and provide the VLC media player version.

Re: VLC/shoutcast/icecast2 streaming

Posted: 17 Nov 2008 16:17
by whoisalsocalledraich
VLC 0.9.4
Ubuntu 8.10

verb lvl=2
qt4 debug: Sout mrl sout:=#transcode{acodec=mp3,ab=128,channels=2}:std{access=shout{mp3=1,bitrate=128},mux=mpeg1,dst=admin:adminpass@192.168.0.4:8000}}
main debug: adding item `Streaming' ( http://fm4.nobody.at:8080/fm4-hq.ogg )
main debug: waitpipe: object killed
main debug: rebuilding array of current - root Playlist
main debug: rebuild done - 2 items, index -1
main debug: dying input
main debug: removing module "vorbis"
main debug: thread ended
main debug: dying input
main debug: dying input
main debug: control type=0
main debug: control: stopping input
main debug: thread 1189026128 joined (input/decoder.c:248)
main debug: killing decoder fourcc `vorb', 101 PES in FIFO
main debug: removing module "bandlimited_resampler"
qt4 debug: Updating the stream status: 8
main debug: thread ended
main debug: thread 1197418832 joined (alsa.c:742)
main debug: removing module "alsa"
main debug: removing module "float32_mixer"
main debug: Program doesn't contain anymore ES
main debug: removing module "ogg"
main debug: removing module "access_http"
main debug: thread ended
main debug: dead input
main debug: thread 1180633424 joined (playlist/engine.c:244)
main debug: TIMER input launching for '(un)official FM4 Livestream' : 772.244 ms - Total 772.244 ms / 1 intvls (Avg 772.244 ms)
main debug: starting new item
main debug: processing request item Streaming node Playlist skip 0
main debug: resyncing on Streaming
main debug: Streaming is at 1
main debug: creating new input thread
main debug: Creating an input for 'Streaming'
main debug: waiting for thread initialization
main debug: thread started
main debug: thread 1180633424 (input) created at priority 10 (input/input.c:370)
qt4 debug: Updating the stream status: 3
main debug: `http://fm4.nobody.at:8080/fm4-hq.ogg' gives access `http' demux `' path `fm4.nobody.at:8080/fm4-hq.ogg'
main debug: creating demux: access='http' demux='' path='fm4.nobody.at:8080/fm4-hq.ogg'
main debug: looking for access_demux module: 0 candidates
main warning: no access_demux module matched "http"
main debug: TIMER module_Need() : 0.140 ms - Total 0.140 ms / 1 intvls (Avg 0.140 ms)
main debug: creating access 'http' path='fm4.nobody.at:8080/fm4-hq.ogg'
main debug: looking for access module: 2 candidates
access_http debug: http: server='fm4.nobody.at' port=8080 file='/fm4-hq.ogg
main debug: net: connecting to fm4.nobody.at port 8080
main debug: connection: Operation now in progress
main debug: connection succeeded (socket = 26)
access_http debug: protocol 'HTTP' answer code 200
access_http debug: Content-Type: application/ogg
access_http debug: Meta-Info: ice-audio-info: samplerate=48000;channels=2;quality=5%2e00
access_http debug: Meta-Info: icy-description: (un)official FM4 Livestream, Via DVB Satellite Transponder
access_http debug: Icy-Genre: Radio
access_http debug: Icy-Name: (un)official FM4 Livestream
access_http debug: Meta-Info: icy-pub: 1
access_http debug: Server: Icecast 2.3.1
access_http debug: auto re-connect enabled
main debug: using access module "access_http"
main debug: TIMER module_Need() : 298.919 ms - Total 298.919 ms / 1 intvls (Avg 298.919 ms)
main debug: Using AStream*Stream
main debug: pre-buffering...
qt4 debug: New Event: type 1103
qt4 debug: Updating the stream status: 2
main debug: received first data for our buffer
main debug: pre-buffering done 8698 bytes in 0s - 30 kbytes/s
main debug: creating demux: access='http' demux='' path='fm4.nobody.at:8080/fm4-hq.ogg'
main debug: looking for demux module: 60 candidates
main debug: using demux module "ogg"
main debug: TIMER module_Need() : 0.152 ms - Total 0.152 ms / 1 intvls (Avg 0.152 ms)
main debug: looking for meta reader module: 2 candidates
id3tag debug: checking for ID3v1/2 and APEv1/2 tags
main debug: TIMER module_Need() : 0.149 ms - Total 0.149 ms / 1 intvls (Avg 0.149 ms)
main debug: `http://fm4.nobody.at:8080/fm4-hq.ogg' successfully opened
ogg debug: found vorbis header
main debug: selecting program id=0
main debug: looking for decoder module: 30 candidates
main debug: using decoder module "vorbis"
main debug: TIMER module_Need() : 0.084 ms - Total 0.084 ms / 1 intvls (Avg 0.084 ms)
main debug: thread 1197418832 (decoder) created at priority 5 (input/decoder.c:217)
main debug: thread started
ogg debug: beginning of a group of logical streams
main debug: removing module "vorbis"
main debug: thread ended
main debug: thread 1197418832 joined (input/decoder.c:248)
main debug: killing decoder fourcc `vorb', 0 PES in FIFO
main debug: looking for decoder module: 30 candidates
main debug: using decoder module "vorbis"
main debug: TIMER module_Need() : 0.080 ms - Total 0.080 ms / 1 intvls (Avg 0.080 ms)
main debug: thread 1197418832 (decoder) created at priority 5 (input/decoder.c:217)
main debug: thread started
main debug: control type=1
qt4 debug: New Event: type 1103
qt4 debug: Updating the stream status: 3
qt4 debug: New Event: type 1108
vorbis debug: headers already available as extra data
vorbis debug: channels:2 samplerate:48000 bitrate:160000
main debug: no aout present, spawning one
main debug: looking for audio output module: 3 candidates
qt4 debug: New Event: type 1102
qt4 debug: New Event: type 1102
alsa debug: opening ALSA device `default'
main debug: thread 1189026128 (aout) created at priority 15 (alsa.c:687)
main debug: using audio output module "alsa"
main debug: thread started
main debug: TIMER module_Need() : 88.313 ms - Total 88.313 ms / 1 intvls (Avg 88.313 ms)
main debug: output 'fl32' 48000 Hz Stereo frame=1 samples/8 bytes
main debug: mixer 'fl32' 48000 Hz Stereo frame=1 samples/8 bytes
main debug: no need for any filter
main debug: looking for audio mixer module: 3 candidates
main debug: using audio mixer module "float32_mixer"
main debug: TIMER module_Need() : 0.072 ms - Total 0.072 ms / 1 intvls (Avg 0.072 ms)
main debug: input 'fl32' 48000 Hz Stereo frame=1 samples/8 bytes
main debug: filter(s) 'fl32'->'fl32' 52800 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module: 24 candidates
main debug: using audio filter module "bandlimited_resampler"
main debug: TIMER module_Need() : 0.071 ms - Total 0.071 ms / 1 intvls (Avg 0.071 ms)
main debug: found a filter for the whole conversion
main warning: buffer is 118696 late, triggering upsampling
main warning: resampling stopped after 9151934 usec (drift: -14113)

Re: VLC/shoutcast/icecast2 streaming

Posted: 12 Mar 2009 12:35
by old_lizard
Hello! I've got the same problem... VLC 0.9.8 compiled from sources

./configure --prefix=/usr/local/stow/vlc-0.9.8/ --enable-x11 --enable-gtk --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --enable-mad --enable-libdvbpsi --enable-a52 --disable-dca --enable-libmpeg2 --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-caca --enable-skins --disable-skins2 --enable-alsa --disable-kde --enable-qt --enable-wxwindows --enable-ncurses --enable-release --enable-shout --disable-sdl

Translation to icecast2 is possible only with mux=ogg, another variants (raw, mpeg1) is not work.. ((


Working variant:
/usr/local/bin/vlc -vvv udp://@224.1.1.105:2105 --sout '#transcode{acodec=vorb,ab=128,channels=2}:duplicate{dst=std{access=shout,mux=ogg,dst=source:123456@172.31.0.14:8000/r29}}'

Not working:
/usr/local/bin/vlc -vvv udp://@224.1.1.105:2105 --sout '#transcode{acodec=mp3,ab=128,channels=2}:duplicate{dst=std{access=shout,mux=raw,dst=source:123456@172.31.0.14:8000/r29}}'

Ffmpeg converts to mp3 without problem, VLC saves stream to mp3 file without problem...

Any thoughts are welcome! Thanks!