-
-
Save lifeofguenter/d3e6d50999eac73dd60e to your computer and use it in GitHub Desktop.
Revisions
-
lifeofguenter revised this gist
Jun 21, 2014 . 2 changed files with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -66,7 +66,7 @@ for FILE in *.mkv *.MKV; do done if [ "$RAN" -ne "1"]; then exit $POSTPROCESS_SKIP else exit $POSTPROCESS_SUCCESS fi This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -66,7 +66,7 @@ for FILE in *.avi *.AVI; do done if [ "$RAN" -ne "1"]; then exit $POSTPROCESS_SKIP else exit $POSTPROCESS_SUCCESS fi -
lifeofguenter revised this gist
Jun 21, 2014 . 2 changed files with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -66,7 +66,7 @@ for FILE in *.mkv *.MKV; do done if [ "$RAN" -ne "1"]; then exit $POSTPROCESS_SKIP else exit $POSTPROCESS_SUCCESS fi This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -66,7 +66,7 @@ for FILE in *.avi *.AVI; do done if [ "$RAN" -ne "1"]; then exit $POSTPROCESS_SKIP else exit $POSTPROCESS_SUCCESS fi -
lifeofguenter revised this gist
Jun 21, 2014 . 2 changed files with 0 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,6 @@ ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 POSTPROCESS_ERROR=94 This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,12 +24,6 @@ ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # TODO: # http://nzbget.net/Extension_scripts#Testing_NZBGet_version -
lifeofguenter revised this gist
Jun 21, 2014 . 3 changed files with 96 additions and 30 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,15 +3,16 @@ ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Move files if all daisy-chained PP prior succeeded. # Version: 0.1.0 # # # NOTE: For support visit the forum thread: http://nzbget.net/forum/viewtopic.php?f=8&t=1265 ############################################################################## ### OPTIONS ### # The final directory for post-processed files #FinalDestination=~/downloads/z ### NZBGET POST-PROCESSING SCRIPT ### @@ -28,6 +29,11 @@ if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi # only move files if there was no error prior if [ "$NZBPP_SCRIPTSTATUS" = "FAILURE" ]; then exit $POSTPROCESS_SKIP fi # move complete folder mv "$NZBPP_DIRECTORY" "$NZBPO_FINALDESTINATION" This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,15 +3,36 @@ ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Transcode mkv to mp4 (Sony Bravia compatible). # Version: 0.1.0 # # # NOTE: For support visit the forum thread: http://nzbget.net/forum/viewtopic.php?f=8&t=1265 ############################################################################## ### OPTIONS ### # Full path to ffmpeg executable # # # Example: /usr/bin/ffmpeg # # # If ffmpeg is in your PATH you may leave the path part and set only the executable name (e.g. "ffmpeg") #FfmpegCmd=ffmpeg ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # TODO: # http://nzbget.net/Extension_scripts#Testing_NZBGet_version # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 POSTPROCESS_ERROR=94 @@ -22,24 +43,36 @@ if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi # check for valid executable command -v "$NZBPO_FFMPEGCMD" >/dev/null 2>&1 || { echo >&2 "[ERROR] ffmpeg not found."; exit $POSTPROCESS_ERROR; } # change to working dir cd "$NZBPP_DIRECTORY" # get all avi files RAN=0 for FILE in *.mkv *.MKV; do if [[ ! -e "$FILE" ]]; then continue fi BASENAME=$(basename "$FILE") EXTENSION="${BASENAME##*.}" FILENAME="${BASENAME%.*}" RESULT=`$NZBPO_FFMPEGCMD -y -loglevel error -i "$BASENAME" -c:v copy -c:a libfaac -b:a 192k -ac 2 "$FILENAME.mp4" > /dev/null 2>/dev/stdout` RC=$? if [ "$RC" -ne "0" ]; then echo "[ERROR] $NZBPP_NZBNAME ($BASENAME): $RESULT" exit $POSTPROCESS_ERROR else RAN=1 rm "$FILE" fi done if [ "$RAN" -ne "1"]; then exit $POSTPROCESS_SKIP else exit $POSTPROCESS_SUCCESS fi This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,14 +3,29 @@ ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Transcode xvid to mp4 (Sony Bravia compatible). # Version: 0.1.0 # # # NOTE: For support visit the forum thread: http://nzbget.net/forum/viewtopic.php?f=8&t=1265 ############################################################################## ### OPTIONS ### # Full path to ffmpeg executable # # # Example: /usr/bin/ffmpeg # # # If ffmpeg is in your PATH you may leave the path part and set only the executable name (e.g. "ffmpeg") #FfmpegCmd=ffmpeg ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # TODO: # http://nzbget.net/Extension_scripts#Testing_NZBGet_version # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 @@ -22,24 +37,36 @@ if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi # check for valid executable command -v "$NZBPO_FFMPEGCMD" >/dev/null 2>&1 || { echo >&2 "[ERROR] ffmpeg not found."; exit $POSTPROCESS_ERROR; } # change to working dir cd "$NZBPP_DIRECTORY" # get all avi files RAN=0 for FILE in *.avi *.AVI; do if [[ ! -e "$FILE" ]]; then continue fi BASENAME=$(basename "$FILE") EXTENSION="${BASENAME##*.}" FILENAME="${BASENAME%.*}" RESULT=`$NZBPO_FFMPEGCMD -y -loglevel error -i "$BASENAME" -c:v libx264 -crf 20 -pix_fmt yuv420p -profile:v high -level 4.0 -c:a libfaac -b:a 192k -ac 2 "$FILENAME.mp4" > /dev/null 2>/dev/stdout` RC=$? if [ "$RC" -ne "0" ]; then echo "[ERROR] $NZBPP_NZBNAME ($BASENAME): $RESULT" exit $POSTPROCESS_ERROR else RAN=1 rm "$FILE" fi done if [ "$RAN" -ne "1"]; then exit $POSTPROCESS_SKIP else exit $POSTPROCESS_SUCCESS fi -
lifeofguenter revised this gist
Jun 18, 2014 . 3 changed files with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # only post process 100% ok files if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # only post process 100% ok files if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # only post process 100% ok files if [ "$NZBPP_TOTALSTATUS" != "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi -
lifeofguenter created this gist
Jun 17, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ #!/bin/bash ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Move files... # # Author: Günter Grodotzki <guenter@perlhipster.com> # Version: 2014-05-27 ############################################################################## ### OPTIONS ### # The final destination dir #FinalDestination=~/downloads/z ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # only post process 100% ok files if [ "$NZBPP_PARSTATUS" -ne 2 ] && [ "$NZBPP_UNPACKSTATUS" -ne 2 ]; then exit $POSTPROCESS_SKIP fi # move complete folder mv "$NZBPP_DIRECTORY" "$NZBPO_FINALDESTINATION" exit $POSTPROCESS_SUCCESS This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ #!/bin/bash ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Simple dimple mkv to mp4 conversion (Sony Bravia compatible) # # Author: Günter Grodotzki <guenter@perlhipster.com> # Version: 2014-06-17 ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # only post process 100% ok files if [ "$NZBPP_TOTALSTATUS" -ne "SUCCESS" ]; then exit $POSTPROCESS_SKIP fi # change to working dir cd "$NZBPP_DIRECTORY" # get all avi files for file in *.mkv *.MKV; do if [[ ! -e "$file" ]]; then continue fi basename=$(basename "$file") extension="${basename##*.}" filename="${basename%.*}" ffmpeg -loglevel panic -i "$basename" -c:v copy -c:a libfaac -b:a 192k -ac 2 "$filename.mp4" rm "$file" done exit $POSTPROCESS_SUCCESS This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ #!/bin/bash ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Simple dimple xvid to mp4 conversion (Sony Bravia compatible) # # Author: Günter Grodotzki <guenter@perlhipster.com> # Version: 2014-05-27 ### NZBGET POST-PROCESSING SCRIPT ### ############################################################################## # Exit codes used by NZBGet POSTPROCESS_SUCCESS=93 POSTPROCESS_ERROR=94 POSTPROCESS_SKIP=95 # only post process 100% ok files if [ "$NZBPP_PARSTATUS" -ne 2 ] && [ "$NZBPP_UNPACKSTATUS" -ne 2 ]; then exit $POSTPROCESS_SKIP fi # change to working dir cd "$NZBPP_DIRECTORY" # get all avi files for file in *.avi *.AVI; do if [[ ! -e "$file" ]]; then continue fi basename=$(basename "$file") extension="${basename##*.}" filename="${basename%.*}" ffmpeg -loglevel panic -i "$basename" -c:v libx264 -crf 20 -pix_fmt yuv420p -profile:v high -level 4.0 -c:a libfaac -b:a 192k -ac 2 "$filename.mp4" rm "$file" done exit $POSTPROCESS_SUCCESS