-
-
Save typomedia/8555963 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# Copyright 2014 Typomedia Foundation. All rights reserved. | |
# Released under GPL version 3. | |
# | |
# FFMPEG Transcoder Script v1.2 | |
PATH=/opt/local/sbin:/opt/local/bin:$PATH | |
INPUT=/mnt/media/Movies | |
FTYPE=*.1080.rip.mkv | |
# check if script is not running | |
if ! ps x | grep '[/]ffmpeg.h264.1080.sh' > /dev/null | |
cd $INPUT | |
# Transcode all files with the specified FTYPE | |
for FILE in $FTYPE | |
# transcode and crop video stream and copy all audio streams + subtitles | |
do ffmpeg -i "$FILE" -filter:v crop=1920:800:0:140 -map 0 -c:v libx264 \ | |
-preset slow -crf 20 -c:a copy -c:s copy "${FILE%%.*}.mkv" | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here you can find more infos about how to crop different sizes of a video:
http://www.ffmpeg.org/ffmpeg-filters.html#toc-Examples-6