Encoder Guide: H.264 Main Profile for HbbTV and Smart TV Compatibility (vMix / OBS)
This guide explains how to configure your encoder (vMix or OBS) to produce streams that are more compatible with HbbTV and Smart TVs (Samsung Tizen, LG webOS, etc.). The goal is to avoid incompatibilities caused by undesired H.264 profiles and ensure stable playback on devices with stricter decoders.
- Goal and what actually changes
- Why the H.264 profile matters on HbbTV/Smart TVs
- Recommended presets (Main, Level, GOP, audio)
- Recommended quality and bitrates (ABR ladder)
- How to configure vMix (step by step)
- How to configure OBS (x264 and NVENC)
- How to verify the stream is “Main” (ffprobe)
- Quick checklist before going live
- Troubleshooting
1) Goal and what actually changes
The target output is an H.264 stream with:
- Profile: Main (avoid undesired profiles when you need standardization)
- Level consistent with resolution and frame rate (e.g., 720p50 typically Level 3.1)
- Regular GOP (stable keyframe interval) for HLS/DASH
- Standard AAC-LC audio
Once applied, HbbTV/Smart TV devices typically play more reliably, with fewer cases of abnormal buffering or streams that fail to start.
2) Why the H.264 profile matters on HbbTV/Smart TVs
PCs and smartphones are usually forgiving. TVs and HbbTV environments can be stricter: if your stream uses an unusual combination of profile/level/GOP (or parameters outside expectations), some models may:
- fail to start playback,
- start but stutter or skip,
- lock into endless buffering,
- play audio without video (or the reverse).
For maximum compatibility: keep parameters conservative and standard. Main profile, correct level, stable GOP, AAC-LC audio, and avoid aggressive encoder tricks.
3) Recommended presets (Main, Level, GOP, audio)
- Codec: H.264 / AVC
- Profile: Main
- Level: 3.1 for 720p50; 4.0/4.1 for 1080p (depends on fps/bitrate)
- Frame rate: match the source (25/50 are common broadcast values)
- Keyframe interval (GOP): 2 seconds (50 fps ? keyint 100; 25 fps ? keyint 50)
- GOP: constant; “closed GOP” preferred
- Rate control: CBR or a stable ABR (avoid large bitrate spikes)
- Codec: AAC-LC
- Sample rate: 48 kHz
- Bitrate: 128 kbps (stereo) or 96 kbps if you need to save bandwidth
- Channels: Stereo (2.0)
Note: avoid non-standard audio formats or unusual sample rates (e.g., 44.1 kHz) if your target includes TVs.
Useful extra parameters (if available)
- B-frames: 2 (if the encoder handles them well; usually OK with Main)
- CABAC: enabled (Main supports CABAC)
- Scenecut: avoid variability in keyframe placement (stable GOP)
4) Recommended quality and bitrates (ABR ladder)
If you publish multiple qualities, here is a simple and robust ladder (indicative values; adjust to content):
| Resolution / FPS | Video bitrate | Audio | Notes |
|---|---|---|---|
| 1920x1080 @ 25 fps | 3500 - 5500 kbps | AAC 128 kbps | Good for sports/news; verify Level (often 4.0/4.1) |
| 1280x720 @ 50 fps | 2000 - 3500 kbps | AAC 128 kbps | Common for live TV playback; typically Level 3.1 |
| 854x480 @ 25 fps | 900 - 1400 kbps | AAC 96 kbps | Excellent fallback for mobile networks and weaker devices |
| 640x360 @ 25 fps | 500 - 900 kbps | AAC 64 - 96 kbps | Last-resort fallback for difficult conditions |
5) vMix: set Profile Main (step by step)
vMix - Streaming Settings (diagram) 1) Open Streaming Menu: Settings -> Streaming 2) Quality Select a preset (e.g., 720p) 3) Gear icon Open advanced Video/Encoder Video / Encoder section Codec H.264 / AVC Profile Main (key setting) Level 3.1 (720p50) Keyframe interval 2 seconds Stable GOP for HLS/DASH Audio AAC-LC 48 kHz 128 kbps vMix diagram: open Streaming settings, then set Profile = Main, choose a suitable level, and keep a stable GOP.Quick steps (vMix)
- Open Streaming Settings.
- Select your quality (e.g., 720p) and open advanced options (settings/gear icon).
- In Video, set Profile: Main and an appropriate Level.
- Set Keyframe interval: 2s (stable GOP).
- Audio: AAC-LC, 48 kHz, 128 kbps.
- Restart the stream and verify with
ffprobe(section 7).
6) OBS: set Profile Main (x264 and NVENC)
OBS Studio - Settings - Output (diagram) 1) Settings -> Output Output Mode: Advanced 2) Streaming tab Encoder: x264 or NVENC 3) Keyframe Interval 2 seconds (recommended) 4) Profile Main (target) Example: x264 Rate Control CBR / stable ABR Bitrate e.g., 2500 kbps Keyframe Interval 2 Profile main (OBS label) Custom (optional) profile=main level=3.1 keyint=100 OBS diagram: set Output Mode to Advanced, then in Streaming set Profile = main and Keyframe Interval = 2.OBS (x264) - recommended settings
- Settings -> Output -> Output Mode: Advanced
- Streaming tab
- Encoder: x264
- Rate Control: CBR (or stable ABR)
- Keyframe Interval: 2
- Profile: main
profile=main
level=3.1
keyint=100
min-keyint=100
scenecut=0
Note: keyint depends on fps. Example: 50 fps -> 2s -> 100; 25 fps -> 2s -> 50.
OBS (NVENC) - recommended settings
- Encoder: NVIDIA NVENC H.264
- Profile: main
- Keyframe Interval: 2
- Rate Control: CBR (or VBR with strict limits)
7) Quick verification: check Profile/Level with ffprobe (for technical staff only - if needed, open a ticket to validate the stream)
After changing encoder settings, verify with ffprobe (or mediainfo) that the video is truly Main. Example using an HLS/DASH manifest URL:
ffprobe -v error -select_streams v:0 -show_entries stream=codec_name,profile,level,width,height,r_frame_rate \
-of default=noprint_wrappers=1 "MANIFEST_URL"
profile=Main(orprofile=main)level=31(Level 3.1) or 40/41 for Level 4.0/4.1- Resolution and frame rate matching your preset
8) Quick checklist before going live
- H.264 Profile = Main
- Level matches resolution/fps
- Keyframe interval = 2s (stable GOP)
- Audio AAC-LC, 48 kHz, 96-128 kbps
- Stable bitrate (avoid unusual spikes)
- Test on at least one Samsung + one LG (if possible) and one desktop player
9) Troubleshooting
The TV does not start playback or stays buffering
- Verify Profile/Level with
ffprobe. - Reduce complexity: try 720p25/50 with a lower bitrate for testing.
- Ensure the GOP is stable (2s keyframes) and does not drift.
Audio works but video does not (or vice versa)
- Audio: use AAC-LC 48 kHz; avoid alternative formats.
- Video: confirm you are not using an unsupported profile/level on the device.
Quality is poor or full of artifacts
- Increase bitrate (especially for sports/motion-heavy content).
- If using VBR, cap peaks (CBR is often safer for many TV workflows).
- Check the source chain (deinterlace if required).
