14 Commits

Author SHA1 Message Date
b75e4b270b Basically a stash... 2021-12-11 23:00:00 -05:00
a054e368cb Bump holes 2021-11-29 00:46:19 -05:00
db1a261012 Create bottom layer for station2 stack 2021-11-28 23:27:16 -05:00
7b318831f2 Move filesystem 2021-11-28 23:06:16 -05:00
48c532a81c Add test-pattern 2021-11-28 16:42:12 -05:00
c302674958 Attempt stream! 2021-11-27 21:49:48 -05:00
c2df56e15e Add magic debug values via cli 2021-11-27 21:32:52 -05:00
93fd03e717 Implement fixes suggested by jinsun on irc 2021-11-27 21:28:07 -05:00
3682fc1448 Boilerplate RS code 2021-11-27 21:13:20 -05:00
f67379f85d Final bleh 2021-11-27 16:54:52 -05:00
ac4ff7a657 Boilerplate 2021-11-27 16:52:55 -05:00
e94f342739 Shuffle it all up 2021-11-27 16:25:55 -05:00
e421634432 Stay up to date 2021-11-27 16:03:37 -05:00
fba81ef345 Add ability to log remote 2021-11-27 16:03:20 -05:00
22 changed files with 117 additions and 38 deletions

Binary file not shown.

View File

@@ -1,31 +0,0 @@
import time
import logging
import verboselogs
import coloredlogs
verboselogs.install()
# Create a logger object.
logger = logging.getLogger(__name__)
# By default the install() function installs a handler on the root logger,
# this means that log messages from your code and log messages from the
# libraries that you use will all show up on the terminal.
#coloredlogs.install(level='DEBUG')
# If you don't want to see log messages from libraries, you can pass a
# specific logger object to the install() function. In this case only log
# messages originating from that logger will show up on the terminal.
coloredlogs.install(level='INFO', logger=logger)
logger.info('Lewis Companion Software Started.')
logger.success('Ready to robot!')
# Junk~
while True:
try:
logger.debug('Nothing to do.')
time.sleep(1)
except KeyboardInterrupt:
break

View File

@@ -1,7 +0,0 @@
#!/bin/bash
cd /opt/lewis-crawler/companion_software/dashboard
pipenv install -r requirements.txt
pipenv run python dash.py

View File

@@ -0,0 +1,9 @@
#!/bin/bash
cd /opt/lewis-crawler/companion_software
git pull
pipenv install -r requirements.txt
pipenv run python -m houston -v

View File

@@ -0,0 +1,43 @@
# Lewis Crawler
# 2021 - 2022
# Kitsune Scientific
import logging
import argparse
import verboselogs
import coloredlogs
from houston.houston import Houston
# Get debug args
parser = argparse.ArgumentParser()
parser.add_argument(
'-d', '--debug',
help="Print lots of debugging statements",
action="store_const", dest="loglevel", const='DEBUG',
default='WARNING',
)
parser.add_argument(
'-v', '--verbose',
help="Be verbose",
action="store_const", dest="loglevel", const='INFO',
)
args = parser.parse_args()
# Install verbose logs
verboselogs.install()
# Create a logger object.
logger = logging.getLogger('Houston_Log')
# Install colored logs
coloredlogs.install(level=args.loglevel,
logger=logger,
fmt='%(asctime)s,%(msecs)03d %(hostname)s %(levelname)s %(message)s') # noqa: E501
logger.info('Lewis Companion Software Started.')
if __name__ == '__main__':
app = Houston(logger)
app.run()

View File

@@ -0,0 +1,30 @@
# Lewis Crawler
# 2021 - 2022
# Kitsune Scientific
import time
from houston.robotstreamer.streamer import RobotStreamer
class Houston:
def __init__(self, logger):
# Setup logger
self.log = logger
# Setup robotstreamer
self.rs = RobotStreamer(self.log)
# We're ready to go!
self.log.success('Ready to robot!')
def run(self):
self.rs.run()
# Junk~
while True:
try:
self.log.debug('Nothing to do.')
time.sleep(1)
except KeyboardInterrupt:
break

View File

@@ -0,0 +1,3 @@
# Lewis Crawler
# 2021 - 2022
# Kitsune Scientific

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@@ -0,0 +1 @@
ffmpeg -f image2 -loop 1 -framerate 25 -video_size 1280x720 -r 25 -i Test-Pattern.jpg -vcodec libx264 -profile:v main -preset:v medium -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -b:v 2500k -maxrate 2500k -bufsize 2500k -sws_flags lanczos+accurate_rnd -acodec aac -b:a 96k -ar 48000 -ac 2 -f flv -maxrate 55k "rtmp://rtmp.robotstreamer.com/live/4619?key=jEquBubjizYDMQNe8nKjLdu88iqFpNe3sVQmGRJ2tzbxd4QJrkSSEZBQhi9UTL3k"

View File

@@ -0,0 +1,30 @@
# Lewis Crawler
# 2021 - 2022
# Kitsune Scientific
import ffmpeg
class RobotStreamer:
def __init__(self, logger):
self.log = logger
def run(self):
self.log.debug('Running RobotStreamer')
stream = ffmpeg.input(
'houston/robotstreamer/resources/Test-Pattern.jpg',
f='image2',
loop='1',
framerate=25,
video_size='1280x720')
stream = ffmpeg.output(
stream,
'http://robotstreamer.com/<secret>/1280/720',
f='mpegts',
bf=0,
muxdelay=0.001,
codec='mpeg1video')
ffmpeg.run(stream)

View File

@@ -1,2 +1,3 @@
coloredlogs
verboselogs
ffmpeg-python