One-liners: Difference between revisions

From Sasara
Jump to navigationJump to search
Created page with "==Audio/visual== ===Best FLAC=== $ flac --best --delete-input-file --keep-foreign-metadata --preserve-modtime --verify "$AUDIO" ===Best MP3 with CBR=== $ lame -b 320 -q 0 --cbr "$AUDIO" ===Best MP3 with VBR=== $ lame -b 320 -q 0 -V 0 "$AUDIO" ===Fade image to white background=== $ convert $1 -alpha on -channel a -evaluate set 20% out.png ===Flip image horizontally=== $ convert $IMAGE -flop $OUTPUT ===Flip image vertically=== $ convert $IMAGE -flip $OUTPUT ===Incre..."
 
Line 2: Line 2:


===Best FLAC===
===Best FLAC===
$ flac --best --delete-input-file --keep-foreign-metadata --preserve-modtime --verify "$AUDIO"
$ flac --best --delete-input-file --keep-foreign-metadata --preserve-modtime --verify "$AUDIO"


===Best MP3 with CBR===
===Best MP3 with CBR===
$ lame -b 320 -q 0 --cbr "$AUDIO"
$ lame -b 320 -q 0 --cbr "$AUDIO"


===Best MP3 with VBR===
===Best MP3 with VBR===
$ lame -b 320 -q 0 -V 0 "$AUDIO"
$ lame -b 320 -q 0 -V 0 "$AUDIO"


===Fade image to white background===
===Fade image to white background===
$ convert $1 -alpha on -channel a -evaluate set 20% out.png
$ convert $1 -alpha on -channel a -evaluate set 20% out.png


===Flip image horizontally===
===Flip image horizontally===
$ convert $IMAGE -flop $OUTPUT
$ convert $IMAGE -flop $OUTPUT


===Flip image vertically===
===Flip image vertically===
$ convert $IMAGE -flip $OUTPUT
$ convert $IMAGE -flip $OUTPUT


===Increase video volume===
===Increase video volume===
$ ffmpeg -i "$VIDEO" -filter:a "volume=4.0" "out.$VIDEO"
$ ffmpeg -i "$VIDEO" -filter:a "volume=4.0" "out.$VIDEO"


===Merge incomplete yt-dlp===
===Merge incomplete yt-dlp===
$ ffmpeg -i "$VIDEO" -i "$AUDIO" "$OUT.mp4" && AtomicParsley "$OUT.mp4" --artwork "$THUMB.png"
$ ffmpeg -i "$VIDEO" -i "$AUDIO" "$OUT.mp4" && AtomicParsley "$OUT.mp4" --artwork "$THUMB.png"


===Optimal PNG===
===Optimal PNG===
$ pngcrush -blacken -check -fix -oldtimestamp -ow -reduce -speed -v "$IMG"
$ pngcrush -blacken -check -fix -oldtimestamp -ow -reduce -speed -v "$IMG"


===Retina/2x HiDPI export===
===Retina/2x HiDPI export===
$ convert -units PixelsPerInch -density 192 "$TARGET"
$ convert -units PixelsPerInch -density 192 "$TARGET"


===Remove EXIF data===
===Remove EXIF data===
$ exiftool -all= "$TARGET"
$ exiftool -all= "$TARGET"


===Rotate video counter-clockwise===
===Rotate video counter-clockwise===
$ ffmpeg -i "$VIDEO" -vf 'transpose=3' -c:a copy "out.$VIDEO"
$ ffmpeg -i "$VIDEO" -vf 'transpose=3' -c:a copy "out.$VIDEO"


===Rotate video clockwise===
===Rotate video clockwise===
$ ffmpeg -i "$VIDEO" -vf 'transpose=1' -c:a copy "out.$VIDEO"
$ ffmpeg -i "$VIDEO" -vf 'transpose=1' -c:a copy "out.$VIDEO"


[[Category:Tech]]
[[Category:Tech]]

Revision as of 12:05, 2 March 2026

Audio/visual

Best FLAC

$ flac --best --delete-input-file --keep-foreign-metadata --preserve-modtime --verify "$AUDIO"

Best MP3 with CBR

$ lame -b 320 -q 0 --cbr "$AUDIO"

Best MP3 with VBR

$ lame -b 320 -q 0 -V 0 "$AUDIO"

Fade image to white background

$ convert $1 -alpha on -channel a -evaluate set 20% out.png

Flip image horizontally

$ convert $IMAGE -flop $OUTPUT

Flip image vertically

$ convert $IMAGE -flip $OUTPUT

Increase video volume

$ ffmpeg -i "$VIDEO" -filter:a "volume=4.0" "out.$VIDEO"

Merge incomplete yt-dlp

$ ffmpeg -i "$VIDEO" -i "$AUDIO" "$OUT.mp4" && AtomicParsley "$OUT.mp4" --artwork "$THUMB.png"

Optimal PNG

$ pngcrush -blacken -check -fix -oldtimestamp -ow -reduce -speed -v "$IMG"

Retina/2x HiDPI export

$ convert -units PixelsPerInch -density 192 "$TARGET"

Remove EXIF data

$ exiftool -all= "$TARGET"

Rotate video counter-clockwise

$ ffmpeg -i "$VIDEO" -vf 'transpose=3' -c:a copy "out.$VIDEO"

Rotate video clockwise

$ ffmpeg -i "$VIDEO" -vf 'transpose=1' -c:a copy "out.$VIDEO"