mirror of
https://github.com/openvk/openvk
synced 2025-07-08 16:53:02 +03:00
Videos now use H.264 instead of Theora
hazbin hotel nude mo а вообще тут мог бы быть AV1, но пидорасы из купертино фанаты libx264
This commit is contained in:
parent
b8a45713da
commit
9b6c72ff76
3 changed files with 3 additions and 3 deletions
|
@ -13,7 +13,7 @@ class Video extends Media
|
||||||
const TYPE_EMBED = 1;
|
const TYPE_EMBED = 1;
|
||||||
|
|
||||||
protected $tableName = "videos";
|
protected $tableName = "videos";
|
||||||
protected $fileExtension = "ogv";
|
protected $fileExtension = "mp4";
|
||||||
|
|
||||||
protected $processingPlaceholder = "video/rendering";
|
protected $processingPlaceholder = "video/rendering";
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Move-Item $file $temp
|
||||||
|
|
||||||
# video stub logic was implicitly deprecated, so we start processing at once
|
# video stub logic was implicitly deprecated, so we start processing at once
|
||||||
ffmpeg -i $temp -ss 00:00:01.000 -vframes 1 "$dir$hashT/$hash.gif"
|
ffmpeg -i $temp -ss 00:00:01.000 -vframes 1 "$dir$hashT/$hash.gif"
|
||||||
ffmpeg -i $temp -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y $temp2
|
ffmpeg -i $temp -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y $temp2
|
||||||
|
|
||||||
Move-Item $temp2 "$dir$hashT/$hash.ogv"
|
Move-Item $temp2 "$dir$hashT/$hash.ogv"
|
||||||
Remove-Item $temp
|
Remove-Item $temp
|
||||||
|
|
|
@ -5,7 +5,7 @@ cp ../files/video/rendering.apng $3${4:0:2}/$4.gif
|
||||||
cp ../files/video/rendering.ogv $3/${4:0:2}/$4.ogv
|
cp ../files/video/rendering.ogv $3/${4:0:2}/$4.ogv
|
||||||
|
|
||||||
nice ffmpeg -i "/tmp/vid_$tmpfile.bin" -ss 00:00:01.000 -vframes 1 $3${4:0:2}/$4.gif
|
nice ffmpeg -i "/tmp/vid_$tmpfile.bin" -ss 00:00:01.000 -vframes 1 $3${4:0:2}/$4.gif
|
||||||
nice -n 20 ffmpeg -i "/tmp/vid_$tmpfile.bin" -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y "/tmp/ffmOi$tmpfile.ogv"
|
nice -n 20 ffmpeg -i "/tmp/vid_$tmpfile.bin" -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y "/tmp/ffmOi$tmpfile.mp4"
|
||||||
|
|
||||||
rm -rf $3${4:0:2}/$4.ogv
|
rm -rf $3${4:0:2}/$4.ogv
|
||||||
mv "/tmp/ffmOi$tmpfile.ogv" $3${4:0:2}/$4.ogv
|
mv "/tmp/ffmOi$tmpfile.ogv" $3${4:0:2}/$4.ogv
|
||||||
|
|
Loading…
Reference in a new issue