Saving times on video essays using AI

Main

  • 1 Download a video essay's audio via yt-dlp:

    yt-dlp -f m4a <video_url> -o output.m4a 
    

    or extract via ffmpeg if download isn't necessary:

    ffmpeg -i input.mp4 -vn -c:a copy output.m4a
    
  • 2 transcribe the audo file via OpenAI Whisper:

    whisper --model tiny.en --device cuda -f txt output.m4a 
    

    Note that this works only for English videos if you have a cuda-compatible GPU. If you don't have one then:

    whisper --model tiny.en -f txt output.m4a 
    

    And if it's a non-English video

    whisper --model tiny --device cuda -f txt output.m4a 
    
  • 3 Simply give the file to a LLM chatbot like ChatGPT and ask him to format the text. Prompt:

    format this diabtre into a well-organised, concise article. Mention any details that could be considered 'absurd'.

Addendum

Youtube in most cases has already generated subtitles for the video. So simply:

yt-dlp --write-auto-subs --skip-download --sub-lang en <video_url>