Skip to content

Instantly share code, notes, and snippets.

@tm9k1
Created October 12, 2021 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tm9k1/ec8363169058d12dd594450a1394641b to your computer and use it in GitHub Desktop.
Save tm9k1/ec8363169058d12dd594450a1394641b to your computer and use it in GitHub Desktop.
Commands to convert an existing file to HEVC or to download a Youtube video and save as HEVC video
  • Converting a video file to HEVC with NVENC hardware encoder (NVIDIA GPUs ONLY)
ffmpeg -i "some_video_file.ext" -c:v hevc_nvenc -pixel_format yuv444p -preset medium -c:a copy output2.mp4
  • Downloading a Youtube video and converting to NVENC-HEVC along the way
youtube-dl https://www.youtube.com/watch?v=hpgQsKtf7AA -f 'bestvideo[height>=1080]+bestaudio/best[height>=1080]' -o '%(title)s.%(ext)s' --postprocessor-args "-c:v hevc_nvenc -pixel_format yuv444p -preset medium -c:a copy"
  • Download a Youtube video
youtube-dl https://www.youtube.com/watch?v=hpgQsKtf7AA -f 'bestvideo[height>=1080]+bestaudio/best[height>=1080]' -o '%(title)s.%(ext)s'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment