Advanced Guide • FFmpeg Extra Args • Presets • Modes • HTTPS

Xtranscoder Advanced Settings Guide
FFmpeg Defaults, Presets & Pro Tweaks

Learn how to get the best results from your self-hosted live streaming transcoder: RTSP/RTMP/HTTP → HLS, with the right x264 presets, bitrate control, keyframes, audio settings, and when to use Static vs On-Demand mode.

Important: The defaults are the sweet spot for most channels — only change advanced settings when you have a specific goal.

Quick Start Workflow (Daily Use)

Add a stream
Name + Input URL → “Add stream”
Start / Stop
Use ▶ Start or ⏹ Stop per channel
Restart
🔁 Restart clears HLS and starts clean
Preview & Logs
👁 Preview to verify • 🧾 Logs to troubleshoot
Demo tip: You can run the 2-stream demo as long as you like on your own server. Upgrade later by pasting your license in Settings to unlock unlimited streams.
Xtranscoder Advanced Settings - Custom FFmpeg extra arguments

One-Line Install (Ubuntu 22.04 / 24.04)

Install the demo with one command. During install you can enable HTTPS by providing a domain — the installer will automatically set up SSL on the panel and streaming endpoints. This is especially useful when you need to play HTTP sources on an HTTPS website.

HTTPS note: To use HTTPS you’ll need a domain pointing to your server. The installer prompts for the domain and configures SSL for the dashboard and HLS delivery.
bash <(curl -fsSL http://www.install.xtranscoder.com/xtranscoder.sh)

Default Transcoding Settings (The Sweet Spot)

By default, Xtranscoder uses an H.264 (x264) setup designed for reliability, compatibility (including older devices), and stable streaming bitrates. These defaults are an excellent balance of quality, CPU cost, and player compatibility.

-c:v libx264 -preset:v faster -b:v 3M -maxrate 3M -bufsize 6M -profile:v baseline -force_key_frames expr:gte(t,n_forced*5) -c:a copy -pix_fmt yuv420p
-c:v libx264
Encode video using x264 (H.264) — widely supported.
-preset:v faster
CPU vs compression tradeoff. Faster = less CPU, slightly less efficiency.
-b:v / -maxrate / -bufsize
Streaming-friendly rate control (VBV). Keeps bitrate predictable for players/CDNs.
baseline + yuv420p
Compatibility mode + common pixel format for maximum playback support.
force_key_frames every 5s
Keyframe interval improves seeking and segment boundary stability for HLS.
-c:a copy
Pass through audio without re-encoding (saves CPU, avoids audio quality loss).
Rule of thumb: Keep defaults unless you’re fixing a problem (bandwidth, audio codec, device compatibility) or optimizing for a special scenario (very weak CPU, ultra-low bitrate, etc.).

Preset Options (ultrafast → medium)

Presets control how hard x264 works to compress video. Slower presets can improve quality at the same bitrate, but they use more CPU.

ultrafast superfast veryfast faster fast medium
  • ultrafast: lowest CPU, worst compression efficiency (quality drop at low bitrates).
  • superfast / veryfast: great for many live feeds; common “workhorse” presets.
  • faster (default in your guide): strong balance for CPU streaming servers.
  • fast / medium: better compression/quality at same bitrate, but higher CPU.
Best practice: Try veryfast or fast only if you have a clear goal. For most channels, defaults are the sweet spot.

Mode: Static vs On-Demand

Xtranscoder supports two operating modes per channel:

Static
Always runs when enabled. Best for 24/7 channels and constant viewers.
On-Demand
Starts when a viewer requests the playlist and stops after inactivity — saves CPU.
Cost saver: On-Demand mode is ideal when streams are viewed occasionally. You avoid running (and paying for) always-on transcodes.

6 Advanced “FFmpeg Extra Args” Examples (Copy/Paste)

Paste these into Advanced FFmpeg extra args for a channel. These are appended to the safe defaults. Do not include -i or HLS output flags.

1) Incoming ~10 Mbps → Target ~2 Mbps (minimal quality loss)

Use a tighter bitrate cap while keeping compatibility. Great for bandwidth reduction.

-b:v 2M -maxrate 2M -bufsize 4M -preset:v faster

2) Better quality at the same bitrate (more CPU)

If your CPU has headroom, slower presets squeeze more quality out of the same Mbps.

-preset:v medium

3) Reduce CPU usage (accept slightly lower efficiency)

When running many channels on a budget CPU server.

-preset:v veryfast

4) Force AAC audio (when “copy” causes playback issues)

Useful if the source audio codec isn’t ideal for your target players.

-c:a aac -b:a 128k -ac 2 -ar 44100

5) More frequent keyframes (snappier seeking / segment alignment)

Drops keyframe interval to 2 seconds (can slightly increase bitrate spikes).

-force_key_frames expr:gte(t,n_forced*2)

6) Stronger compression for low bitrates (recommended for 1 Mbps–1.5 Mbps)

When you must push bitrate down, a slower preset can help preserve detail.

-b:v 1200k -maxrate 1200k -bufsize 2400k -preset:v fast
Reminder: Defaults are the sweet spot. Start with defaults, then change only one thing at a time (bitrate OR preset OR audio) so you can measure impact.

Best Practices for RTSP/RTMP/HTTP → HLS

  • Use On-Demand mode to reduce CPU costs when streams are viewed intermittently.
  • Keep baseline + yuv420p for maximum player compatibility (web + mobile).
  • Lower -b:v and -maxrate to control bandwidth and CDN spend.
  • Change presets only when you need more compression (slower) or lower CPU (faster).
  • Use logs to quickly identify unstable sources and confirm failover behavior.

Scroll to Top