···2121 -v, --verbose If you love logs.
2222 -h, --help Show this help message.
23232424- Video/audio formats support FFmpeg options (see $ ffmpeg -h).
2525- Image formats support ImageMagick options (see $ man magick).
2626- Long FFmpeg/ImageMagick arguments need quotes, like "-ac 128k".
2424+ Prefix arguments with - to pass them directly to
2525+ FFmpeg or ImageMagick, like --ac -128k.
2726```
28272928# Formats
+6-7
bin/to
···2222 `cyan -v, --verbose` If you love logs.
2323 `cyan -h, --help` Show this help message.
24242525- Video/audio formats support FFmpeg options (see `yellow $ ffmpeg -h`).
2626- Image formats support ImageMagick options (see `yellow $ man magick`).
2727- Long FFmpeg/ImageMagick arguments need quotes, like `yellow \\"-ac 128k\\"`.
2525+ Prefix arguments with `yellow -` to pass them directly to
2626+ FFmpeg or ImageMagick, like `yellow --ac -128k`.
2827 "
2928}
3029···7372 ;;
7473 -*)
7574 CUSTOM_OPTIONS=true
7676- OPTIONS+=("$ARG")
7575+ OPTIONS+=("${ARG#?}")
7776 ;;
7877 *)
7978 # dont save file if arg is first (aka format)
···198197 NEW_FILE_TEMP="$FILE_WITHOUT_EXT CONVERTING... $((10000 + RANDOM)).$FORMAT"
199198200199 if [[ $CMD == "ffmpeg" ]]; then
201201- ffmpeg -i "$FILE" ${OPTIONS[@]} "$NEW_FILE_TEMP" || { echo `red Error:` Convertion failed; exit 1; }
202202- else
203203- magick ${OPTIONS[@]} "$FILE""[0]" "$NEW_FILE_TEMP" || { echo `red Error:` Convertion failed; exit 1; }
200200+ ffmpeg -i "$FILE" "${OPTIONS[@]}" "$NEW_FILE_TEMP" || { echo `red Error:` Convertion failed; exit 1; }
201201+ elif [[ $CMD == "magick" ]]; then
202202+ magick "${OPTIONS[@]}" "$FILE""[0]" "$NEW_FILE_TEMP" || { echo `red Error:` Convertion failed; exit 1; }
204203 fi
205204206205 COUNT=1