Skip to content

acnicol/python-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-scripts

video_html_generator.py

This script generates an html file based on a directory of mp4 videos. It recursively scans the source directory and generates a thumbnail for each video, uploading them to the dst folder. It creates a simple list of all the videos.

It can be useful to trigger the script when motion videos are uploaded to an FTP server (using watchman or some other file watcher). You can then add the website to other home automation displays, like Home Assistant. In HA, just add an iFrame card and set the url to http://<your_server_ip/index.html.

Install instructions:

  1. Install ffmpeg for your platform
  2. Install python3 and pip3
  3. pip install ffmpy yattag

Usage: python video-html-generator.py --src /var/ftp/uploads --dst /var/www/camsite/

--src is the source folder where you have your videos stored.
--dst is the destination folder where you will host the site.

Note: It is currently hard coded to only support mp4 formats.

About

Python script to scan a folder for videos and generate html

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages