Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
DocumentaryTube
AAC

How to Send GStreamer H.264 and AAC to YouTube Live with flvmux

Send GStreamer H.264 video and AAC audio to YouTube Live with flvmux: configure AVC caps, RTMPS, YouTube encoder settings and pipeline queues.

By DocumentaryTube Team 5 min read

Free tools Windows power users keep installed

One-click scans. No signup required.

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

To send GStreamer video and audio to YouTube Live, encode video as H.264 and audio as AAC, parse the H.264 into AVC format, connect both streams to flvmux, then send the FLV output through an RTMP- or RTMPS-capable sink. Prefer RTMPS, use constant bitrate (CBR), and target a two-second keyframe interval. The exact source elements, plugins and sink depend on your installation, so validate the pipeline locally rather than assuming one command works everywhere.

How the GStreamer pipeline fits together

The video and audio branches are encoded separately, then joined at the muxer. flvmux creates FLV output; it does not connect to YouTube by itself. An RTMP(S)-capable sink must deliver that output to the ingest address and stream key shown in YouTube Live Control Room.

video source ! videoconvert ! x264enc ... ! h264parse ! video/x-h264,stream-format=avc ! queue ! mux.
audio source ! audioconvert ! audioresample ! AAC encoder ! queue ! mux.
flvmux name=mux streamable=true ! RTMP(S)-capable sink configured with the YouTube ingest URL and stream key

For a documented AAC encoder example, use voaacenc in place of “AAC encoder.” The x264enc documentation describes H.264 encoding; h264parse can output AVC; voaacenc encodes AAC and accepts common rates including 44.1 and 48 kHz; and flvmux expects AVC-formatted H.264 on its video sink.

The ellipses are deliberate: source elements, encoder choices, sink availability, and sink URI syntax vary by machine and build. Check which elements are installed and inspect negotiated caps. Configure the sink with the ingest details copied from Live Control Room; YouTube recommends RTMPS and explains where to obtain the stream key in its RTMPS guidance.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

Set encoder values for YouTube Live

Transport, video codec and rate control

YouTube accepts H.264 video and AAC audio over RTMP or RTMPS, and recommends RTMPS for secure transport. Its encoder guidance specifies CBR. Choose the video bitrate for the output resolution and frame rate, while leaving network capacity for audio and transport overhead. The following are YouTube recommendations—not guaranteed quality levels or universal minimums:

Output YouTube H.264 bitrate recommendation
720p at 30 fps 8 Mbps
1080p at 30 fps 14 Mbps
1080p at 60 fps 17 Mbps

These figures are from Google’s YouTube encoder settings guidance, current in 2026. Consult its full bitrate table for other resolutions and frame rates.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.

Keyframe interval

YouTube Help says: “Keyframe frequency: Recommended 2 seconds Do not exceed 4 seconds”. For x264enc, key-int-max is a frame count, not a number of seconds. At 30 fps, a two-second interval is approximately 60 frames; at 60 fps, it is approximately 120. Set the count to match the actual output frame rate, then confirm the resulting stream behavior. See the x264enc property reference and YouTube’s keyframe guidance.

AAC audio

YouTube recommends 44.1 kHz for stereo and 48 kHz for 5.1 surround sound. Its listed audio bitrates are 128 Kbps for stereo and 384 Kbps for 5.1. Over RTMP/RTMPS, YouTube supports 5.1 audio only with AAC. Ensure the audio branch actually negotiates the intended channel layout and sample rate rather than relying on the source defaults.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.

Build and validate the pipeline

  1. Check installed elements. Confirm that your GStreamer build includes the chosen source, x264enc or another H.264 encoder, h264parse, an AAC encoder such as voaacenc, flvmux, and an RTMP(S)-capable sink. The required plugins may be packaged separately, and local builds differ.
  2. Prepare the video branch. Convert the source to a format accepted by the encoder, encode H.264, then pass it through h264parse. Verify that the parser negotiates video/x-h264,stream-format=avc before the branch reaches the muxer. If the muxer rejects the video caps, this is the first negotiation point to inspect.
  3. Prepare the audio branch. Convert and resample the source as needed, encode AAC, and check the negotiated sample rate and channel layout. Use values appropriate to the intended stereo or 5.1 output.
  4. Join the branches with queues. Put a queue on each encoded branch before linking it to mux. Test with the real sources: H.264 encoder latency can exceed a simple queue’s defaults, allowing one branch to block while another queue fills.
  5. Configure the muxer and destination. Set streamable=true for streaming-friendly FLV output, then configure the installed RTMP(S) sink with the ingest URL and stream key from Live Control Room. The precise sink element and URI syntax are installation-specific.
  6. Test before the event. YouTube recommends a test with audio and movement similar to the planned event. Check Live Control Room’s stream health and messages while testing, and verify the delivered audio, picture, bitrate and keyframe cadence.

The streamable property omits indexes and duration from the FLV output. The muxer also documents timestamp-related controls such as enforce-increasing-timestamps and skip-backwards-streams; these do not replace correct timestamp handling upstream. See the flvmux reference.

Fix common pipeline failures

  • flvmux rejects the H.264 branch: Inspect caps after h264parse. The muxer’s H.264 input expects AVC stream format, so ensure the branch negotiates stream-format=avc.
  • The pipeline stalls or one branch stops: Encoder buffering can outlast a queue’s default limits. Increase the non-video queue limits or use one multiqueue, then test under realistic source conditions. GStreamer’s x264enc documentation describes this latency issue; Basic tutorial 10 covers GStreamer tools and pipeline behavior.
  • Live latency is too high: x264enc tune=zerolatency can help in some live scenarios, but it trades away quality. Compare the result using the actual content and target settings rather than treating it as a universal fix.
  • The parser’s parameter-set behavior needs adjustment: h264parse‘s config-interval controls SPS/PPS insertion; -1 inserts them with every IDR frame. Do not set it automatically—change it only when a diagnosed compatibility need calls for it. See the parser reference.
  • YouTube does not receive the stream: Confirm that the stream key and ingest address match the current Live Control Room details, that the sink supports the configured RTMP or RTMPS destination, and that the network allows the connection. Check the sink’s own error output because its exact behavior and URI syntax depend on the installed element.
  • Stream health reports instability: Check the configured CBR bitrate against the connection’s available capacity, including audio and overhead. Verify that the output frame rate matches the keyframe frame-count calculation, then review Live Control Room messages.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Copyright and YouTube channel rules

Technical compatibility does not grant permission to broadcast the material. Before sending a documentary, soundtrack, archive clip or other recording, confirm that you have the rights or permission needed for a live YouTube broadcast. YouTube’s encoder settings do not determine whether a channel qualifies for monetization or whether reused material meets its policies; check the current YouTube rules for the content and channel rather than treating a successful ingest as approval.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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

Or let it run in the cloud

If your goal is a YouTube channel that stays live with uploaded recordings, StreamNeo is a cloud alternative to maintaining a GStreamer machine at home. Upload a recording or build a playlist, add the YouTube stream key once, and go live. Nothing has to stay powered on at home; it plays uploads rather than broadcasting a camera. It supports any uploaded quality up to 4K 60fps at one price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card, one free day per account. Monthly pricing is $9.99 per month. Start your free day with StreamNeo.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Screening Room

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.