Updated Bootstrap, added NTFY, updated player, misc.

This commit is contained in:
itdominator 2023-02-25 01:19:54 -06:00
parent fddcc3a266
commit d8724eaf5a
1739 changed files with 18528 additions and 279 deletions
src/core
__builtins__.pyconfig.py
routes
static/css/libs/bootstrap-icons
123.svgactivity.svgalarm-fill.svgalarm.svgalign-bottom.svgalign-center.svgalign-end.svgalign-middle.svgalign-start.svgalign-top.svgalt.svgapp-indicator.svgapp.svgapple.svgarchive-fill.svgarchive.svgarrow-90deg-down.svgarrow-90deg-left.svgarrow-90deg-right.svgarrow-90deg-up.svgarrow-bar-down.svgarrow-bar-left.svgarrow-bar-right.svgarrow-bar-up.svgarrow-clockwise.svgarrow-counterclockwise.svgarrow-down-circle-fill.svgarrow-down-circle.svgarrow-down-left-circle-fill.svgarrow-down-left-circle.svgarrow-down-left-square-fill.svgarrow-down-left-square.svgarrow-down-left.svgarrow-down-right-circle-fill.svgarrow-down-right-circle.svgarrow-down-right-square-fill.svgarrow-down-right-square.svgarrow-down-right.svgarrow-down-short.svgarrow-down-square-fill.svgarrow-down-square.svgarrow-down-up.svgarrow-down.svgarrow-left-circle-fill.svgarrow-left-circle.svgarrow-left-right.svgarrow-left-short.svgarrow-left-square-fill.svgarrow-left-square.svgarrow-left.svgarrow-repeat.svgarrow-return-left.svgarrow-return-right.svgarrow-right-circle-fill.svgarrow-right-circle.svgarrow-right-short.svgarrow-right-square-fill.svgarrow-right-square.svgarrow-right.svgarrow-through-heart-fill.svgarrow-through-heart.svgarrow-up-circle-fill.svgarrow-up-circle.svgarrow-up-left-circle-fill.svgarrow-up-left-circle.svgarrow-up-left-square-fill.svgarrow-up-left-square.svgarrow-up-left.svgarrow-up-right-circle-fill.svgarrow-up-right-circle.svgarrow-up-right-square-fill.svgarrow-up-right-square.svgarrow-up-right.svgarrow-up-short.svgarrow-up-square-fill.svgarrow-up-square.svgarrow-up.svgarrows-angle-contract.svgarrows-angle-expand.svgarrows-collapse.svgarrows-expand.svgarrows-fullscreen.svgarrows-move.svgaspect-ratio-fill.svgaspect-ratio.svgasterisk.svgat.svgaward-fill.svgaward.svgback.svgbackspace-fill.svgbackspace-reverse-fill.svgbackspace-reverse.svgbackspace.svgbadge-3d-fill.svgbadge-3d.svgbadge-4k-fill.svg

View File

@ -62,31 +62,50 @@ builtins.json_message = MessageHandler()
# NOTE: Need threads defined before instantiating
def _start_rtsp_server():
PATH = f"{ROOT_FILE_PTH}/utils/rtsp-server"
RAMFS = "/dev/shm/webfm"
SYMLINK = f"{PATH}/m3u8_stream_files"
def _start_rtsp_and_ntfy_server():
PATH = f"{ROOT_FILE_PTH}/utils"
RTSP_PATH = f"{PATH}/rtsp-server"
NTFY_PATH = f"{PATH}/ntfy"
if not os.path.exists(PATH) or not os.path.exists(f"{PATH}/rtsp-simple-server"):
RAMFS = "/dev/shm/webfm"
SYMLINK = app.config['REMUX_FOLDER']
if not os.path.exists(RTSP_PATH) or not os.path.exists(f"{RTSP_PATH}/rtsp-simple-server"):
msg = f"\n\nAlert: Reference --> https://github.com/aler9/rtsp-simple-server/releases" + \
f"\nPlease insure {PATH} exists and rtsp-simple-server binary is there.\n\n"
f"\nPlease insure {RTSP_PATH} exists and rtsp-simple-server binary is there.\n\n"
raise BuiltinsException(msg)
if not os.path.exists(NTFY_PATH) or not os.path.exists(f"{NTFY_PATH}/ntfy"):
msg = f"\n\nAlert: Reference --> https://ntfy.sh/" + \
f"\nPlease insure {NTFY_PATH} exists and ntfy binary is there.\n\n"
raise BuiltinsException(msg)
if not os.path.exists(RAMFS):
os.mkdir(RAMFS)
if not os.path.exists(f"{PATH}/m3u8_stream_files"):
if not os.path.exists(SYMLINK):
os.symlink(RAMFS, SYMLINK)
@daemon_threaded
def _start_rtsp_server_threaded():
os.chdir(PATH)
os.chdir(RTSP_PATH)
command = ["./rtsp-simple-server", "./rtsp-simple-server.yml"]
process = subprocess.Popen(command)
process.wait()
@daemon_threaded
def _start_ntfy_server_threaded():
os.chdir(NTFY_PATH)
command = ["./ntfy", "serve", "--behind-proxy", "--listen-http", ":7777"]
process = subprocess.Popen(command)
process.wait()
_start_ntfy_server_threaded()
_start_rtsp_server_threaded()
_start_rtsp_server()
_start_rtsp_and_ntfy_server()
@ -140,9 +159,10 @@ def _get_stream(video_path=None, stream_target=None):
# Yes, the process probably should give us info we can process when failure occures.
command = [
"ffmpeg", "-nostdin", "-fflags", "+genpts", "-hwaccel", "cuda",
# --preset ultrafast --threads 1
"-stream_loop", "1", "-i", video_path, "-strict", "experimental",
"-vcodec", "copy", "-acodec", "copy", "-f", "rtsp",
"-rtsp_transport", "udp", stream_target
"-rtsp_transport", "tcp", stream_target
]
# command = [

View File

@ -43,7 +43,7 @@ class Config(object):
# We are overiding some of the the shellmen view settings with these to make it all work with flask.
# These are passed along to the shellmen view from the Routes file upon the window controller creation.
ABS_THUMBS_PTH = f"{STATIC_FPTH}/imgs/thumbnails" # Used for thumbnail generation
ABS_THUMBS_PTH = f"{STATIC_FPTH}/imgs/thumbnails" # Used for thumbnail generation
REMUX_FOLDER = f"{STATIC_FPTH}/remuxs" # Remuxed files folder
FFMPG_THUMBNLR = f"{STATIC_FPTH}/ffmpegthumbnailer" # Thumbnail generator binary

View File

@ -111,7 +111,10 @@ def file_manager_action(_type, _hash = None):
_video_path = fpath
_stub = f"{_hash}{_sub_uuid}"
_rtsp_path = f"rtsp://www.{app_name.lower()}.com:8554/{_stub}"
_rtmp_path = f"rtmp://www.{app_name.lower()}.com:1935/{_stub}"
_hls_path = f"http://www.{app_name.lower()}.com:8888/{_stub}/"
_webrtc_path = f"http://www.{app_name.lower()}.com:8889/{_stub}/"
_stream_target = _rtsp_path
stream = get_stream(_video_path, _stream_target)
@ -119,7 +122,7 @@ def file_manager_action(_type, _hash = None):
msg = "Streaming: Setting up stream failed! Please try again..."
return json_message.create("danger", msg)
_stream_target = _webrtc_path
_stream_target = _rtmp_path
return {"stream": _stream_target}
# NOTE: Positionally protecting actions further down that are privlidged

View File

Before

(image error) Size: 870 B

After

(image error) Size: 870 B

View File

Before

(image error) Size: 367 B

After

(image error) Size: 367 B

View File

Before

(image error) Size: 711 B

After

(image error) Size: 711 B

View File

Before

(image error) Size: 326 B

After

(image error) Size: 326 B

View File

Before

(image error) Size: 282 B

After

(image error) Size: 282 B

View File

Before

(image error) Size: 1.5 KiB

After

(image error) Size: 1.5 KiB

View File

Before

(image error) Size: 401 B

After

(image error) Size: 401 B

View File

Before

(image error) Size: 309 B

After

(image error) Size: 309 B

View File

Before

(image error) Size: 358 B

After

(image error) Size: 358 B

View File

Before

(image error) Size: 787 B

After

(image error) Size: 787 B

View File

Before

(image error) Size: 649 B

After

(image error) Size: 649 B

View File

Before

(image error) Size: 319 B

After

(image error) Size: 319 B

View File

Before

(image error) Size: 860 B

After

(image error) Size: 860 B

Some files were not shown because too many files have changed in this diff Show More