fix up crap
This commit is contained in:
parent
59904b5c9c
commit
0113615640
12 changed files with 106 additions and 10 deletions
1
acatcher/NOTES/START_OWTO
Normal file
1
acatcher/NOTES/START_OWTO
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh dburr@localhost screen -dm bash test.sh
|
92
acatcher/NOTES/WMCTRL
Normal file
92
acatcher/NOTES/WMCTRL
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
#
|
||||||
|
# really crappy stream viewer
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
|
||||||
|
# constants and crap
|
||||||
|
|
||||||
|
# location of save directory
|
||||||
|
SAVE_DIRECTORY = "/home/dburr/tmp"
|
||||||
|
|
||||||
|
# size of screen
|
||||||
|
SCREEN_WIDTH = 1920
|
||||||
|
SCREEN_HEIGHT = 1080
|
||||||
|
|
||||||
|
# size of video
|
||||||
|
VIDEO_WIDTH = 320
|
||||||
|
VIDEO_HEIGHT = 200
|
||||||
|
|
||||||
|
# start position
|
||||||
|
START_X = 80
|
||||||
|
START_Y = 40
|
||||||
|
|
||||||
|
# offsets
|
||||||
|
X_OFFSET = 2
|
||||||
|
Y_OFFSET = 2
|
||||||
|
|
||||||
|
NAMES = []
|
||||||
|
MACS = []
|
||||||
|
IPS = []
|
||||||
|
PIDS = []
|
||||||
|
|
||||||
|
def startProcess(cmd):
|
||||||
|
devnull = open('/dev/null', 'w')
|
||||||
|
process = subprocess.Popen(cmd, stdin=None, stdout=devnull, stderr=devnull, shell=False)
|
||||||
|
return process.pid
|
||||||
|
|
||||||
|
file = open("CAMS", "r")
|
||||||
|
i = 0
|
||||||
|
|
||||||
|
for line in file:
|
||||||
|
stripped_line = line.rstrip()
|
||||||
|
if not stripped_line.startswith("#"):
|
||||||
|
split_string = stripped_line.split('|')
|
||||||
|
print "CAMERA: %s IP: %s MAC: %s" % (split_string[2], split_string[1], split_string[0])
|
||||||
|
NAMES.append(split_string[2])
|
||||||
|
MACS.append(split_string[0])
|
||||||
|
IPS.append(split_string[1])
|
||||||
|
|
||||||
|
x = START_X
|
||||||
|
y = START_Y
|
||||||
|
|
||||||
|
for idx, val in enumerate(NAMES):
|
||||||
|
print "starting cam " + NAMES[idx] + " at url " + IPS[idx] + " at (" + str(x) + "," + str(y) + ")"
|
||||||
|
#command = ["/usr/bin/cvlc", "cvlc", "--width", "320", "--height", "240", "--zoom", "0.3", "--video-x", str(x), "--video-y", str(y), "--video-title=" + NAMES[idx], "foo"]
|
||||||
|
command = ["/usr/bin/cvlc", "cvlc", "--width", "320", "--height", "240", "--zoom", "0.3", "--video-x", str(x), "--video-y", str(y), "--video-title=" + NAMES[idx], "http://"+IPS[idx]+":8080/"]
|
||||||
|
pid = startProcess(command)
|
||||||
|
print "started with pid " + str(pid)
|
||||||
|
time.sleep(2)
|
||||||
|
command = ["/usr/bin/wmctrl", "wmctrl", "-Fr", NAMES[idx], "-e", "0,"+str(x)+","+str(y)+",320,240"]
|
||||||
|
nada = startProcess(command)
|
||||||
|
#sleep 1;wmctrl -Fr "${NAMES[$i]}" -e "0,$x,$y,320,240"
|
||||||
|
x = x + VIDEO_WIDTH + X_OFFSET
|
||||||
|
if x > SCREEN_WIDTH - (VIDEO_WIDTH + X_OFFSET):
|
||||||
|
x = START_X
|
||||||
|
y = y + VIDEO_HEIGHT + Y_OFFSET
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
mon-carmel
|
mon-carmel
|
||||||
|
mon-losangeles-a
|
||||||
mon-losangeles-c
|
mon-losangeles-c
|
||||||
mon-century-ab
|
mon-century-ab
|
||||||
mon-century-cd
|
mon-century-cd
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# Signed 16 bit Little Endian, Rate 22050 Hz, Mono
|
# Signed 16 bit Little Endian, Rate 22050 Hz, Mono
|
||||||
#
|
#
|
||||||
# use "play" command to play back audio
|
# use "play" command to play back audio
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
FLAGS=-g
|
FLAGS=-g
|
||||||
#FLAGS=-O2
|
#FLAGS=-O2
|
||||||
if [ ! -f "$1" ]; then
|
if [ ! -f "$1" ]; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
if [ ! -f "$1" ] ; then
|
if [ ! -f "$1" ] ; then
|
||||||
echo "error: must specify active rooms file"
|
echo "error: must specify active rooms file"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
if [ ! -f "$1" ]; then
|
if [ ! -f "$1" ]; then
|
||||||
echo "error: must supply rooms list"
|
echo "error: must supply rooms list"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
if [ ! -f "$1" ]; then
|
if [ ! -f "$1" ]; then
|
||||||
echo "error: must specify rooms file"
|
echo "error: must specify rooms file"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
if [ ! -f "$1" ]; then
|
if [ ! -f "$1" ]; then
|
||||||
echo "error: must specify rooms file"
|
echo "error: must specify rooms file"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
FLAGS="-a"
|
||||||
|
#FLAGS="-as"
|
||||||
echo "*** NOTE wait a few then run fix_windows.sh in a different wimdow ***"
|
echo "*** NOTE wait a few then run fix_windows.sh in a different wimdow ***"
|
||||||
./acatcher | (aplay -t raw -c 1 -f S16_LE -r 22050 > /dev/null 2> /dev/null)
|
./acatcher $FLAGS | (aplay -t raw -c 1 -f S16_LE -r 22050 > /dev/null 2> /dev/null)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
if [ ! -f "$1" ]; then
|
if [ ! -f "$1" ]; then
|
||||||
echo "error: must specify rooms file"
|
echo "error: must specify rooms file"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
SERVERIP=`cat SERVERIP`
|
SERVERIP=`cat SERVERIP`
|
||||||
HOSTNAME=`hostname`
|
HOSTNAME=`hostname`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue