Skip to content
streamneo.
Setup Guides13 min read

How to Set Up an FFmpeg YouTube Stream on an Oracle Cloud VPS

Provision an Oracle Cloud Linux VM, connect over SSH, and send a test stream to YouTube Live with FFmpeg over RTMPS.

sn.
StreamNeoPublished 7 October 2026
Worth sharing?

To set up an FFmpeg YouTube stream on an Oracle Cloud VPS, first provision a Linux VM with a working route to the public internet, then connect over SSH and send a media file to the RTMPS destination shown in YouTube Live Control Room. The steps are straightforward, but neither Always Free capacity nor a successful stream is guaranteed by creating an instance.

Treat this as a configuration you need to test and check, not a set-and-forget promise. Oracle's free compute eligibility and idle-instance policy matter for an always-on channel, while YouTube's stream preview and health messages help you catch faults before you rely on the broadcast.

Check Always Free eligibility and capacity

Always Free compute is tied to your tenancy's home region, and availability depends on capacity there. Oracle documents its Ampere A1 Flex shape and Ubuntu among eligible options, but a shortage of host capacity can prevent an instance from being created at the time you try. Choosing a free-eligible shape is not the same as reserving one.

Check Oracle's Always Free resource documentation before planning around a VM. As listed by Oracle's documentation in October 2026, the A1 Flex allowance includes the first 1,500 OCPU-hours and 9,000 GB-hours per month, equivalent for Always Free tenancies to 2 OCPUs and 12 GB of memory. These are tenancy allowances, not a promise that a particular shape will be available in your region at a particular moment. Recheck the current Oracle page before provisioning because eligibility and resource terms can change.

For a 24/7 channel, account for a less obvious condition: Oracle says idle Always Free instances may be reclaimed. It describes a seven-day evaluation period and thresholds based on CPU, network, and, for A1, memory utilisation. A persistent stream may create activity, but you should not assume that every file, profile, or quiet scene will keep metrics above those thresholds. The actual usage of your instance determines whether the policy applies.

This also affects the meaning of “free” for your workflow. Capacity may be unavailable when you want to create a machine, and an instance that runs today is not guaranteed to remain available indefinitely. Keep the source media and command configuration somewhere you can retrieve them again, and decide how you would restore the channel if the VM were reclaimed or became unavailable.

Provision a Linux VM and connect over SSH

Oracle's Linux instance tutorial walks through the broad sequence: create or select a virtual cloud network (VCN), use a subnet that can reach the internet, create the instance, and connect over SSH. Follow Oracle's current first Linux instance tutorial for the console workflow and current interface labels. This article does not verify today's console defaults, so inspect the network and access settings rather than assuming they were configured as you expect.

Select the home region if you are trying to use Always Free resources, then choose an eligible Linux image and shape that is available to your tenancy. Ubuntu is a practical starting point because the research notes identify it among Oracle's eligible image choices, but confirm the current options in the console. Give the instance an SSH public key during setup, or follow Oracle's current method for adding one. Keep the matching private key private and accessible to the person who will administer the VM.

For direct SSH administration, assign a public IP and allow inbound SSH only from a trusted source address where feasible. Avoid opening administrative access broadly just to make the first connection easier. The exact security list or network security group arrangement depends on the VCN configuration; verify the effective ingress rules before you troubleshoot SSH. You need an inbound path for your own administration, but sending a stream to YouTube is a separate outbound connectivity requirement.

From your computer, connect using the VM's public IP, the login name associated with the chosen image, and the private key that matches the configured public key. Image-specific usernames and key handling can differ, so use the current Oracle image instructions rather than guessing. If SSH fails, check the address, username, key file permissions, route, and ingress rule one at a time. A successful SSH session proves you can administer the VM; it does not prove that FFmpeg can reach YouTube.

Confirm public internet routing

For this task, the VM must be able to make an outbound connection to the public internet. A public IP on its own does not establish that the VCN, subnet route, and gateway are set up correctly. Check the routing arrangement described in Oracle's tutorial and confirm that the instance is in a subnet configured for internet access. Do not treat instance creation or SSH access as proof of outbound reachability.

Keep the two connection directions distinct. SSH ingress is how you reach the VM from your computer. The stream connection is an outbound session from FFmpeg to the RTMPS host and port supplied by YouTube. A firewall or network rule may allow one direction and block another. If the VM can be reached over SSH but the stream cannot start, examine outbound connectivity and FFmpeg's destination rather than repeatedly changing the SSH rule.

Once connected, use the operating system's available network tools to check name resolution and whether a connection to the supplied destination can be made. Tool availability and exact commands vary by Linux image; use the current Ubuntu documentation for package and diagnostic commands. These are useful checks, not guarantees: a successful connection test does not establish that the stream key is valid, that the media is encoded correctly, or that YouTube will report healthy video and audio.

If you are new to separating network capacity from configuration problems, the upload-speed checks for YouTube Live offer a useful way to think about whether a sending path has room for the chosen output. A VPS is not your home broadband connection, but the principle still applies: the available outbound path must cope with the stream's bitrate continuously, with some headroom for variation.

Install and verify FFmpeg

Install FFmpeg using the current instructions for the Linux release on your VM. Package versions and build options change, so use the Ubuntu package guidance or FFmpeg's official documentation rather than copying an install line that may no longer match your image. This research did not verify a package version, installation command, or the protocol support of any particular OCI image.

After installation, check the version and build configuration with FFmpeg's help output. Confirm that the build supports the output protocol needed for the YouTube-provided RTMPS address. Do not assume that every packaged build exposes the same protocols or encoders. If RTMPS is absent, choose a suitable package or build and verify it before putting the stream key into a command.

Also check the media you intend to send. Note its resolution, frame rate, video codec, audio codec, and whether it has audio at all. A file that plays locally may still be unsuitable as a continuous stream source: it may contain a short segment, unexpected audio gaps, or black frames. For a preflight, the black-frame check before adding a video to a YouTube stream can help you find a content defect before debugging the encoder.

FFmpeg commands are sensitive to option placement and input format. A command for a file input is not automatically suitable for a capture device or a playlist, and loop behaviour depends on how the input is specified. Because exact command syntax and option interactions were not verified in this research, do not treat an untested recipe as copy-and-run. Check the official FFmpeg documentation for the installed build and test with a short, controlled source before making the channel public.

Get YouTube's RTMPS URL and protect the key

In YouTube Studio, create or select the live stream and open Live Control Room. Copy the actual RTMPS URL and stream key shown there. Do not guess an ingest hostname or substitute a URL from an old command: YouTube's instructions say the RTMPS address is available in Live Control Room, even when the ordinary RTMP address is displayed by default.

YouTube recommends RTMPS, which carries RTMP over TLS/SSL. Its encoder guidance describes the recommended protocols and encoding settings. If you see an SSL error, first verify that you selected the RTMPS scheme and the exact server shown in Live Control Room. YouTube's RTMPS guidance says to try port 443 if needed; use the current address and instructions rather than inventing a different endpoint.

Treat the stream key as a credential. YouTube Help describes stream keys as like a stream's password and address. Anyone who obtains it may be able to send to that stream, so avoid pasting it into a public script, a screenshot, a public support post, or a shared terminal transcript. Store the command in a location with access limited to the people who need to operate it. If you believe the key has been exposed, reset it in YouTube Studio and update the stream configuration.

When you place the destination and key in an FFmpeg command, be aware that shell history and process listings can expose command-line arguments to users with access to the VM. Limit server access, avoid sharing logs that contain the full destination string, and consider a protected configuration method appropriate to your environment. Keep the exact secret out of this article's example and out of any public repository. YouTube's stream settings help explains how to manage stream settings and keys.

Send media to YouTube using RTMPS

Build the FFmpeg output around three things: the source media, the encoding settings, and the RTMPS target copied from Live Control Room. For a file, confirm first that the input is readable from the VM and that the chosen video and audio streams are the ones you intend to broadcast. Keep the target and key private; a placeholder in a private configuration is safer than publishing a complete command containing a real key.

For a starting profile of H.264 at 1080p and 30 frames per second, YouTube lists 10 Mbps as its recommended video bitrate, with constant bitrate (CBR) and a two-second keyframe interval. Its guidance allows AAC or MP3 audio. As listed in YouTube Help's encoder guidance in October 2026, this is a platform-side recommendation, not a benchmark showing that a specific Oracle shape can encode it or sustain the outbound path. If the VM struggles, reduce the output profile and test again rather than assuming that an Always Free shape can handle a particular workload.

Output target YouTube's listed H.264 video bitrate What to check on the VM
720p at 30 fps 8 Mbps Can the encoder and outbound connection sustain the chosen output?
1080p at 30 fps 10 Mbps Does the VM encode without falling behind, and does the preview look right?
1080p at 60 fps 14 Mbps Is there sufficient encoding capacity and a stable sending path?

The settings in the table are YouTube recommendations, not guaranteed outcomes. The VM's available CPU, the chosen encoder, source format, and network path all affect results. No performance test was conducted for an OCI shape or FFmpeg command here. If you use H.265 or AV1 rather than H.264, check YouTube's current table for the corresponding settings and confirm that your FFmpeg build and stream workflow support your chosen codec.

You can encode the file while sending it, or use a source already encoded to a suitable format. Encoding on the VM makes it easier to set a defined output profile, but it consumes compute. Copying a compatible stream can reduce encoding work, but only if the source's codec, frame rate, resolution, and bitrate fit the intended output and YouTube accepts the stream. Do not select a profile solely by resolution: a 1080p file can still be difficult to encode or send reliably on a constrained VM.

Start with a short run and read FFmpeg's output for connection, encoding, and timestamp errors. Check that output is progressing rather than stalled. If YouTube reports no incoming data, verify the destination, key, protocol support, and outbound path. If video arrives but is not healthy, inspect the codec and output settings as well as the media itself. The FFmpeg RTMP connection troubleshooting guide is relevant when the failure is at the sender-to-ingest connection stage.

Test the stream and plan for reclamation

Before you make the stream public, use a private or otherwise controlled test. YouTube recommends testing with movement and sound similar to the intended programme, then reviewing the preview and stream health messages. A static image with silence may not reveal the same encoding or audio issues as the real channel. Compare what appears in the preview with the source: check for video, audible sound, the expected aspect ratio, and whether the image freezes or breaks up.

A successful initial connection is only one check. Leave the test running long enough to observe whether FFmpeg continues sending, whether YouTube continues receiving, and whether the VM remains reachable. Watch for repeated reconnects, high CPU load, dropped or delayed frames, and audio that is absent or out of sync. These observations tell you what happened during that test; they do not guarantee the same result after a VM restart, a network change, or a different source file.

For an always-on channel, make a recovery plan. Keep a copy of the media, stream configuration without exposed secrets, and the steps needed to recreate the VM. Record the home region, selected image, shape, network arrangement, and SSH access method. If OCI reclaims an idle instance, or if the VM stops for another reason, you need enough information to provision and reconnect again. Do not assume that a free allocation means a permanent host.

The idle-instance policy deserves particular attention for a video that barely changes or a stream whose network use is low. Oracle's published criteria use CPU, network, and A1 memory utilisation across a seven-day period; consult the current policy page for exact definitions. A channel operator cannot infer from “FFmpeg is running” alone whether those metrics meet the documented thresholds. Check the actual usage in OCI and plan for the possibility that an instance may be reclaimed.

If your real need is a loop that continues while your personal computer is off, distinguish that operational requirement from this VPS workflow. This VPS approach asks you to manage the Linux host, key, network, and FFmpeg process yourself. The article on moving a YouTube loop from OBS to a cloud service discusses the broader change in operating model, while the guide to running a 24/7 Sai Sandhya stream covers channel-level planning for a devotional loop. StreamNeo is not part of this FFmpeg VPS workflow; it addresses the separate problem of keeping a file-based YouTube broadcast running without your own computer operating the encoder.

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

How do I set up an FFmpeg YouTube stream on an Oracle Cloud VPS?

Create an eligible Linux instance in your home region, configure a public internet route, and connect over SSH with the key set during provisioning. Install a build of FFmpeg that supports the protocol you need, then use the RTMPS URL and stream key from Live Control Room. Test privately and check YouTube's preview and health messages before going public.

Can I use an Always Free Oracle VM for a 24/7 stream?

Possibly, if an eligible instance is available in your home region and its compute and network capability suit the stream. Oracle says Always Free capacity can be unavailable and that idle instances may be reclaimed under its published policy. Check current terms and monitor the actual instance rather than treating availability or continued operation as guaranteed.

What bitrate should I use for 1080p30?

YouTube lists 10 Mbps for H.264 at 1080p and 30 fps, with CBR and a two-second keyframe interval as its recommended starting settings. That is not a guarantee that your VM can encode or send at that rate. Test the actual output and reduce the profile if the VM or network path cannot sustain it.

What should I check if RTMPS does not connect?

Confirm that FFmpeg supports the required protocol and that you copied the RTMPS URL and key from the current Live Control Room settings. Check the VM's outbound route and firewall behaviour, then review FFmpeg's error output. For SSL errors, YouTube advises verifying the correct RTMPS endpoint and trying port 443 if needed.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Setup Guides guides ↗ · All topics ↗