-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
148 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
TMPLEVEL=$1 | ||
TMPCHANGE=$2 | ||
|
||
DIRECTORY=$3 | ||
INPUTFILE=$4 | ||
ARTLOCATION=$5 | ||
OUTPUTFILE=$6 | ||
|
||
echo "Adding cover art" | ||
|
||
if [ "$TMPCHANGE" = true ]; then | ||
if [ "$TMPLEVEL" > 2 ]; then | ||
ffmpeg -i "$DIRECTORY/2TMP$OUTPUTFILE" -i "$ARTLOCATION" -map 1 -map 0 -c copy -disposition:0 attached_pic -loglevel warning "$DIRECTORY/$OUTPUTFILE" | ||
elif [ "$TMPLEVEL" = 2 ]; then | ||
ffmpeg -i "$DIRECTORY/TMP$OUTPUTFILE" -i "$ARTLOCATION" -map 1 -map 0 -c copy -disposition:0 attached_pic -loglevel warning "$DIRECTORY/$OUTPUTFILE" | ||
fi | ||
else | ||
ffmpeg -i "$DIRECTORY/$INPUTFILE" -i "$ARTLOCATION" -c copy -map 1 -map 0 -disposition:0 attached_pic "$DIRECTORY/$OUTPUTFILE" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
TMPLEVEL=$1 | ||
|
||
DIRECTORY=$2 | ||
INPUTFILE=$3 | ||
TITLE=$4 | ||
DATE=$5 | ||
GENRE=$6 | ||
SHOW=$7 | ||
SEASON=$8 | ||
EPISODE=$9 | ||
LANGUAGE=${10} | ||
QUALTIY=${11} | ||
OUTPUTFILE=${12} | ||
|
||
echo "Adding metadata" | ||
|
||
if [ "$TMPLEVEL" > 1 ]; then | ||
ffmpeg -i "$DIRECTORY/$INPUTFILE" -c copy -c:s mov_text -metadata title="$TITLE" -metadata date="$DATE" -metadata genre="$GENRE" -metadata show="$SHOW" -metadata season_number="$SEASON" -metadata episode_id="$EPISODE" -metadata episode_sort="$EPISODE" -metadata language="$LANGUAGE" -metadata hd_video="$QUALTIY" -loglevel warning "$DIRECTORY/TMP$OUTPUTFILE" | ||
else | ||
ffmpeg -i "$DIRECTORY/$INPUTFILE" -c copy -c:s mov_text -metadata title="$TITLE" -metadata date="$DATE" -metadata genre="$GENRE" -metadata show="$SHOW" -metadata season_number="$SEASON" -metadata episode_id="$EPISODE" -metadata episode_sort="$EPISODE" -metadata language="$LANGUAGE" -metadata hd_video="$QUALTIY" -loglevel warning "$DIRECTORY/$OUTPUTFILE" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
DIRECTORY=$1 | ||
OUTPUTFILE=$2 | ||
|
||
echo "Removing temp files" | ||
|
||
find $DIRECTORY -name "*TMP$OUTPUTFILE" -type f -exec rm -v {} \; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
TMPLEVEL=$1 | ||
TMPCHANGE=$2 | ||
|
||
DIRECTORY=$3 | ||
INPUTFILE=$4 | ||
SUBTITLE=$5 | ||
SUBTITLELANGUAGE=$6 | ||
OUTPUTFILE=$7 | ||
|
||
echo "Adding Subtitles" | ||
|
||
if [ "$TMPCHANGE" = true ]; then | ||
if [ "$TMPLEVEL" > 2 ]; then | ||
ffmpeg -i "$DIRECTORY/TMP$OUTPUTFILE" -i "$SUBTITLE" -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:0 language="$SUBTITLELANGUAGE" -loglevel warning "$DIRECTORY/2TMP$OUTPUTFILE" | ||
else | ||
ffmpeg -i "$DIRECTORY/TMP$OUTPUTFILE" -i "$SUBTITLE" -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:0 language="$SUBTITLELANGUAGE" -loglevel warning "$DIRECTORY/$OUTPUTFILE" | ||
fi | ||
else | ||
if [ "$TMPLEVEL" > 1 ]; then | ||
ffmpeg -i "$DIRECTORY/$INPUTFILE" -i "$SUBTITLE" -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:0 language="$SUBTITLELANGUAGE" -loglevel warning "$DIRECTORY/TMP$OUTPUTFILE" | ||
else | ||
ffmpeg -i "$DIRECTORY/$INPUTFILE" -i "$SUBTITLE" -map 0 -map 1 -c copy -c:s mov_text -metadata:s:s:0 language="$SUBTITLELANGUAGE" -loglevel warning "$DIRECTORY/$OUTPUTFILE" | ||
fi | ||
fi |
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