Show HN: M2M – A bash tool to convert YouTube videos to audio with yt-dlp&FFmpeg

5 days ago 2

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

9 Commits

Repository files navigation

A minimal bash tool to convert video files to any other supported media files using yt-dlp and ffmpeg.

How it works:

  • Fetches the video from the URL using yt-dlp
  • Saves it in your $YTDIR directory ($YTDIR=$HOME/Music/ytdownloads by default)
  • Uses ffmpeg to convert the video to another file format
  • Deletes the original video file and saves the converted file to $YTDIR

Suggested:

Add this line to your .bashrc or .zshrc file to set your output directory:

export YTDIR=$HOME/Music/ytdownloads

Usage:

m2m "https://www.youtube.com/watch?v=EYI489Dc4Sc" outputfile.mp3

Change the extension form .mp3 to anything you like

Read Entire Article