diff --git a/bash/dpx.sh b/bash/dpx.sh new file mode 100755 index 0000000..e3cb939 --- /dev/null +++ b/bash/dpx.sh @@ -0,0 +1,62 @@ +while getopts "n:r:w:b:" opt; do + case ${opt} in + n ) + start_number=$OPTARG + ;; + r ) + frame_rate=$OPTARG + ;; + w ) + imax=$OPTARG + ;; + b ) + imin=$OPTARG + ;; + \? ) + echo "Invalid option: $OPTARG" 1>&2 + ;; + : ) + echo "Invalid option: $OPTARG requires an argument" 1>&2 + ;; + esac +done + +if [ -z "$start_number" ] +then + n=; +else + n='-start_number '$start_number; +fi + +if [ -z "$frame_rate" ] +then + r=; +else + r='-r '$frame_rate; +fi + +if [ -z "$imax" ] +then + w=; +else + w='-vf colorlevels=rimax='$imax':gimax='$imax':bimax='$imax''; +fi + +if [ -z "$imin" ] +then + b=; +else + b=':rimin='$imin':gimin='$imin':bimin='$imin''; +fi + +shift "$(($OPTIND -1))" + + + +for i; + do + output=$(echo $i | sed 's/_%0[[:digit:]]d//'); + ffmpeg $n $r -i "$i" $w$b -f mp4 -c:v libx264 -profile:v main -pix_fmt yuv420p -strict -2 -crf 16 -bf 0 "${output%.*}_h264.mp4" ; +done; +##ffmpeg $n $r -i "$i" $w$b -f mp4 -c:v libx264 -profile:v main -pix_fmt yuv420p -strict -2 -crf 16 -movflags faststart -bf 0 "${output%.*}_h264.mp4" ; +##ffmpeg $n $r -i "$i" $w$b -f mov -c:v prores_ks -profile:v 4444 -pix_fmt yuva444p10le -strict -2 -vendor ap10 "${output%.*}_pr4444.mov" ; diff --git a/bash/getyt.sh b/bash/getyt.sh index 8fbcb34..3c441c4 100755 --- a/bash/getyt.sh +++ b/bash/getyt.sh @@ -3,8 +3,15 @@ qstring="Octonauts Poison Dart Frogs" for i; +<<<<<<< HEAD do temp=$(curl -s $qurl$(echo $i | sed 's/\s/+/g') | grep -o href\=\"\/watch\?v\=[^\"]* | head -1) code=$(echo $temp | sed 's/href\=\"\/watch\>?v\=//') echo $code youtube-dl -f bestvideo+bestaudio "https://www.youtube.com/watch?v="$code +======= + do temp=$(curl -s $qurl$(echo $i | sed 's/\s/+/g') | grep -o href\=\"\/watch\?v\=[^\"]* | head -1) + code=$(echo $temp | sed 's/href\=\"\/watch\>?v\=//') + echo $code + youtube-dl -f bestvideo+bestaudio "https://www.youtube.com/watch?v="$code +>>>>>>> 65bebded8069a0b359ab8c1007a68e2991542aaf done;