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
To send a 4K 60fps video file to YouTube Live from Ubuntu 24.04, use FFmpeg with YouTube’s current ingest endpoint and stream key. For H.264, YouTube recommends 50 Mbps; for H.265/HEVC or AV1, it recommends 35 Mbps. Use constant bitrate (CBR), a two-second keyframe interval, and RTMPS when supported. First check whether your file already matches the target settings: stream copy avoids re-encoding, but it cannot fix an unsuitable source.
What you need before streaming
- An Ubuntu 24.04 system with an FFmpeg build that includes the encoder you plan to use.
- A video file with a known resolution, frame rate, video codec, pixel format, audio streams, and bitrate.
- A YouTube Live stream configured in Live Control Room, where you can retrieve its current ingest endpoint and stream key.
- Reliable upload capacity for the selected codec and bitrate. YouTube’s published bitrate figures are recommendations, not a guarantee that your source, encoder, or connection can sustain them.
Check the source file and FFmpeg installation
Inspect the video with ffprobe
Use ffprobe, normally installed alongside FFmpeg, to inspect the file before choosing copy or re-encoding. For example:
ffprobe -hide_banner -i input.mp4
Review the video codec, dimensions, frame rate, pixel format, and bitrate, along with the available audio streams. A source that is already 3840×2160 at 60 fps with a suitable codec, bitrate, and keyframe cadence may be sent without re-encoding. If any important property is unsuitable, stream copy will preserve the problem rather than correct it.
Recommended Free Tools
Confirm the available FFmpeg build and encoders
On Ubuntu 24.04, check the installed binary and its encoder list before relying on any specific software or hardware encoder:
#1 Best Overall
ffmpeg -version
ffmpeg -encoders
FFmpeg options depend on the installed version and build configuration. Ubuntu Noble’s FFmpeg documentation lists VAAPI and QSV hardware acceleration, but an option only works when the relevant support is present and compatible with the selected decoder and encoder. Do not assume a particular NVIDIA, Intel, or AMD command will work on every Ubuntu installation, or that your machine can sustain 4K60 encoding.
Choose copy or re-encoding
Use stream copy only when the file is already suitable
Stream copy avoids decoding and encoding the media. It is appropriate only when the input already has the desired 3840×2160 resolution, 60 fps, selected codec, bitrate, and keyframe cadence. FFmpeg’s documented RTMP workflow uses real-time input with FLV output; substitute the actual RTMPS ingest URL and private stream key supplied by YouTube:
Rank #2
ffmpeg -re -i input.mp4 -c copy -f flv 'rtmps://INGEST_HOST/live2/STREAM_KEY'
This is a command pattern, not a verified end-to-end command for every file or system. If the file’s properties do not meet the intended ingest settings, use a suitable encoder instead of copy.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteTranscode to H.264 as an illustrative 4K60 configuration
The following example scales and sets the output to 3840×2160 at 60 fps, then encodes H.264 with a 50 Mbps target and a two-second GOP. At 60 fps, 120 frames correspond to two seconds:
Rank #3
ffmpeg -re -i input.mp4
-vf 'scale=3840:2160,fps=60'
-c:v libx264 -pix_fmt yuv420p
-b:v 50M -maxrate 50M -bufsize 100M
-g 120 -keyint_min 120 -sc_threshold 0
-c:a aac -b:a 128k -ar 44100
-f flv 'rtmps://INGEST_HOST/live2/STREAM_KEY'
This is an illustrative starting point, not a universal preset. Inspect the source and adjust scaling, pixel format, profile, and audio mapping to suit the actual material and YouTube’s current guidance. Confirm that the installed FFmpeg build has libx264. The 50 Mbps video bitrate and two-second keyframe interval reflect YouTube’s published H.264 4K60 recommendations; the other command values are example settings, not a promise of compatibility or quality.
Set the ingest codec and bitrate
YouTube Help’s current encoder guidance, accessed in 2026, lists these 4K/2160p 60 fps ingest bitrate recommendations:
Rank #4
| Codec | Recommended bitrate | Minimum bitrate | Guidance |
|---|---|---|---|
| H.264 | 50 Mbps | 14 Mbps | Use CBR and a two-second keyframe interval; do not exceed four seconds. |
| H.265/HEVC | 35 Mbps | 10 Mbps | Use CBR and a two-second keyframe interval; do not exceed four seconds. YouTube recommends H.265 for HDR. |
| AV1 | 35 Mbps | 10 Mbps | Use CBR and a two-second keyframe interval; do not exceed four seconds. AV1 is not supported for HDR, according to YouTube’s guidance. |
These are ingest recommendations and minimums published by YouTube, not independent performance measurements. Check that your FFmpeg build can encode the chosen codec and that your upload connection can reliably sustain its bitrate. For SDR, YouTube recommends Rec. 709 and 8-bit; for HDR, its guidance specifies 10-bit.
Get the YouTube endpoint and stream key
- Open YouTube Live Control Room and create or select the live stream you intend to use.
- Retrieve the current ingest endpoint and stream key shown for that stream. Use the endpoint YouTube provides rather than treating the example host above as literal.
- Replace
INGEST_HOSTandSTREAM_KEYin the FFmpeg command with the actual values, preserving the endpoint’s required path and format. - Keep the stream key private. Do not expose it in a public script, screenshot, shell history, or logs. If it is disclosed, replace or reset it in YouTube’s controls before streaming again.
YouTube recommends RTMPS where supported. FFmpeg documents RTMP with FLV output and RTMPS as a protocol variant; use the actual secure endpoint supplied for your stream.
Best Value
Test before the live event
- Run a test using the same file type, output settings, network, and encoder you expect to use live.
- Include representative motion and audio rather than testing only a static or silent segment.
- In Live Control Room, check that YouTube receives the expected resolution and frame rate and monitor stream health and any messages.
- If you change codec, bitrate, encoder, or source, repeat the test with the revised configuration.
YouTube’s help guidance explicitly advises testing before going live and monitoring stream health during the event. Its guidance also notes that 4K streams are optimized for normal latency rather than the low-latency improvement option.
Troubleshoot common problems
YouTube does not receive a stream
- Check the endpoint and key: confirm both were copied from the correct Live Control Room stream and that the URL path is intact.
- Check protocol and output: the example uses FLV output to an RTMPS endpoint. Confirm the selected endpoint and FFmpeg build support the protocol you are using.
- Protect credentials: if the key was exposed or copied incorrectly, replace it in YouTube’s controls and update your command.
The stream drops frames or becomes unstable
- Check upload headroom: compare real, sustained upload capacity with the selected video bitrate; a connection that cannot hold it can undermine the stream.
- Check encoder load: 4K60 encoding may exceed the machine’s capacity. Verify the encoder is present and compatible, and test a representative segment before the event.
- Check the source and settings: stream copy does not repair an unsuitable input. Inspect the file and use an appropriate transcode if it does not match the target.
The received resolution or frame rate is wrong
- Confirm the source properties with ffprobe and, for a transcode, verify that the output filter and encoder settings match 3840×2160 and 60 fps.
- Check the incoming stream details in Live Control Room rather than relying only on the command line.
FFmpeg reports an unknown encoder or unsupported option
- Check
ffmpeg -versionandffmpeg -encoders. Install or select a build that includes the needed encoder, or choose an encoder available in your build. - For hardware encoding, verify that the build, drivers, device, and chosen encoder support the options together. Hardware acceleration is not universal across Ubuntu systems.
Or let it run in the cloud
If your goal is to keep a pre-recorded video live on YouTube without leaving a computer running, StreamNeo uploads and loops your recording from the cloud: upload the video, add your YouTube stream key once, and go live. Nothing has to stay on at home; automatic recovery can restart the stream if YouTube drops it. Each slot streams the uploaded quality up to 4K 60fps at one flat price per slot, with no re-encode or quality tiers. The first day is free with no card, and the monthly option is $9.99 per month. It is for uploaded videos streamed to YouTube, not live camera input. Start the free first day with 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.

