Useful Commands

2026/04/02

Categories: computers Tags: unfinished


yt-dlp

yt-dlp is a content downloader that works almost everywhere.

Bypass common roadblocks

dl --impersonate chrome --user-agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36' --cookies-from-browser brave

Download music

dl -x --impersonate chrome --user-agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36' --cookies-from-browser brave -f bestaudio -x --audio-format m4a --embed-thumbnail --add-metadata

ffmpeg

ffmpeg is the most powerful video converter in existance, if you memorize it’s command-line options.

Extract album covers from .m4a files

for f in *.m4a; do ffmpeg -i "$f" -map 0:1 "${f%.m4a}.png"

Crop images to 1:1

for f in *.png; do ffmpeg -i "$f" -vf "crop=ih:ih:(iw - ih)/2:0" "${f%.png}cropped.png"; done

Crop tall videos to 1:1

ffmpeg -i in.webm -vf "crop=iw:iw:0:(ih - iw)/2" out.mp4

>> Home