Skip to content

Instantly share code, notes, and snippets.

@erickyun
Last active January 3, 2022 07:24
Show Gist options
  • Save erickyun/f99d10f002dc3c09140fc3d15c9dadca to your computer and use it in GitHub Desktop.
Save erickyun/f99d10f002dc3c09140fc3d15c9dadca to your computer and use it in GitHub Desktop.
Download only part of a youtube video
#!/data/data/com.termux/files/usr/bin/bash
echo "Enter URL here:"
read URL
echo "Enter START_TIME here:"
read START_TIME
echo "Enter END_TIME here:"
read END_TIME
echo "Enter END_FILENAME here:"
read END_FILENAME
yt-dlp "${URL}" -o "/storage/emulated/0/download/${END_FILENAME}" --no-config -f b --external-downloader ffmpeg --external-downloader-args "ffmpeg_i:-ss "${START_TIME}" -to "${END_TIME}""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment