Skip to content

Instantly share code, notes, and snippets.

@kripton
kripton / gist:4266343
Created December 12, 2012 09:23
How to stream H.264 from the C920 directly w/o re-encoding anywhere in the chain
kripton@miramis ~/jukuz/krad_radio $ krad_radio camera launch
kripton@miramis ~/jukuz/krad_radio $ krad_radio camera setdir ~/testlogs/
kripton@miramis ~/jukuz/krad_radio $ krad_radio camera res 640 360
kripton@miramis ~/jukuz/krad_radio $ krad_radio camera setres 640 360
kripton@miramis ~/jukuz/krad_radio $ krad_radio camera capture v4l2 /dev/video0 640 360 30 1 video "" h264pass
kripton@miramis ~/jukuz/krad_radio $ krad_radio camera ls
Links:
Id: 0 capture video only from V4L2 with device at 0x0 0/0
@kripton
kripton / kr_client.tcl
Created November 27, 2012 21:46
krad radio tcl client function library (or s.th. like that)
## krad radio tcl client function library (or s.th. like that)
set sleeptime 200
proc kr {args} {
global station sleeptime
puts "kr_client: running krad_radio $station $args"
exec krad_radio $station {*}$args
after $sleeptime
}
@kripton
kripton / add_virtual_feed.tcl
Created November 27, 2012 21:14
script to set-up a "virtual feed" to simulate a webcam for testing. needs https://gist.github.com/4157307
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
source kr_client.tcl
set icecast_host 127.0.0.1
set icecast_port 12000
set icecast_pass "password"
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