fix YouTube, add dependencies to README

still a buggy implementation for now
This commit is contained in:
soafen 2023-01-14 21:41:57 -08:00
commit ccc392162a
2 changed files with 13 additions and 2 deletions

View file

@ -27,3 +27,14 @@ Right now, WiiNet contains 5 main features.
- Links to other websites that are designed to work on the Wii
That is all for now, stay tuned for more updates on the project by joining the [Discord](https://discord.gg/PBuAbQbrXJ)
### Dependencies
This is an incomplete, flawed list that will hopefully get more acccurate and helpful with time.
We currently use:
- apache2
- php8.1
- php8.1-curl
- ffmpeg
- yt-dlp

View file

@ -8,11 +8,11 @@
$session = rand(1,99);
exec('rm '.$session.'.flv');
exec('pkill -f ffmpeg');
exec('pkill -f youtube-dl');
exec('pkill -f yt-dlp');
exec('rm movie.*');
exec('rm *.part');
$search = $_GET["id"];
$progress = shell_exec('youtube-dl --force-ipv4 -q -o "movie.%(ext)s" --exec "ffmpeg -i {} -ar 22050 -f flv -s 320x240 -ab 32 -threads 4 -filter:v fps=fps=15 -ss 00:00:00 -to 00:05:00 '.$session.'.flv" '.$search.'');
$progress = shell_exec('yt-dlp --force-ipv4 -q -o "movie.%(ext)s" --exec "ffmpeg -i {} -ar 22050 -f flv -s 320x240 -ab 32 -threads 4 -filter:v fps=fps=15 -ss 00:00:00 -to 00:05:00 '.$session.'.flv" '.$search.'');
echo "<div style='text-align:center;'><object type='application/x-shockwave-flash' data='player.swf' width='384' height='256' id='flvplayer' style='visibility: visible;'>";
echo "<param name='id' value='flvplayer'>";
echo "<param name='wmode' value='transparent'>";