My startup script:
Code: Select all
#!/bin/bash
clear
# $1 = sdp file name, put in /usr/local/movies
# $2 = ip to broadcast udp to
# $3 = port to broadcast udp to
# $4 = /dev/video?
echo \$1 should be the sdp file name \(foo.sdp\)
echo \$2 should be the IP to send the UDP stream to \(the ip of the DSS box\)
echo \$3 should be the port to broadcast to on the DSS box
echo \$4 should be the /dev/video? V4L device \(/dev/video0\)
echo ""
echo Example: ./StartStream.sh cam1.sdp 127.0.0.1 1234 video1
echo ""
if [ -z $1 ]
then
echo Missing argument\(s\)
echo ""
exit 0
fi
if [ -z $2 ]
then
echo Missing argument\(s\)
echo ""
exit 0
fi
if [ -z $3 ]
then
echo Missing argument\(s\)
echo ""
exit 0
fi
if [ -z $4 ]
then
echo Missing argument\(s\)
echo ""
exit 0
fi
echo " "
echo " "
echo Don\'t forget to copy /usr/local/movies/$1 to the /home/darwin/movies
echo directory on the darwin server
echo " "
OUTPUT=`echo '#transcode{vcodec=mp4v,vb=400}:rtp{dst=DESTIP,port=DESTPORT,sdp=file:///usr/local/movies/SDP}' | sed s/SDP/$1/g | sed s/DESTIP/$2/g | sed s/DESTPORT/$3/g`
echo vlc -I dummy v4l:/dev/$4:size=320x240 --no-audio --sout $OUTPUT
vlc -I dummy v4l:/dev/$4:size=320x240 --no-audio --sout $OUTPUT
I change that one part of my script to specify port-video instead of just port, and it goes to the proper port. So it seems to me that VLC is ignoring the port= option (I'm guessing it should use the number provided as a base and create a video port 2 below and an audio port at the number specifiied or something like that) but it does honor the port-video and port-audio options. EDIT - or the online streaming howto docs are wrong and port= just isn't supported... although from what I could understand of the rtp.c source file, it should still understand port= ...
$ vlc --help
VLC media player 0.8.6 Janus
Running on Ubuntu 6.10 (got vlc via apt-get install) , Dell Optiplex GX270
Thanks!