Command Line Favorites
Here are my favorite commands for the command line-ish things. Some of these are Windows only, but most are platform agnostic.
- Video & Audio
- Download video with subtitles:
yt-dlp.exe --embed-subs --sub-lang "en.*" --merge-output-format mkv "VideoURLgoesHere"
- Download video with subtitles:
- Change the length of a video:
ffmpeg -i input.mkv -c copy -map 0 -t 46:12 output.mkv - Get songs into folders with metadata:
yt-dlp.exe "VideoURLgoesHere" -x --audio-format mp3 --add-metadata -o %(playlist|Unknown Album)s/%(autonumber)03d__%(title)s__%(id)s.%(ext)s
- Find all multi-spaces:
\s{2,}which is useful for replacing with a single space in text that has multiple spaces, also good when combined with replacing non-breaking spaces ( ) with regular spaces. - Find most weird characters:
[^A-Za-z0-9\s\.\:\,\/\<\>\(\)\;\-\&\#]which I’ve used to find characters that should not be in normal text content.