Description: This script re-encodes a video to 360 lines of resolution making it ideal for self hosted storage and access as well as fluid playback on older machines.
Date: 2025-10-02 03:58:31
Download command: wget https://doc.laptopministry.org/uploads/1759377511_360.sh
#!/bin/bash
# This script re-encodes a video to 360 lines of resolution making it ideal for self hosted storage and access.
# Check if the input file is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 input_video output_video"
exit 1
fi
input_video="$1"
output_video="$2"
# Use ffmpeg to resize the video to 360p
ffmpeg -i "$input_video" -vf "scale=640:360" -c:a copy "$output_video"
echo "Video has been resized to 360p and saved as $output_video"
Back to Codes