Skip to content

Instantly share code, notes, and snippets.

View philcrump's full-sized avatar

Phil Crump philcrump

View GitHub Profile
@philcrump
philcrump / gist:5408270
Created April 17, 2013 22:25
Custom Mediawiki Vector CollapsibleNav Menus.
Edit of 'extensions/Vector/modules/ext.vector.collapsibleNav.js' to customise collapsed/expanded nav-menus.
============================================================ -
if (
state === 'true' ||
( state === null && i < 1 ) ||
( state === null && version === 1 && id === 'p-lang' )
) {
@philcrump
philcrump / stream.sh
Last active December 15, 2015 00:39
BATC.tv streaming with ffmpeg
#!/bin/bash
# video: ~300kbps flv 720x560 10fps
# audio: 32kbps aac mono 11.025KHz
while true; do
ffmpeg -f video4linux2 -i /dev/video1 -itsoffset 1.0 -f alsa -i pulse -acodec libfdk_aac -ac 1 -b:a 32k -ar 11025 -f flv -s 720x560 -r 10 -b:v 256k "rtmp://fms.batc.tv/live/xxxxxxx/xxxxxxx flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
sleep 1;
done
@philcrump
philcrump / cx123xx-no-blue-screen.patch
Created November 22, 2012 09:42
A kernel patch for the cx231xx Composite Video => USB Dongle V4L driver that removes the blue screen normally visible when the device can't detect a SYNC signal.
--- a/drivers/media/video/cx231xx/cx231xx-avcore.c 2011-11-06 22:53:31.610479790 +0000
+++ b/drivers/media/video/cx231xx/cx231xx-avcore.c 2011-11-06 22:55:18.235967499 +0000
@@ -654,7 +654,7 @@
status = vid_blk_write_word(dev, AFE_CTRL, value);
status = vid_blk_read_word(dev, OUT_CTRL1, &value);
- value |= (1 << 7);
+ value |= (0 << 7);
status = vid_blk_write_word(dev, OUT_CTRL1, value);