Skip to content

Instantly share code, notes, and snippets.

@rochmirabeau
Created January 2, 2025 06:05
Show Gist options
  • Select an option

  • Save rochmirabeau/14d00b7e14ab5528d4d8b1ae711d2469 to your computer and use it in GitHub Desktop.

Select an option

Save rochmirabeau/14d00b7e14ab5528d4d8b1ae711d2469 to your computer and use it in GitHub Desktop.
clip from youtube
# start and end = time in "XX:XX" formant
function youtubeclip
set start $argv[1]
set end $argv[2]
set title $argv[3]
set url $argv[4]
yt-dlp -f "[protocol!*=dash]" \
--add-metadata \
--external-downloader ffmpeg \
--external-downloader-args "ffmpeg_i:-ss $start -to $end" \
-o "%(uploader)s - $title %(epoch)s.%(ext)s" \
$url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment