Skip to content

jwd83/VCR

Repository files navigation

VCR

oǝpᴉɅ ʎʇᴉϽ ɹǝʌᴉꓤ

A single file PHP script for WAMP to share and encode queue your local files online along with Python daemons to process said reencode requests.

VCR

Features

  • PHP single file front end for viewing and managing your media WAMP/XAMPP
  • Python single file background daemon to handle h264/h265 video and .opus audio reencoding requests
    • Opus reencodes to 48kbps per channel with 96k minimum.
      • 96k stereo audio
      • 192k quadrophonic
      • 384k octophonic
  • What's New page show's latest file additions
  • re-container video files to mp4 container (may fix playback in some browsers. new files end in .re.mp4)
  • Autoplay your collection of audio and video files where supported by your browser.
  • Download shared files remotely.
  • Next and Previous buttons while in watch or listen mode
  • Precache next file to speed up track switching in listen mode (pre-caching starts after 10s on a listen page)
  • Randomly selected background image for header in settings. Can use single list element for static
  • Link to timestamp in video using t= in URL
  • Can use realtime filesystem data for simple setup or MariaDB/MySQL backend for enhanced performance

Requirements

Setup Notes

running the python daemon on 1 or more machines

On one machine that will do everything:

python daemon.py -s -u -q

On machine that will watch the filesystem:

python daemon.py -s -u

On the machine that will perform encoding:

python daemon.py -q

sshd_config

If you are using a reverse SSH tunnel to bring your server online make sure change "GatewayPorts no" to "GatewayPorts yes", it may need to be uncommented (remove leading # from line)

add VCR user

While at a command prompt at "C:\wamp64\bin\apache\apache2.4.41\bin" (or the like)

htpasswd "c:\wamp64\gdlogins" user_name_here

TODO

  • look into quicksync realtime video encoding/streaming
  • perhaps depricate filesystem operation.
    • this woudl save a decent amount of codespace and cleanup the php and python a bit
  • change daemon to replace into/delete instead of dumping/recreating the table
  • improve the performance of the new filesystem monitor
  • update .conf notes based on new XAMPP setup
  • show popular searches in the landing page for each category
  • add support for encoding audiobooks
  • support intel SVT encoder
    • h265, av1, vp9?
  • add advanced encoding toggles (like the 5.1 remap)
  • log encoding result if possible?
  • detect 5.1 and change encoding options when necessary (libopus/av1/vp9 i'm looking at you)
    • command += "-af "channelmap=channel_layout=5.1"" # 5.1 fix... https://trac.ffmpeg.org/ticket/5718 yikes 4 years running bug in libopus
    • make this a configurable option in video and audio transode... add audio transcode?
  • add a view that display ffprobe output about a file
  • add file-based queue support to daemon.py
  • categories on links page?
  • maybe make all categories and generalized config data in config.json.
  • setup dynamic DNS
  • Switch to https from http. Lets encrypt or self signed
  • look at directly converting to opus on demand
  • look into gapless queueing of audio tracks. precaching and redirect helps but perhaps make the player page more ajaxy
  • custom playlists/ search while playing
  • Look into RTMP live streaming/encoding video/audio realtime.
  • Pick random jpg file from /img/ to use as header image
  • cleanup code to use URL_BASE
  • if the queue files are empty don't rewrite them
  • add link timestamp into audio as well as video
  • better tagline(s)
  • look into qbt integration. submit magnet -> python daemon feeds to qbt web ?