commit 7c74235129cb315a064712739d4ada14c6b9425b Author: Vilyaem Date: Wed Feb 19 06:13:56 2025 -0500 First diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8389dd2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.fslckout +viltube.fossil +*.mp4 +*.webm +*.mkv diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a5aeb2 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# VILTUBE + +A minimalist video hosting solution, written in PHP. If you want to post +videos on the internet with free software, but want something very easy to +setup and something not as big as PeerTube, this is perfect for you! + +# Features +1. Very small and fast! +2. No databases or SQL usage, you just put videos up +3. No login or registration page to be hacked +4. Very customizable +5. Text browser friendly +6. Remove CSS by deleting styling.css + +## The setup +1. Have PHP installed on your webserver and running +2. Clone this repository to a directory your webserver can access +3. Put videos in the videos folder of viltube! + +## Thumbnails + +Put webps of matching name in the thumbs folder, if they arent present +viltube wont serve a thumbnail. + +There is a shell script 'genthumbs.sh' +you can use to generate thumbnails for your videos via ffmpeg. + +## Further improvements + +Anything better than this would be statically generated or just a directory of +videos served by the webserver. + +## LICENSE + +Public Domain CC0 diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..38b4192 Binary files /dev/null and b/favicon.ico differ diff --git a/genthumbs.sh b/genthumbs.sh new file mode 100755 index 0000000..8cd24d9 --- /dev/null +++ b/genthumbs.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Script to generate thumbnails +rm thumbs/*.webp +for video_file in videos/*; do + file_name=$(basename "$video_file") + file_extension="${file_name##*.}" + thumbnail_file="thumbs/${file_name%.*}.webp" + ffmpeg -loglevel 8 -y -i "$video_file" -ss 00:00:30 -vframes 1 -vf "scale=160:-1" -c:v libwebp "$thumbnail_file" + #this one makes animated webp thumbnails + #ffmpeg -loglevel 8 -y -i "$video_file" -vf "setpts=0.6*PTS,scale=iw/8:-1" -c:v libwebp "$thumbnail_file" +done diff --git a/index.php b/index.php new file mode 100644 index 0000000..27d8a9e --- /dev/null +++ b/index.php @@ -0,0 +1,53 @@ + + + + Viltube + + + + +

Viltube

+ Vilyaem's video sharing system. +Featured video'; +echo '

' . basename($randomVideo) . '

'; +echo '
'; +echo ''; +echo '
'; +?> +

Videos

+ +
+Viltube, a video sharing system created by Vilyaem Kenyaz, Viltube is public domain
Donate Monero (XMR): 48Sxa8J6518gqp4WeGtQ4rLe6SctPrEnnCqm6v6ydjLwRPi9Uh9gvVuUsU2AEDw75meTHCNY8KfU6Txysom4Bn5qPKMJ75w
+
+ + diff --git a/styling.css b/styling.css new file mode 100644 index 0000000..7601c55 --- /dev/null +++ b/styling.css @@ -0,0 +1,19 @@ +body { +/* + margin-bottom:350px; + margin-right:300px; + margin-left:300px; +*/ + color:#C0C8FF; + background:#1A1A1A; + font-family:Courier New,monospace; +} +a{ + color:#D3DAFF; +} +table, tr, th{ + border: 1px solid #C0C8FF; +} +h1{ + color:#C0C8FF; +} diff --git a/thumbs/If.webp b/thumbs/If.webp new file mode 100644 index 0000000..31861ee Binary files /dev/null and b/thumbs/If.webp differ diff --git a/video.php b/video.php new file mode 100644 index 0000000..95cb97a --- /dev/null +++ b/video.php @@ -0,0 +1,55 @@ + + + + Viltube Video + + + + +

Viltube

+ This is where Vilyaem shares videos. +' . $video . ''; + echo '
'; + echo '
'; + echo 'Download video'; + echo '
'; +} else { + echo '

Invalid video file.

'; +} +?> +

More videos

+ +
+Viltube, a video sharing system created by Vilyaem Kenyaz, Viltube is free and open source software licensed under the CFSL
Donate Monero (XMR): 48Sxa8J6518gqp4WeGtQ4rLe6SctPrEnnCqm6v6ydjLwRPi9Uh9gvVuUsU2AEDw75meTHCNY8KfU6Txysom4Bn5qPKMJ75w
+
+ + diff --git a/videos/README.txt b/videos/README.txt new file mode 100644 index 0000000..c3f6a16 --- /dev/null +++ b/videos/README.txt @@ -0,0 +1 @@ +You put videos here.