To stream a playlist from an Azure Linux VM to YouTube, put compatible media files on the VM, list them in an FFmpeg concat manifest, then send the playlist to the current YouTube RTMPS ingest URL with the stream key from Live Control Room. Use real-time pacing, choose output settings for the resolution and frame rate, and test the full playlist before going live. The command below is a starting point, not a tested or universal configuration.
What you need before you start
- A Linux Azure VM with the source files available on disk and enough outbound network capacity for the selected stream bitrate. VM size, region, licensing, and cost depend on your encoding workload and deployment; there is no single best VM size without those details.
- FFmpeg installed from a trusted distribution or release source. Check that the build includes the codecs and output protocol you intend to use.
- A YouTube channel with a live stream configured, plus its current ingest URL and stream key from Live Control Room.
- Media files whose stream formats are compatible for concatenation, or a plan to normalize or transcode them to a consistent output.
FFmpeg’s command-line reference describes input, output, mapping, and codec options: FFmpeg documentation. Azure’s published FFmpeg RTMP sample is for Azure Media Services live ingest; it illustrates command structure, but it is not a VM-to-YouTube guide and does not establish that Azure Media Services is needed for this workflow: Azure Samples FFmpeg example.
Prepare a playlist manifest on the VM
1. Create a concat manifest
In the directory containing your media files, create a UTF-8 text file named playlist.ffconcat:
ffconcat version 1.0
file 'video-01.mp4'
file 'video-02.mp4'
file 'video-03.mp4'
Each file entry is played in order. Paths can be relative to FFmpeg’s working directory or absolute. Quote or escape filenames with spaces or special characters carefully. The concat demuxer documentation explains the manifest format and its constraints: FFmpeg concat demuxer and FFmpeg concat FAQ.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
2. Check that the clips can be joined
The concat demuxer works best when files have matching stream structure, codecs, and parameters. Inspect each input’s video and audio streams before relying on stream-copy concatenation. If clips differ in codec, dimensions, frame rate, sample rate, or stream layout, normalize them to a consistent profile or choose an appropriate filter/transcode workflow; do not assume a clean, seamless join.
FFmpeg can inspect a file with ffmpeg -i video-01.mp4. Review the reported streams for each playlist item, especially whether every file has audio. If some clips lack audio, the simple optional audio mapping in the example below may not behave as intended across every transition; adapt mappings or normalize the inputs and test boundaries.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Get the YouTube RTMPS URL and stream key
- Open YouTube Live Control Room and select or configure the live stream you intend to use.
- Copy the ingest URL and stream key shown for that stream. Confirm that you are using the RTMPS endpoint when available; YouTube describes RTMPS as RTMP over a TLS/SSL connection and notes that the interface may show ordinary RTMP by default. Use the endpoint presented for the actual stream rather than assuming a sample URL remains current. See YouTube’s RTMPS guidance.
- Treat the key like a password. Do not commit it to a public script or repository, include it in screenshots, or leave it in shell history or logs. If it is exposed, rotate or regenerate it in the service UI; exact control labels can change.
YouTube’s RTMPS troubleshooting guidance also discusses port 443 as an option where appropriate to the endpoint. Do not change ports blindly: first verify the URL, protocol, and current encoder configuration.
Choose a stream-copy or transcode workflow
| Approach | When it fits | Trade-off |
|---|---|---|
| Stream-copy | Playlist items already have compatible codecs, stream structure, timestamps, and keyframe cadence for the intended YouTube output. | Usually reduces encoding work, but offers little control over codec, frame rate, bitrate, pixel format, or keyframe cadence. Compatibility and transitions must be checked with the actual files. |
| Transcode | Inputs differ, or you need to set a consistent output profile and control bitrate and keyframes. | Uses VM CPU or available hardware-encoding resources. If the VM cannot encode at the required rate, reduce the workload or select an appropriate VM configuration; no universal Azure throughput or best SKU is established. |
YouTube’s current encoder guidance lists H.264, H.265 (HEVC), or AV1 video; up to 60 fps; AAC or MP3 audio; constant bitrate (CBR); and a recommended two-second keyframe frequency, not exceeding four seconds. For H.264 at 1080p and 30 fps, YouTube lists 5 Mbps recommended and 4 Mbps minimum. These are YouTube recommendations, not a guarantee that a particular VM or network can sustain the stream. Check the current tables at YouTube encoder settings, bitrates, and resolutions.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
At 30 fps, a two-second keyframe interval is 60 frames. For another frame rate, calculate the GOP length for approximately two seconds (for example, 50 frames at 25 fps). Select the bitrate for the actual resolution and frame rate in YouTube’s guidance, then leave headroom on the VM’s outbound connection rather than using all available capacity. YouTube advises: “Make sure that your outbound connection is enough to send your stream bitrate.” See YouTube streaming tips.
Build and run the FFmpeg command
Example: transcode to H.264 and AAC
This schematic command reads the manifest in real time and encodes a 1080p30-style H.264/AAC output. It is illustrative, not a tested command or universal recipe. Replace the endpoint and key with the values from Live Control Room; adapt resolution, frame rate, bitrate, and mapping to your content and YouTube’s current guidance.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
ffmpeg -re -f concat -safe 0 -i playlist.ffconcat
-map 0:v:0 -map 0:a:0?
-c:v libx264 -preset veryfast -pix_fmt yuv420p
-r 30 -g 60 -keyint_min 60 -sc_threshold 0
-b:v 4500k -maxrate 4500k -bufsize 9000k
-c:a aac -b:a 128k -ar 44100 -ac 2
-f flv 'rtmps://<YouTube-RTMPS-endpoint>/<stream-key>'
-repaces file input in real time rather than sending it as fast as the VM can read it.-f concatselects the concat demuxer.-safe 0permits absolute or otherwise non-default paths; use it only with a manifest you control.-map 0:v:0selects the first video stream;-map 0:a:0?selects the first audio stream when present. Change the mapping if inputs have multiple streams or inconsistent audio.-g 60and-keyint_min 60set a 60-frame GOP in this 30 fps example, or roughly two seconds. The example bitrate is not YouTube’s recommendation for every resolution: consult the current table and use settings suited to your output.-f flvselects the RTMP-family output container commonly used for this ingest workflow. Confirm that your FFmpeg build and selected endpoint support the chosen protocol.
When stream-copy may work
If all playlist items already use compatible encodings and parameters, stream-copy can reduce CPU usage. A schematic variant is:
ffmpeg -re -f concat -safe 0 -i playlist.ffconcat
-map 0:v:0 -map 0:a:0? -c copy
-f flv 'rtmps://<YouTube-RTMPS-endpoint>/<stream-key>'
Use this only after checking codec compatibility, timestamps, keyframe cadence, and transitions against the current YouTube requirements. If the source GOP interval, bitrate, or stream formats are unsuitable, transcode instead.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Test the complete playlist before broadcasting
- Run the intended command with representative files and confirm the playlist order and duration behave as expected.
- Check for audio and video at the start, across file boundaries, and near the end. Include motion and audio similar to the intended broadcast; YouTube recommends testing under representative conditions.
- Watch YouTube’s stream health and FFmpeg output while the test runs. Confirm that the RTMPS connection remains stable and the bitrate is sustainable.
- Test what happens when the final playlist item ends and when FFmpeg is stopped or restarted. A concat playlist does not by itself imply that FFmpeg will loop it forever.
YouTube recommends monitoring stream health during an event and testing upload bitrate. Its guidance is at YouTube streaming tips and encoder settings.
Troubleshoot common failures
| Symptom | Likely causes | What to check or change |
|---|---|---|
| RTMPS connection timeout or rejected connection | Stale or incorrect URL, wrong protocol, invalid key, outbound network policy, or unsupported output protocol in the FFmpeg build. | Copy the current URL and key from Live Control Room, verify RTMPS, check outbound connectivity and any VM network policy, and confirm FFmpeg supports the selected protocol. Consult YouTube RTMPS troubleshooting. |
| YouTube reports unstable stream health | Bitrate exceeds the reliable outbound capacity or varies too much. | Run a representative test, lower bitrate or resolution if needed, and leave network headroom. YouTube’s guidance is to ensure outbound capacity can carry the stream bitrate: streaming tips. |
| FFmpeg CPU use is high or output falls behind | The command is re-encoding, the chosen preset is too demanding, or the VM is not suited to the encode workload. | Check the codec options and FFmpeg output. Use stream-copy only if the actual media is compatible; otherwise use a consistent transcode profile and an appropriate VM configuration. |
| Missing audio or abrupt transitions | One or more files lack audio, streams differ, or timestamps and parameters do not align for concatenation. | Inspect each file’s streams and test the boundaries. Normalize mismatched inputs or use a workflow designed for their differences. |
| Stream key appears in history or logs | The secret was embedded in a command or recorded by a shell, script, or logging system. | Rotate the key in YouTube’s UI and move secret handling out of public scripts, shell history, screenshots, and logs. Interface steps may change. |
Or let it run in the cloud
If your goal is an always-on YouTube stream from uploaded videos, StreamNeo is a cloud alternative: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it loops in the cloud, supports any uploaded quality up to 4K 60fps at one flat price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. The monthly option is $9.99 per month. Start your free day on StreamNeo.
Quick Recap
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.




