Skip to content

Instantly share code, notes, and snippets.

@kaubu
Created May 7, 2021 23:30
Show Gist options
  • Save kaubu/3a825ee0c69b41735c177784f6e9814f to your computer and use it in GitHub Desktop.
Save kaubu/3a825ee0c69b41735c177784f6e9814f to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Usage: ./videoget <url>"
echo "Press 'CTRL-C' to stop."
endmsg1="If the video ends in .ts, upload to youtube to get it to work."
endmsg2="If the video ends in .mp4, end the stream before it stops."
url=$1
echo $endmsg1
echo $endmsg2
# youtube-dl --no-part --abort-on-unavailable-fragment -f best "$1" -o "$(youtube-dl -e $1).mp4" # Working if I cancel early
youtube-dl --no-part --hls-use-mpegts --abort-on-unavailable-fragment -f best "$1" -o "$(youtube-dl -e $1).ts" # Might need upload to youtube to fix
echo $endmsg1
echo $endmsg2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment