banner



How To Create A Livestream Radio On Youtube

How to create your 24/7 YouTube online radio

How to create radio like lofi hip hop radio — beats to relax/study to or Russian underground radio past Post Market place 1919? I've created a bunch of these and I'll tell you how. Warning: a lot of geek stuff volition be hither.

TL;DR

  1. Rent a 24/vii server with a stable net
  2. Use Azuracast to create an audio stream
  3. Upload mp3/wav files (heed the license)
  4. Utilize FFmpeg to create a video stream from .mp4 / .gif, merge it with an audio stream with 'current track' title and send information technology to YouTube

Need more details and a step-by-pace guide? Permit's go!

1. Notice a stable server

Of grade, you can host your 24/7 radio on your Laptop or Raspberry pi, but if you lot have some stiff planes on your radio or merely don't want a headache I'd strongly recommend ordering a 24/7 server with great Internet connections. Digitalocean is one of the greatest and cheapest solutions right now — employ my referral to get $100 free to start and test your radio.

My radio server configuration

What about server configurations?

My current configuration is 4GB RAM / 2CPUs / 80 GB SSD / 4 TB transfer.

My average CPU load is 55%, outbound bandwidth: 1.58 Mbps.

Information technology would probably be enough with a cheaper server merely I don't want to hit the limits — they cause a headache.

2. Install Azuracast

If you are using Digital Body of water every bit your VPS provider, at that place is a prepaid server configuration with Azuracast installed. So yous tin just install all Azuracast dependencies without any hassle in Concluding (but yous volition definitely take some soon while installing FFmpeg for merging sound and video streams and sending them to YouTube).

If you want to install Azuracast from scratch — utilise this official tutorial.

3. Setup Azuracast and Upload tracks

After successful installation, simply visit Azuracast address to complete the setup. Then you merely upload vocal files to the organisation, create playlists with them — and your radio is already can be listened via Azuracast's public page (you can detect its link in your admin panel).

4. Install FFmpeg

Now y'all need this slap-up tool to create a video stream out of your blithe .gif or .mp4 file, merge it with your audio stream from Azuracast and pass all of them to YouTube.

To install FFmpeg type this in your terminal:

sudo apt install ffmpeg

Or visit this official site: http://ffmpeg.org/download.html

v. Run FFmpeg

Now some magic will be happening: FFmpeg is so powerful it will merge our Azuracast'southward audio stream and video stream from your .gif/.mp4 animated cover.

Bank check my product code below. Some descriptions to used variables:

  • YOUTUBE_URL — the URL of YouTube's streaming service.
  • Key — the unique fundamental to control your stream. Yous can find yours straight after the creation of a new youtube online stream (Youtube will give it to y'all). Keep it safe!
  • VIDEO_SOURCE — path to a file with your blithe cover that is located on your server (y'all can apply scp utility to transfer files to your automobile).
  • AUDIO_SOURCE — URL to your audio stream. Replace the IP with your host.

You lot would probably need to wrap upwardly this bash script (with FFmpeg) to systemd service. It will relaunch the script after it somehow fails (and it will sometimes).

vi. Add CURRENT Runway captions on a video

FFmpeg is and so powerful it can add together a text on the video stream. It tin read text from a text file and write its text on the video using your font and coordinates.

You demand to create a code that will write a current runway name in a text file. There are ii ways to do that:

  1. using Azuracast API — you can periodically become the current radio track
  2. using Azuracast Webhooks — you can receive information when vocal changes

I chose the second variant. You lot can find a Webhook section in Azurast admin panel. This is my production python lawmaking that handles the webhook and writes a vocal proper name to the file.

This is the new FFmpeg launcher that writes text on a video stream:

Find that I as well have to upload a font file to the server auto. You tin also google for -vf drawtex params to play with song proper name positioning.

I hope you lot enjoyed this commodity! If you create an online radio station using this tutorial — delight share its link in the comments section. Delight follow me for more than hacks and do the clap-handclapping thing!

— — — — — — — — Daniil Okhlopkov / okhlopkov.com

Source: https://okhlopkov.medium.com/how-to-create-your-24-7-youtube-online-radio-ca9e6834c192

Posted by: currylithapablout.blogspot.com

0 Response to "How To Create A Livestream Radio On Youtube"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel