[streaming] Streaming media to WMP with mosaic - no sound

Gergely Kiss mail.gery at gmail.com
Fri Dec 25 11:53:11 CET 2009


Dear Users,

I'd like to ask for your help. I'm using the latest VLC release
(1.0.4) on an Ubuntu machine and want to create a streaming server to
play music and video clips, so that our LAN users can watch it while
working.
I've played a lot with the streaming options of VLC, but I found no
solution to what I want to achieve.

Users want to play the stream with Windows Media Player, so I decided
to use ASF steraming over MMSH. I created a mosaic with a fake
background, which shows up when there's no video in the main stream.
This works perfectly.
Another VLC instance streams the content through UDP with TS
encapsulation. The problem is, that WMP plays no sound at all, if I
start the "main" stream after the "fake" instance is running. Checking
the media properties tells me, that WMP doesn't "see" the audio
stream! I tried to play a fake audio stream with VLC, it helped to
solve this. WMP now tells me, that the stream has an MP3 audio track,
which is fine, but no sound can be heard, no matter what I try to
stream from the second instance (an MP3 music, an MPEG video, an AVI
video...).

If I switch the fake stream to HTTP/TS, everything works like a charm,
except that WMP is not able to play the stream... :( I have to open
the stream with VLC to play it. WMP just keeps "connecting", but then
nothing happens.

I run two VLC daemons with this script:

****************************************

#!/bin/sh

# VLC daemon startup script

# start
start()
{
# Normal instance - this is where we stream the media from
su kissg -c "/usr/bin/vlc -I http --daemon -L --volume 512
--http-reconnect --http-caching 5000 --no-random --sout-keep --sout
'#gather:transcode{vcodec=WMV1,vb=768,acodec=mp3,ab=192,channels=2,audio-sync}:std{access=udp,mux=ts,dst=127.0.0.1:1234}'
2> /dev/null"
# Fake stream - it shows a background image if the main stream doesn't
have a video track
su kissg -c "/usr/bin/vlc --daemon --vlm-conf
/home/kissg/.vlc/mosaic.vlm.conf" 2> /dev/null
}

# stop
stop()
{
killall vlc 2>&1 >/dev/null
}

case $1 in
   start)
   echo -n "Starting VLC streaming server... "
   start
   echo vlc.
   ;;
   stop)
   echo -n "Stopping VLC streaming server... "
   stop
   echo vlc.
   ;;
   restart)
   echo -n "Restarting VLC streaming server... "
   stop
   sleep 3
   start
   echo vlc.
   ;;
   *)
   echo "Usage: $0 [start|stop|restart]"
esac

****************************************

My VLM config file looks like this:

***********************************

# Comment the following line if you don't want to reset your VLM configuration
del all

# Background options
new   bg broadcast enabled
setup bg input     fake://
setup bg option    fake-file="/home/kissg/.vlc/bg.png"
setup bg option    fake-aspect-ratio="4:3"
setup bg output
#transcode{vcodec=WMV1,vb=768,scale=1,acodec=mp3,ab=192,channels=2,sfilter=mosaic}:bridge-in{id-offset=1}:std{access=mmsh,mux=asfh,dst=:8181}

# Mosaic options
setup bg option mosaic-alpha=255
setup bg option mosaic-height=240
setup bg option mosaic-width=320
setup bg option mosaic-align=5
setup bg option mosaic-xoffset=0
setup bg option mosaic-yoffset=0
setup bg option mosaic-vborder=0
setup bg option mosaic-hborder=0
setup bg option mosaic-position=1
setup bg option mosaic-rows=1
setup bg option mosaic-cols=1
setup bg option mosaic-order=bg,video
setup bg option mosaic-delay=0
setup bg option mosaic-keep-picture

# Input video
new video broadcast enabled
setup video input "udp://@127.0.0.1:1234"
setup video output
#duplicate{dst=mosaic-bridge{id=1,width=320,height=240},select=video}

# Input sound
new sound broadcast enabled
setup sound input "udp://@127.0.0.1:1234"
setup sound output #duplicate{dst=bridge-out{id=1},select=audio}

# Launch everything
control bg play
control video play
control sound play

# end of mosaic batch

***********************************

How should I configure VLC to be able to:
- send the background image when there's no video in the main stream
or the main stream is stopped
- show the video and play the sound of the main stream when streaming
a movie or a video clip
- play the sound of the main stream and show the bg image when the
main stream only has an audio track
- play the stream with Windows Media Player without the need of any
3rd party modules/codecs


Thanks for your help!


More information about the streaming mailing list