yt-dl

video

./yt-dlp.exe -f 'best[ext=mp4]/best' -o '%(title)s.%(ext)s' adDW9OKbKFs

change adDW9OKbKFs to the code of the video you want

./yt-dlp.exe -f 'bestvideo[filesize<999M]+bestaudio' --write-sub --write-auto-sub --sub-lang "en.*" --merge-output-format mp4 -o '%(title)s.%(ext)s' 

audio

[[August 01, 2022]]```
---
### ffmpeg

#### m4a to aac

ffmpeg -i ‘.\Hotline Miami Only best Soundtrack.m4a’ -acodec copy output.aac

./yt-dlp.exe -f 'bestaudio' -o '%(title)s.%(ext)s' 

mp3 downloaded

./yt-dlp.exe -f 'bestaudio' -o - {youtube} | ffmpeg -i - -c:a libmp3lame {name}

split

ffmpeg -i input.mp4 -c copy -segment_time 00:20:00 -f segment output%03d.mp4```

ffmpeg

  • -ss
    • seek start, basically “from”
  • -to
    • opposite, tells ffmpeg when to end
  • -c:a [codec]
    • determines audio coddec
  • -c:v [codec]
    • same but video
  • -c
    • both
    • a common use is -c copy when all youre doing manipulating runtimes and such

gif

ffmpeg -i input.mp4 \
    -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
    -loop 0 output.gif