Skip to content

izkreny/EncodeForYouTube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 

Repository files navigation

WHY?

Because I want to upload audio files to YouTube.

To do that, I must first convert audio files into a format that will work on YouTube, and I want to do that through the GNU/Linux command-line.

WHAT?

This bash shell wrapper script will take an audio file as input and output a video file ready for upload to YouTube (e.g. via the command-line script youtube-upload).

The audio quality remains mostly unchanged; therefore, the output file will be slightly bigger than the input file.

HOW?

REQUIREMENTS

  1. GNU sed
  2. ImageMagick
  3. FFmpeg

INSTALLATION

Example commands listed below are based on the latest Ubuntu LTS version.

Install requirements

sudo apt-get update && sudo apt-get install sed imagemagick ffmpeg

Download and uncompress EncodeForYouTube

wget -qO- "https://github.com/izkreny/EncodeForYouTube/archive/refs/heads/master.tar.gz" | tar -xz -C ~/.local/opt

Create a symbolic link

Create a symbolic link to encode4yt.sh in a directory that is already in your PATH, e.g.:

ln -s ~/.local/opt/EncodeForYouTube-master/encode4yt.sh ~/.local/bin/encode4yt

USAGE

encode4yt INPUT [IMAGE]

The output file will be written in the same directory where the INPUT file is located and will have an identical name, just with an mov extension.

You can provide the path to an IMAGE as a second argument, which will be used as the video background. The default IMAGE size is 3840x2160 pixels (4K).

MISCELLANEOUS

This script is based on various sources from the internet, mostly from:

About

Encode audio file for YouTube.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages