videocap 0.0.1a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- videocap/__init__.py +2 -0
- videocap/__main__.py +33 -0
- videocap/app.py +711 -0
- videocap/checksum.py +27 -0
- videocap/collection.py +69 -0
- videocap/config.py +171 -0
- videocap/hardware.py +278 -0
- videocap/profiles/generic.conf +7 -0
- videocap/profiles/usblive2-e1.conf +22 -0
- videocap/queue.py +469 -0
- videocap/recording.py +261 -0
- videocap/static/index.html +492 -0
- videocap/web.py +85 -0
- videocap-0.0.1a1.dist-info/METADATA +247 -0
- videocap-0.0.1a1.dist-info/RECORD +19 -0
- videocap-0.0.1a1.dist-info/WHEEL +5 -0
- videocap-0.0.1a1.dist-info/entry_points.txt +2 -0
- videocap-0.0.1a1.dist-info/licenses/LICENSE +674 -0
- videocap-0.0.1a1.dist-info/top_level.txt +1 -0
videocap/__init__.py
ADDED
videocap/__main__.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""python3 -m videocap [--conf FILE]: run the capture station (as root, usually from systemd)."""
|
|
2
|
+
import argparse
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
from . import __version__
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
ap = argparse.ArgumentParser(prog="videocap", description="Unattended analog video capture station.")
|
|
10
|
+
ap.add_argument("--conf", help="settings file (default /etc/videocap/videocap.conf, or $VIDEOCAP_CONF)")
|
|
11
|
+
ap.add_argument("--check", action="store_true", help="print the settings in effect and what's plugged in, then exit")
|
|
12
|
+
ap.add_argument("--version", action="version", version="videocap " + __version__)
|
|
13
|
+
a = ap.parse_args()
|
|
14
|
+
if a.conf:
|
|
15
|
+
os.environ["VIDEOCAP_CONF"] = a.conf
|
|
16
|
+
from . import config, hardware # after VIDEOCAP_CONF is set
|
|
17
|
+
if a.check:
|
|
18
|
+
conf = config.load(a.conf)
|
|
19
|
+
for k in sorted(conf):
|
|
20
|
+
print("%s=%s" % (k, conf[k]))
|
|
21
|
+
for k in config.unknown_keys(conf):
|
|
22
|
+
print("# unknown setting: %s" % k)
|
|
23
|
+
dev = hardware.find_video(conf)
|
|
24
|
+
print("# capture device:", dev and "%s (%s)" % (dev[2], dev[0]) or "none found")
|
|
25
|
+
print("# audio:", (dev and hardware.find_audio(conf, dev[1])) or "none found")
|
|
26
|
+
return
|
|
27
|
+
os.makedirs(config.RUN, exist_ok=True)
|
|
28
|
+
from .app import App
|
|
29
|
+
App(a.conf).run()
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
main()
|