DOC Post Services for Laptop Ministries

Site Logo
Documents Code Admin Login

1759377511_360.sh

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.

Download File

Try wget https://doc.laptopministry.org/uploads/1759377511_360.sh from the console

#!/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