Liquidsoap can feed a continuous music programme to YouTube Live through its documented RTMP or HLS outputs. You still need a suitable source, a compatible encoder, a YouTube stream key, rights for every piece of music and a plan for failures.
The configuration is only one part of an always-on channel. Treat the first deployment as a testable broadcast system: verify the installed Liquidsoap release, check the output in YouTube Live Control Room, watch the connection during a long trial and arrange recovery outside the process itself.
How Liquidsoap fits into a YouTube music stream
Liquidsoap is the programme engine between your music collection and YouTube. It can select or sequence audio, keep a source producing content, encode the output and send that encoded stream to YouTube's ingestion endpoint. YouTube then distributes the live broadcast to viewers.
For a music-only channel, the simplest mental model is:
| Part | Job | What you need to verify |
|---|---|---|
| Music source | Supplies tracks in a planned order | Files are readable and the source does not finish unexpectedly |
| Liquidsoap programme | Selects, queues and replaces content | The installed release supports the functions you use |
| Encoder | Produces the video and audio format expected by the output | Required codec libraries are available in the build |
| YouTube output | Sends the encoded stream and your key | The selected RTMP or HLS method matches current YouTube guidance |
| Host and supervisor | Keeps the process running and reports failures | Network, restart and alerting behaviour are tested |
Liquidsoap's documented YouTube examples show an FFmpeg-based encoder with H.264 video and AAC audio, followed by the output.youtube.live.rtmp output. That example is useful for understanding the relationship between encoder, source and stream key. It is not evidence that the same configuration will work unchanged with every Liquidsoap release, operating system or build.
Before writing a production file, read the Liquidsoap YouTube output reference for the version installed on your host. Also inspect the build with the documented liquidsoap --build-config command. Encoding support can depend on optional libraries, so a configuration copied from a guide may refer to an encoder that your binary cannot provide.
A local computer can run this arrangement, but a 24/7 channel exposes the weaknesses of sleep settings, home broadband, power cuts and unattended software updates. An always-on host with stable outbound connectivity is a practical requirement. If you do use a VPS, keep the process, its logs and its restart policy under your control rather than assuming that a running terminal is sufficient.
Prepare and verify music rights first
Liquidsoap does not grant you permission to broadcast music. It can play a file you own, but ownership of a copy is not the same as permission to communicate the recording and composition to the public through a live channel.
Create a rights record before building the playlist. For each track or collection, note who granted permission, what uses are covered, which channel or account may use it, any territory restrictions, the permitted duration and when the permission ends. Include music supplied by clients, artists, labels and libraries. Keep the licence document or written permission with the record rather than relying on a filename or memory.
Check the rights for visuals as well. A static background, album artwork, lyric video or animated loop may have separate permissions from the audio. If you use devotional recordings, regional music or material supplied by a local performer, confirm that the person giving permission controls the relevant rights. A purchase receipt or a track being available online is not, by itself, proof of live-stream permission.
YouTube says that live streams are scanned for third-party material. If copyrighted content remains after a warning, the stream may be interrupted or terminated. The YouTube Help guidance on copyright during live streams also explains that a rights holder may need to add your channel to its Content ID allowlist even when you have obtained a licence. Confirm that requirement with the rights holder before the broadcast, and keep evidence of the conversation.
Do not treat a Content ID claim, a successful test or a stream that has remained online for one night as clearance. A channel can still be reviewed later, and rights can change. Keep a replacement playlist made only from material whose permissions you can document. That gives you something to play while a disputed track is removed, but it does not resolve the underlying rights question.
Build a continuous source and playlist
Start with a small, known-good collection rather than importing an entire music folder. Check that every file opens, has audible content, and does not end with an unusually long silence. Normalise the listening experience before it reaches Liquidsoap by deciding how you will handle different loudness levels, missing metadata and very short tracks.
A continuous source needs two properties. It must have more content available when the current item ends, and it must have a defined response when an item cannot be read. A playlist that reaches its end is not the same as a source that can run indefinitely. Likewise, a fallback that exists in a demonstration does not automatically create a complete recovery design for an unattended channel.
Use a source structure that you can explain on paper. For example, the primary source might rotate a directory of licensed tracks, while a separate fallback supplies a short set of approved items when the primary directory is temporarily unavailable. Decide whether the fallback should repeat, whether it should be audible to viewers, and how you will know it has been used for longer than intended.
Avoid making the programme depend on a single file. If that file is corrupt, moved or locked, the stream may produce silence or stop even though the host and network remain healthy. Test the source by temporarily removing one file, presenting an unreadable file and allowing the normal queue to reach its boundary. Record what Liquidsoap logs in each case.
If you want spoken announcements, jingles or time checks, add them as deliberate programme elements. Do not place them in the same folder as the music unless the source is designed to handle the difference. A devotional channel may need a fixed prayer or station identification at defined intervals, while a study channel may prefer uninterrupted ambience. The source design should reflect the channel rather than being an accidental loop.
You can also review whether a simpler YouTube video playlist as a live stream meets the editorial need. Liquidsoap becomes useful when you need local sequencing, audio processing, a controlled fallback or a repeatable encoder pipeline. If the programme is already a finished video, another workflow may involve fewer moving parts.
Choose a documented YouTube output: RTMP or HLS
Liquidsoap documents two relevant YouTube paths. Its RTMP output uses rtmp://a.rtmp.youtube.com/live2 by default and requires a YouTube stream key and an encoder. Its HLS output uses https://a.upload.youtube.com/http_upload_hls by default. Check the reference for your installed version before relying on either default.
RTMP is usually the easier first path to validate because the common live-encoder workflow is built around a continuing encoded connection. YouTube's current encoder guidance recommends RTMPS for encryption in transit, so compare the transport supported by your Liquidsoap build with the endpoint and instructions shown in YouTube Live Control Room. Do not silently substitute an endpoint merely because it appears in an older example.
HLS is not simply RTMP with a different URL. YouTube's HLS guidance describes segmented delivery: the encoder produces transport-stream segments and a rolling playlist, then sends them using HTTPS POST or PUT. The guidance specifies a playlist with no more than five outstanding segments and segment durations of one to four seconds. HLS also introduces more latency because viewers receive segments rather than one continuous publishing connection.
| Choice | What Liquidsoap documents | Practical trade-off |
|---|---|---|
| RTMP | A YouTube live output with an encoder and stream key | Familiar continuous-ingestion model, but transport, encryption and encoder support still need checking |
| HLS | A YouTube upload output using HLS delivery details | Segmented workflow with additional YouTube-specific requirements and higher latency |
Choose the route your installed build supports and that YouTube currently accepts for your channel. Do not describe HLS and RTMP as interchangeable. A configuration can be syntactically valid while still producing segments, codecs or timing that the receiving service rejects.
Whichever path you choose, keep the stream key private. It authorises publishing to the configured live destination. Store it outside public posts, screenshots and shared configuration files, and replace it in YouTube if you believe it has been exposed. The YouTube Live Control Room setup instructions are the authority for creating or selecting the broadcast and obtaining the current stream settings.
Configure encoding and YouTube stream details
The output needs an encoder that produces a format YouTube can ingest, not merely an audio playlist. Liquidsoap's documented video example uses FFmpeg with H.264 video and AAC audio. For a music channel, the video may be a still image, a visualiser or a prepared loop, but it must remain a valid video stream for the selected output.
YouTube's current live encoder guidance lists RTMP and RTMPS, constant bitrate encoding, up to 60 frames per second, and a recommended two-second keyframe frequency that should not exceed four seconds. It lists H.264, H.265 and AV1 video, along with AAC or MP3 audio for RTMP and RTMPS. These are current guidance points to check against the official page, not permission to assume that every Liquidsoap build supports every codec.
The recommended bitrate depends on resolution, frame rate and codec. YouTube's table gives H.264 examples of 14 Mbps for 1080p30 video and 8 Mbps for 720p30 video. Those figures describe those particular video settings; they are not a universal target for every music stream. A lower-resolution static visual may be more sensible than selecting a large video bitrate that a modest host cannot sustain.
The same guidance lists stereo audio at 44.1 kHz and 128 kbps in its advanced settings. Treat those as encoder settings to compare with your output rather than as a guarantee that an untested Liquidsoap expression will select them. Confirm the actual encoded stream in logs or with a local inspection tool before publishing widely.
YouTube advises leaving about 20% upload-bandwidth headroom. Calculate the combined video and audio bitrate, then test the real outbound path from the host. A connection that appears fast in a general speed test can still suffer congestion, packet loss or traffic shaping during the hours when your audience is listening. If the chosen bitrate consumes nearly all available upload capacity, reduce the stream's demands or move it to a more suitable host.
Set the broadcast details in YouTube separately from the Liquidsoap file: title, description, visibility, category and latency choice belong to the YouTube side. Use a private or unlisted test where appropriate. Never paste the stream key into a public repository, tutorial screenshot or support ticket without masking it.
If your programme uses a variable-frame-rate video source, check the implications before using it. The practical concerns are timing, keyframes and whether the encoder produces the steady output expected by YouTube. The discussion in Can YouTube Live Streaming Use Variable Frame Rate is relevant when the visual source is a prepared file rather than a generated still image.
Test the output and monitor stream health
Do not begin with a public 24/7 broadcast. Create a test broadcast, start Liquidsoap, and watch the preview in Live Control Room. Confirm that the video moves, audio is present in both channels where expected, the programme advances beyond its first item and the stream does not repeatedly reconnect.
Test more than the first few minutes. Allow the source to change tracks, exercise the fallback, restart the Liquidsoap process and temporarily interrupt the network if you can do so safely. The aim is not to prove that the system can never fail. It is to learn what failure looks like, how quickly it is noticed and which part of the system is responsible for recovery.
Watch YouTube's stream-health messages during the test. A poor connection can be caused by insufficient upload capacity, congestion, unstable routing, encoder timing or a mismatch between the configured output and the receiving service. The troubleshooting steps in Why Does My Cloud-Hosted YouTube Stream Show a Poor Connection Warning can help separate connection symptoms from source and encoder problems.
Keep a simple test record. Note the Liquidsoap version and build configuration, output route, video and audio settings, start time, reconnect events and any YouTube warnings. If you change one setting at a time, the record will tell you which change helped. If you change five settings together, a successful test does not tell you which assumptions were valid.
Check the host outside YouTube as well. Look for process exits, growing logs, disk exhaustion, high CPU use and memory growth. If the stream creates a local recording or logs large diagnostic files, define retention before the disk fills. Have an alert reach a person who can act, rather than merely writing another message to the same host that may be offline.
Plan for interruption and recovery
A 24/7 stream needs several recovery layers. The Liquidsoap source should respond sensibly when a track fails. The output should report or handle a lost connection according to the capabilities documented for your release. The operating system or service supervisor should restart a process that exits. A separate monitoring path should tell you when the broadcast is absent, unhealthy or stuck on fallback content.
Validate each layer rather than assuming the words “fallback” or “restart” cover the whole system. A fallback source can keep producing audio while the YouTube connection is down. A process supervisor can restart Liquidsoap while the stream key is invalid. A reconnecting output can return to YouTube while the playlist has already stopped. These are different faults with different evidence.
Use a service manager or other documented supervision method appropriate to the host. Set a restart policy, preserve useful logs and avoid a rapid restart loop that hides a configuration error. Test a clean stop, an unexpected process exit, a failed network route and an invalid source file. Decide which events should wake a person immediately and which can wait for a scheduled review.
Keep a recovery checklist beside the host details. It should identify the broadcast, the location of the configuration, the safe way to replace a stream key, the fallback playlist, the last known-good version and the steps for stopping the public stream. Do not include the secret key itself in a document that is widely shared.
If the complete programme matters, record it separately. YouTube says a live stream shorter than 12 hours can be automatically archived, while a stream longer than 12 hours may not be captured at all. A 24/7 broadcast should therefore not rely on one YouTube archive as its complete copy. Plan storage, file rotation and retention, and remember that a local recording does not replace music-rights obligations.
For a host-based deployment, read the process-recovery approach alongside the broader guide on reconnecting a 24/7 YouTube livestream automatically on a VPS in India. If you would rather avoid installing and supervising the process yourself, StreamNeo removes the specific burden of keeping a video file and its YouTube connection running on your own computer, while you still remain responsible for the channel, content and rights.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Can Liquidsoap stream audio-only music to YouTube?
YouTube Live expects a video stream, so an audio playlist normally needs a visual layer such as a still image or an animated background. Liquidsoap's documented example uses an FFmpeg encoder with H.264 video and AAC audio. Verify the exact encoder and source syntax against the Liquidsoap version installed on your host.
Should I choose RTMP or HLS?
Start with the documented route that your Liquidsoap build and current YouTube instructions support. RTMP follows the familiar continuous encoder model, while HLS uses segments and has additional playlist, upload and latency considerations. Neither choice removes the need to test the actual output in Live Control Room.
Does a music licence guarantee that YouTube will leave the stream online?
No. YouTube scans live streams for third-party material, and rights holders may require channel allowlisting even when you have permission. Confirm the licence scope and any allowlisting process with the rights holder, and keep a documented replacement programme.
Can Liquidsoap alone guarantee a 24/7 broadcast?
No. It can be part of a continuous source and output workflow, but the host, network, encoder dependencies, process supervision, monitoring and rights all affect the result. Test interruption and recovery paths separately, and do not treat one successful overnight run as a guarantee.