Script Post Services for Laptop Ministries

Viewing: 1758385487_360p.sh

Try wget https://script.laptopministry.org/uploads/1758385487_360p.sh from the console

Raw File Link

#!/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"
BASH to Home