Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

FFmpeg sends your video and audio to YouTube Live; Shaka Player does not. You only need Shaka if you also want to play a separate DASH or HLS stream on your own website. To make a continuous YouTube channel, prepare media you have the rights to use, configure a verified and eligible YouTube channel, then run an encoder continuously and monitor it. A continuous schedule is not a guarantee of uninterrupted service: the encoder, internet connection, YouTube ingest, and recovery process all matter.

How the pieces fit together

Think of this as two separate paths. In the YouTube path, FFmpeg reads a file or playlist, encodes it, and sends it to YouTube Live using the server URL and stream key from YouTube Studio. Viewers watch the stream on YouTube. Shaka Player belongs to a different path: it plays a live DASH or HLS stream in a web page. It is not needed to send media to YouTube or for viewers to watch there. See the FFmpeg documentation and Shaka Player project documentation.

Setup What it does What you need to operate
YouTube-only broadcast FFmpeg sends the stream to YouTube; viewers watch on YouTube. A continuously running encoder, sufficient upload capacity, and monitoring.
Broadcast plus website player YouTube still receives the FFmpeg stream. Separately, a website player such as Shaka plays a DASH or HLS stream. The YouTube encoder plus a separately hosted playback service and website. Shaka supports live DASH and HLS, and live playback may depend on clock synchronization; encoder drift may need correction at the encoder. See the Shaka Player FAQ.

If your goal is only a YouTube music channel, start with the first setup. Adding Shaka creates another playback system to configure and keep running, without changing the YouTube ingest path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check channel eligibility and music rights first

Enable live streaming

YouTube says a channel must be verified and have no live-streaming restrictions in the previous 90 days. First-time live-stream activation can take up to 24 hours, and YouTube states streamers must be at least 16. Check the current requirements in YouTube’s live-streaming eligibility guidance before planning a launch.

#1 Best Overall
Focusrite Scarlett Solo 3rd Gen USB-C Audio Interface
  • Pro performance with great pre-amps - Achieve a brighter recording thanks to the high performing mic pre-amps of the Scarlett 3rd Gen. A switchable Air mode will add extra clarity to your acoustic instruments when recording with your Solo 3rd Gen
  • Get the perfect guitar and vocal take with - With two high-headroom instrument inputs to plug in your guitar or bass so that they shine through. Capture your voice and instruments without any unwanted clipping or distortion thanks to our Gain Halos
  • Studio quality recording for your music & podcasts - Achieve pro sounding recordings with Scarlett 3rd Gen’s high-performance converters enabling you to record and mix at up to 24-bit/192kHz. Your recordings will retain all of their sonic qualities
  • Low-noise for crystal clear listening - 2 low-noise balanced outputs provide clean audio playback with 3rd Gen. Hear all the nuances of your tracks or music from Spotify, Apple & Amazon Music. Plug-in headphones for private listening in high-fidelity
  • Everything in the box: Includes Pro Tools Intro+, Ableton Live Lite, Cubase LE, and Hitmaker Expansion: a suite of essential effects, powerful software instruments, and easy-to-use mastering tools

Clear the music you plan to broadcast

Confirm rights for both the musical compositions and the sound recordings, as well as the territories and planned uses covered by those rights. A song being available online, being credited, or being licensed for one purpose does not by itself establish that it can be used in a continuous YouTube livestream. The rights path for a particular Indian repertoire depends on the recordings, compositions, territories, and rights holders; confirm it with the actual rights holders or qualified counsel rather than assuming one blanket license covers everything.

YouTube warns that “All live streams are scanned for matches to third-party content, including copyrighted content in the form of another live broadcast.” A match can replace the stream with a placeholder, interrupt it, or terminate it. YouTube also says licensed content can still be interrupted unless the rights owner allowlists the channel through Content ID. Review YouTube’s copyright guidance for live streams and resolve permissions before going live.

Rank #2
Focusrite Scarlett Solo 4th Gen USB-C Audio Interface
  • The new generation of the songwriter's interface: Plug in your mic and guitar and let Scarlett Solo 4th Gen bring big studio sound to wherever you make music
  • Studio-quality sound: With a huge 120dB dynamic range, the newest generation of Scarlett uses the same converters as Focusrite’s flagship interfaces, found in the world's biggest studios
  • Find your signature sound: Scarlett 4th Gen's improved Air mode lifts vocals and guitars to the front of the mix, adding musical presence and rich harmonic drive to your recordings
  • All you need to record, mix and master your music: Includes industry-leading recording software and a full collection of record-making plugins
  • Everything in the box: Includes Pro Tools Intro+, Ableton Live Lite, Cubase LE, and Hitmaker Expansion: a suite of essential effects, powerful software instruments, and easy-to-use mastering tools

Prepare the videos or playlist

Use media you can lawfully stream

Collect the finished video files you intend to broadcast and keep a record of the permissions that cover each recording and composition. For a simple first test, use one authorized file. For a longer rotation, assemble an ordered playlist and verify the files play through without gaps or errors before putting them on air.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make the playlist technically consistent

FFmpeg can encode inputs into one outgoing stream, but inconsistent source formats can add complexity. Where practical, prepare playlist items with compatible video dimensions, frame rates, and audio formats. If you use a still image with music, turn it into a video file before streaming or configure FFmpeg to combine the image and audio; the command below assumes you already have a playable video file with audio.

Rank #3
SABRENT USB External Stereo Sound Card Adapter, Plug & Play (AU-MMSA)
  • PLUG IN AND HEAR SOUND IN SECONDS - USB Type-A connector with a 3.5mm stereo headphone output and a separate 3.5mm mono microphone input. No drivers, no software, no external power - the adapter is USB bus-powered and is recognized as a standard USB audio device.
  • WORKS ON WINDOWS, MAC AND LINUX - Driverless on Windows 98SE/ME/2000/XP/Server 2003/Vista/7/8, Linux and Mac OSX, and compliant with the USB Audio Device Class 1.0 specification, so any system that supports class-compliant USB audio will see it. Select it as the sound output and input device after plugging it in.
  • TWO JACKS, TWO JOBS - The green jack is stereo OUT for headphones or powered speakers; the pink jack is mono microphone IN for a 3.5mm mic. It does NOT support 4-pole headsets on a single combo plug, it does NOT power passive speakers, and it does NOT add surround sound - it is a stereo 2-channel adapter.
  • FOR LAPTOPS AND DESKTOPS THAT NEED AN AUDIO PORT BACK - Adds a headphone and mic port to a laptop, desktop, or mini PC whose onboard jack has failed or was never there. Managed and work-issued computers can block new USB audio devices by policy - check with your IT department before ordering for a company machine.
  • SABRENT SUPPORT AND WARRANTY - What is in the box: one USB audio sound adapter. Backed by a 1-year limited warranty, extended to 2 years when you register within 90 days on the manufacturer's website.

A YouTube livestream is not a substitute for a channel’s wider policy obligations. Keep the broadcast genuinely authorized and useful to viewers; do not assume that looping content is automatically eligible for monetization or that permission to use music settles every YouTube policy question.

Create the YouTube stream and copy its ingest details

  1. Open YouTube Studio and create or schedule a livestream using YouTube’s encoder workflow. Consult YouTube’s guide to creating a live stream with an encoder.
  2. In the stream’s settings, copy the server URL and stream key shown by YouTube. Use the RTMPS option where available. YouTube recommends RTMPS, a secure extension to RTMP, and its developer guidance specifies a valid RTMPS endpoint and port 443: see YouTube’s encoder settings guidance and Google’s RTMPS ingestion guide.
  3. Treat the stream key like a password: anyone with access to it may be able to send a stream to your channel. Do not publish it, put it in a public script, or share a screenshot that exposes it. If it is disclosed, replace or reset it in YouTube Studio.
  4. Keep the stream’s preview and health panel available. Start FFmpeg, wait for YouTube to receive the preview, check the stream health, then use the Studio controls required by your selected workflow to make the stream public.

Set FFmpeg and YouTube encoder settings

YouTube’s published baseline recommendations include constant bitrate (CBR), a two-second keyframe interval (with no more than four seconds recommended), AAC or MP3 audio, and upload capacity adequate for the selected bitrate. These are YouTube’s recommendations, not a claim that a particular command or machine has been tested. Use the current YouTube bitrate and resolution recommendations to choose the resolution and bitrate for your stream.

Rank #4
M-AUDIO M-Track Duo USB Audio Interface
  • Podcast, Record, Live Stream, This Portable Audio Interface Covers it All - USB sound card for Mac or PC delivers 48kHz audio resolution for pristine recording every time
  • Be ready for anything with this versatile M-AUDIO interface - Record guitar, vocals or line input signals with two combo XLR / Line / Instrument Inputs with phantom power
  • Everything you Demand from an Audio Interface for Fuss-Free Monitoring - 1/4" headphone output and stereo 1/4" outputs for total monitoring flexibility; USB/Direct switch for zero latency monitoring
  • Get the best out of your Microphones - M-Track Duo’s transparent Crystal Preamps guarantee optimal sound from all your microphones including condenser mics
  • The MPC Production Experience - Includes MPC Beats Software complete with the essential production tools from Akai Professional
  • Resolution and frame rate: Choose a resolution and frame rate appropriate to your source and the current YouTube guidance. Avoid upscaling low-resolution artwork or footage just to advertise a higher resolution.
  • Video bitrate: Set the target for your chosen resolution and frame rate using YouTube’s current recommendation. If configuring CBR explicitly in FFmpeg, set the target, minimum, and maximum rates consistently and use an appropriate rate-control buffer for your encoder.
  • Keyframes: Target one keyframe every two seconds; do not exceed YouTube’s four-second recommendation. With a fixed-frame-rate 30 fps output, a GOP of 60 frames corresponds to two seconds. For a different output frame rate, calculate the GOP from that rate, or use an encoder option that forces keyframes at two-second intervals.
  • Audio: Use AAC or MP3 as YouTube recommends, and select an audio bitrate supported by the current encoder guidance. Listen to a private or unlisted test for clipping, silence, channel imbalance, and abrupt transitions.
  • Upload capacity: Check that the sustained upload capacity can carry the selected video and audio bitrates. Leave room for normal network variation; a connection that only just matches the nominal stream rate is vulnerable to interruptions.

Run a looping FFmpeg stream

The following is a template for a pre-encoded video file that contains both picture and sound. It uses a 30 fps output example so the 60-frame GOP is two seconds. Replace the bitrate values with those appropriate to your chosen output and YouTube’s current recommendations; set the output dimensions to match the intended resolution. Configure YOUTUBE_OUTPUT_URL using the RTMPS server URL and stream key shown in YouTube Studio. The key is deliberately not written into this example.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ffmpeg -re -stream_loop -1 -i "authorized-video.mp4" 
  -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" 
  -r 30 -c:v libx264 -preset veryfast 
  -b:v VIDEO_BITRATE -minrate VIDEO_BITRATE -maxrate VIDEO_BITRATE 
  -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a AUDIO_BITRATE 
  -f flv "$YOUTUBE_OUTPUT_URL"

This example scales and pads to a 1280×720 frame, outputs at 30 fps, encodes video with H.264, and encodes audio with AAC. Replace VIDEO_BITRATE and AUDIO_BITRATE with actual values in the format FFmpeg expects, such as a number followed by k; the placeholders are not literal valid settings. If you change the output frame rate, adjust the GOP so it still represents the intended keyframe interval. If your source already has the desired dimensions and aspect ratio, you can adapt or remove the scaling filter, but check the resulting output before broadcasting.

Best Value
Focusrite Scarlett 2i2 4th Gen USB-C Audio Interface
  • The new generation of the artist's interface: Connect your mic to Scarlett's 4th Gen mic pres. Plug in your guitar. Fire up the included software. Start making your first big hit
  • Studio-quality sound: With a huge 120dB dynamic range, the newest generation of Scarlett uses the same converters as Focusrite’s flagship interfaces, found in the world's biggest studios
  • Never lose a great take: Scarlett 4th Gen's Auto Gain sets the perfect level for your mic or guitar, and Clip Safe prevents clipping, so you can focus on the music
  • Find your signature sound: Air mode lifts vocals and guitars to the front of the mix, adding musical presence and rich harmonic drive to your recordings
  • With Scarlett 4th Gen, you have all you need to record, mix and master your music: Includes industry-leading recording software and a full collection of record-making plugins

FFmpeg documents its input, filter, codec, and output options in its command-line documentation. Treat this as a starting template, not a tested end-to-end recipe: codecs available in a particular FFmpeg build, source-file properties, selected bitrate, and YouTube’s current ingest settings can require changes.

Loop a playlist instead of one file

For several tracks, create a playlist of authorized video files and use FFmpeg’s input options to read the sequence repeatedly, or prepare the sequence as one continuous video file and loop that file. Playlist methods depend on how the files are encoded and whether their streams are compatible; test the transitions and restart behavior before a public launch. Keep a known-good single-file input available to isolate playlist problems.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test, publish, and keep the stream healthy

  1. Test with media that has similar motion and audio to the material you will broadcast. YouTube recommends testing under similar conditions and monitoring stream health; a short test cannot prove that a setup will remain stable indefinitely.
  2. Start FFmpeg and confirm that the preview appears in YouTube Studio. Check the video, audio, resolution, and stream-health indicators before making the stream public.
  3. Monitor the encoder process, machine or server load, network connection, and YouTube stream health. Arrange a way to notice an exit or connection failure and restart or recover the process; a 24/7 schedule requires ongoing operational attention.
  4. Plan for stream sessions to end. YouTube’s encoder guidance says streams under 12 hours are automatically archived; do not assume a single livestream will archive forever or run without interruption. See YouTube’s encoder workflow guidance for current stream behavior.

You can run FFmpeg on suitable hardware you control or on a server you operate. A software encoder provides command-line control and automation, but you must maintain the process, compute resources, connectivity, and restart behavior. A hardware encoder may shift some encoding work to dedicated equipment, but still needs a source, network access, configuration, and monitoring. The sources here do not establish a best encoder product or guarantee uptime for either approach.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot common problems

  • You cannot start a live stream: Check channel verification, recent live-stream restrictions, and whether first-time activation is still pending. YouTube says activation may take up to 24 hours.
  • YouTube receives no preview: Check that FFmpeg is still running, that the output URL uses the server URL and key from the correct YouTube stream, and that the RTMPS endpoint and connection are valid. Never paste the real key into a support post or public log.
  • The stream health is poor or the output drops: Compare the configured bitrate with the connection’s sustained upload capacity, then reduce the output demand or improve the connection. Check for encoder overload and watch the health indicators while testing similar content.
  • Video stutters or keyframe warnings appear: Verify the output frame rate and GOP calculation. At 30 fps, 60 frames is two seconds; an output frame rate other than 30 fps needs a corresponding GOP adjustment.
  • Audio is missing or distorted: Confirm that the input contains an audio stream, that FFmpeg is encoding it as AAC or MP3, and that the selected audio settings are supported. Test levels and transitions before going public.
  • The livestream is interrupted by a copyright match: Stop and resolve the rights issue with the relevant rights holder. If content is licensed, ask the rights owner whether the channel needs to be allowlisted through Content ID; possession of a license alone may not prevent an interruption.
  • Shaka’s website player does not start or drifts: Confirm that the website is serving a supported live DASH or HLS stream and investigate clock synchronization and encoder timing. This is separate from the FFmpeg-to-YouTube ingest path.

Or let it run in the cloud

If maintaining an always-on FFmpeg setup is more work than you want, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live; it loops the upload from the cloud, so no computer or home connection has to stay on. It does not broadcast from a camera and streams to YouTube only.

  • Nothing has to stay on at home: the stream runs in the cloud.
  • Each slot streams the uploaded file at the quality it was made, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers.
  • It automatically recovers if YouTube drops the stream.
  • The first day is free with no card; one free day is available per account.
  • Monthly billing is $9.99 per month. Other available terms are daily, weekly, six months, and yearly; plans include the same product, with the billing length changing.
  • Each slot includes one always-on stream, 10 GB storage per slot pooled across active slots, 24/7 looping and playlists, automatic recovery, and support from the StreamNeo team. UPI and cards are available in India; card checkout is available worldwide. For five or more slots, contact support.

To start, create a StreamNeo account and try the free first day.

Free planning tools

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.