Skip to content

Instantly share code, notes, and snippets.

@kripton
Created November 18, 2012 19:59
Show Gist options
  • Save kripton/4107143 to your computer and use it in GitHub Desktop.
Save kripton/4107143 to your computer and use it in GitHub Desktop.
This is **not** a script, only a bunch of commands collected here for convenience
Start icecast on the director's PC for the incoming webcam streams
/etc/init.d/icecast start
Start the feed-streams on the PCs/laptops where the webcams are:
- This is for V4L2 (USB webcams). We might need dvgrab or ffmpeg's iec61883-input for firewire-based cams
- This does NOT transmit audio. For V4L2 we need to find the correct ALSA-device and use that
gst-launch-0.10 v4l2src device=/dev/video0 ! ffmpegcolorspace ! video/x-raw-yuv,width=640,height=480 ! theoraenc quality=63 ! oggmux ! shout2send ip=regie port=12000 password=password mount=/cam1000.ogg
gst-launch-0.10 v4l2src device=/dev/video1 ! ffmpegcolorspace ! video/x-raw-yuv,width=640,height=480 ! theoraenc quality=63 ! oggmux ! shout2send ip=regie port=12000 password=password mount=/cam6000.ogg
Tell KRAD RADIO to start the station, do basic settings and transmit to the remote icecast server:
krad_radio jukuz launch
krad_radio jukuz setdir ~/testlogs
krad_radio jukuz res 640 360
krad_radio jukuz fps 25
krad_radio jukuz transmit audiovideo kripserver.net 12000 /test.ogg password "theora vorbis" 640 360 100
krad_radio jukuz vuon
krad_radio jukuz capture test
krad_radio jukuz input jack
# Make JACK connections now (use jack_connect or some GUI method)
krad_radio jukuz addtext "Audio: HR3 Video: Out-of-the-window :)" 20 250
Add the first webcam, scale and position it:
krad_radio jukuz play 127.0.0.1 12000 /cam6000.ogg
krad_radio jukuz setport 2 0 40 160 120 0 0 160 120 1 0
Add the first webcam, scale and position it:
krad_radio jukuz play 127.0.0.1 12000 /cam1000.ogg
krad_radio jukuz setport 3 180 40 160 120 0 0 160 120 1 0
Maybe add a text above a nice sprite:
krad_radio jukuz addsprite /home/kripton/jukuz/textsprite.png 0 0 4 1.0f 0.8f 0.0f
krad_radio jukuz addtext "some stupid text :D" 60 280 4 20.0f 1.0f 0.0f 0 136 85
Some more texts:
krad_radio jukuz addtext "https://github.com/kripton/KRAD_korg" 60 230 4 20.0f 1.0f 0.0f 0 255 0
krad_radio jukuz addtext "http://gist.github.com/4107143" 60 280 4 20.0f 1.0f 0.0f 255 0 0
For recording:
krad_radio jukuz record audiovideo /home/kripton/demo.webm "vp8 vorbis" 640 360 600
As an alternative to the icecast running on the director-PC we can also do:
krad_radio jukuz listen_on 12000
now krad will act as an "icecast-server", accepting all sources with any password and will play them directly
The transmit-command to stream now directly to KR is exactly the same as streaming to an icecast-server
KR will also accept other icecast-sources on the listen_on-ports. oggfwd and gstreamer's "shout2send" work with a KR-instance that is accepting connections via listen_on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment