Skip to content

Instantly share code, notes, and snippets.

@miztiik
Last active June 14, 2020 19:45
Show Gist options
  • Save miztiik/9706d69b061aa4a33a89e5b6444c4c07 to your computer and use it in GitHub Desktop.
Save miztiik/9706d69b061aa4a33a89e5b6444c4c07 to your computer and use it in GitHub Desktop.
how to use youtube-dl

Download Video using youtube_dl

O_VID_FORMAT="mp4"
VID_URL="https://www.youtube.com/watch?v=jKPlGznbfZ0"

youtube-dl -f bestvideo+bestaudio --merge-output-format $O_VID_FORMAT $VID_URL

# For getting MP4 version
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' $VID_URL

Convert MKV to MP4 using ffmpgeg

ffmpeg -i FILE_NAME.mkv -codec copy FILE_NAME.mp4

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment