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..." |
|||
| (2 intermediate revisions by the same user not shown) | |||
| 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" | ||
==Storage== | |||
===Basic fio(1) read/write test=== | |||
$ fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75 | |||
===Basic fio(1) read test=== | |||
$ fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread | |||
===Basic fio(1) write test=== | |||
$ fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite | |||
[[Category:Tech]] | [[Category:Tech]] | ||
Latest revision as of 22:40, 15 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"
Storage
Basic fio(1) read/write test
$ fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
Basic fio(1) read test
$ fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread
Basic fio(1) write test
$ fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite