Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Check if an input file is provided
- if [[ $# -eq 0 ]]; then
- echo "Usage: $0 <input_mp4_file> [framerate]"
- exit 1
- fi
- # Get the input file name
- input_file=$1
- # Get the framerate (default to 30 if not provided)
- framerate=${2:-30}
- # Validate the framerate
- if [[ "$framerate" != "30" && "$framerate" != "60" ]]; then
- echo "Invalid framerate. Must be 30 or 60."
- exit 1
- fi
- # Get the output file name (same as input but with .mov extension)
- output_file="${input_file%.mp4}.mov"
- # Use ffmpeg to convert the MP4 file to MOV with the specified framerate
- ffmpeg -i "$input_file" -vcodec dnxhd -acodec pcm_s16le \
- -s 1920x1080 -r "$framerate" -b:v 36M -pix_fmt yuv422p \
- -f mov "$output_file"
- echo "Conversion completed. Output file: $output_file"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement