ShakaCode | ShakaCode Blog | Rails On Maui Blog | Rails | ReactJs | JavaScript | Webpack | Productivity |

How to download Youtube Videos (and convert to Audio) for 1.5x speed on iOS


#1

Notes below are before I discovered SpeedUpTV.

Installation on a Mac. Install Brew first if you haven’t yet.

brew install youtube-dl
brew install ffmpeg

Docs for youtube-dl.

Converting a video to m4a for your iPhone

1. Create the m4a

All you need is the -x --audio-format m4a options and the URL of the youtube video.

youtube-dl -x --audio-format m4a https://www.youtube.com/watch?v=UF8uR6Z6KLc

2. Load file into iTunes

  1. Drag and drop the file onto iTunes. If you can’t drag and drop, it’s the wrong file type.
  2. Find the file in Music in your library in iTunes.
  3. Hit CMD-I to edit the info for the file.
  4. Set the type to Audiobook if it’s text and you want to be able to vary the playback speed.
  5. Set the title and author. (or else it’s very hard to find the file!)

3. Move the file to your iPhone.

If you don’t sync your entire library:

  1. If you made the file an audiobook, the file will disappear from Music and move to Audiobooks in your iPhone library.
  2. Drag the file onto your iPhone in iTunes.

4. Sync your iPhone with iTunes


#2

Extra notes on converting files

The first post is the best way to do this. Here are some of my notes.


1. Download the video

Find the video URL and run a command like this:

youtube-dl https://www.youtube.com/watch?v=lssNBHXz4Vw

2. Convert to Audio Optional

  1. Find the filename of the mp4: ls -t *.mp4

  2. You will convert the file using ffmpeg.
    Substitute the FILENAME.mp4. Note the single quotes around the name in case there are spaces in the name.

  3. Maybe check the file is encode with AAC:

ffmpeg -i 'FILENAME'
  1. Convert the file, changing the mp4 extension to an m4a extension:
ffmpeg -i 'FILENAME.mp4' -c copy 'FILENAME.m4a'

If that doesn’t work, see the details in this article

Adding the Audio to iTunes

Music

  1. File => Open => Add to Library. Pick the AAC file.

  2. Find the file in your playlist:

  1. Sync the playlist with your iPhone

Downloading a Video Playlist and Converting to Audio

So you can listen at 1.5x speed!

This will download my StartupSchool Playlist:

youtube-dl --download-archive startup-school-archive.txt https://www.youtube.com/playlist?list=PL5VAKH-U1M6e7V53gHmKecwVLbdLu5Rip

The --download-archive options ensures that if you add more videos to the playlist, you won’t re-download those. Great option!

To convert audio in any formats to mp3:

ffmpeg -i FILENAME.EXT -vn -acodec libmp3lame FILENAME.mp3

#3

You can use allavsoft to download from FirstPost on Mac and Windows,and also download FirstPost Videos to MP4, WMV, MOV, AVI, FLV.


closed #50