A workshop with the HandBrake logo in front

How to encode a Broadcast Video with HandBrake

Posted on September 6, 2022 by Christian Engel

Steam is very strict with how a video should be encoded to be streamed as a Steam Store Broadcast. The #1 problem is a keyframe issue because Steam requires a keyframe in your streamed video every two seconds. If you don’t get this setting right, Steam will accept your stream for a couple of seconds and then cut the connection. That’s very frustrating, especially because Steam won’t send any reason to RoboStreamer about why the streaming was stopped. You have to look it up manually in the Steam Broadcast backend.

However: in this article, I am going to explain how you can encode / convert your video files, so they work perfectly as a Steam Store Broadcast using the free and open source tool HandBreak. HandBreak is available for Windows, Mac and Linux and has a relatively easy to use interface - so it’s certainly a good choice for your encoding tasks.

Download and import the Steam Broadcast HandBrake preset

HandBrake allows to create presets with certain video/audio encoding settings, so you don’t need to configure everything from scratch each time you want to encode a video file. Even better, the presets can be exported and imported to be shared, so I created a preset for you to download and import into HandBrake right away:

Download the Steam Broadcast HandBrake Preset
If your browser shows the linked JSON file as text,
do a right-click on the link instead and choose “Save target as”.

After you downloaded the preset file, select Presets > Import from file from the HandBrake application menu and import the Steam Broadcast HandBrake preset. It will appear in your preset list under the name Steam Broadcast.

HandBrake screenshot showing the expanded preset menu with the Steam Broadcast preset

Select the preset from the list of available presets by clicking on the Presets button in the big button bar and select the Steam Broadcast preset from the list popup. It should be located unter Custom Presets.

Select your video, check the settings and go!

Click on the button Open Source in the big button bar and select the video you want to make ready to be streamed as Steam Store Broadcast. After you made your selection, you will see a preview of your video in the summary tab of HandBrake:

HandBrake screenshot showing the encoding summary tab with a video selected

Its important that the output format is set to MP4 - also make sure that the output filename uses the extension .mp4. For me, HandBrake sets the extension to .m4v by default. You can see the output file name at the bottom of the window in the Save as box.

Video encoding settings

Head over to the Video tab to validate if all settings are fine here. Steam requires a max bitrate of 7000kbps so it’s the best you leave your video at 30fps, even when you recorded it with more frames per second. The reason is that when your codec tries to fit 60 frames worth of data into 7000kb the quality will be much worse than when its only 30 frames per second.

Under “Advanced Options”, I entered the value keyint=60 which controls the keyframe setting I mentioned at the beginning of the article. Other encoding tools sometimes refer to this as GOP ( Group of Pictures ). With a framerate of 30fps, a GOP of 60 means that a keyframe will be placed every two seconds - exactly what Steam needs to have.

HandBrake screenshot showing the video tab with various h.264 settings

Audio encoding settings

Last but not least: make sure that in the audio tab, the correct codec AAC LC with a bitrate of 128 is selected. No worries - this amounts to a total video+audio bitrate of 7128kbps which is more than the maximum 7000kbps Steam states in the Broadcast documentation but the platform will accept your stream just fine.

HandBrake screenshot showing the audio tab with AAC and 128kbps bitrate

Encode and upload to RoboStreamer

After you checked if all settings are fine, you can click the green Start Encode button from the big button bar. When HandBrake has finished your video conversion, you can continue and upload your video to RoboStreamer.


You have a question or just want to talk?

You can reach out by mail or find RoboStreamer on Twitter or join my RoboStreamer Discord Server.
I am always available for a chat (just sometimes, I need to sleep a few hours)!

Recent articles