This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let t1 = 20; // celcius | |
let t2 = 45; // celcius | |
let sgt1 = 2.4167; // eg sg-5°C | |
let sgt2 = 2.4368; | |
let cpgt2 = 1.945; | |
let hgt1 = 613.8; | |
let hgt2 = 649.31; | |
let hft2 = 309.68; | |
let vgt1 = 0.18823; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Enter input video path with extension (Ex. input.mp4)" | |
read input_path | |
echo "Enter output folder (Ex. output)" | |
read output_path | |
mkdir $output_path | |
ffmpeg -hide_banner -y -i $input_path \ | |
-vf scale=w=640:h=360:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 800k -maxrate 856k -bufsize 1200k -b:a 96k -hls_segment_filename $output_path/360p_%03d.ts $output_path/360p.m3u8 \ | |
-vf scale=w=842:h=480:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 1400k -maxrate 1498k -bufsize 2100k -b:a 128k -hls_segment_filename $output_path/480p_%03d.ts $output_path/480p.m3u8 \ |