How to Customize Video Output Settings in RedditVideoMakerBot

Configure resolution_w, resolution_h, video_codec, and audio_codec in your config.toml file to control the final video format, quality, and encoding parameters.

The RedditVideoMakerBot generates Reddit-style videos by stitching together screenshots, text-to-speech audio, and optional background video. Understanding its configuration system allows you to fine-tune output resolution, codec selection, and bitrate settings without modifying source code. This guide covers the TOML-based configuration schema and FFmpeg integration points defined in utils/config.py and video_creation/final_video.py.

Configuration File Structure

The bot uses a config.toml file located in your project root or a custom path specified via settings/config.toml. All video output parameters live under the [settings] table with nested [settings.background] and codec-specific keys.

[settings]
resolution_w = 1080
resolution_h = 1920
fps = 30

[settings.background]
background_choice = "minecraft"
background_audio_volume = 0.15
background_audio_fade = 0.2

[settings.codec]
video_codec = "libx264"
audio_codec = "libfdk_aac"
video_bitrate = "4M"
audio_bitrate = "192k"

Video Resolution and FPS

resolution_w and resolution_h define the output dimensions in pixels. The default configuration produces 1080×1920 vertical video optimized for mobile viewing (resolution_h = 1920, resolution_w = 1080). For standard landscape output, swap these values or set both to 720 for 720p square formats.

Resolution Width Height Use Case
Mobile Vertical 1080 1920 TikTok/Reels/Shorts (default)
Square 720 720 Instagram feed
Landscape 1920 1080 YouTube standard
[settings]
resolution_w = 720
resolution_h = 720
fps = 30

Codec Selection and Bitrate

The video_codec parameter accepts any FFmpeg-supported encoder. The default libx264 provides H.264 compatibility across platforms. For hardware acceleration, use h264_nvenc (NVIDIA) or h264_qsv (Intel). The audio_codec defaults to libfdk_aac for high-quality AAC encoding, falling back to aac if unavailable.

[settings.codec]
video_codec = "h264_nvenc"
audio_codec = "libfdk_aac"
video_bitrate = "8M"
audio_bitrate = "256k"
preset = "slow"  # libx264-specific tuning

video_bitrate controls visual quality—higher values reduce compression artifacts but increase file size. For 1080p60 content, use 4M-8M; for 720p, 2M-4M suffices.

Background Video and Audio

The background_choice parameter selects which MP4 file from assets/backgrounds/ serves as the video wallpaper. background_audio_volume sets the mix level (0.0-1.0) for the background track, while background_audio_fade defines fade-in duration in seconds.

[settings.background]
background_choice = "minecraft"
background_audio_volume = 0.1
background_audio_fade = 0.5

Setting background_audio_volume = 0 mutes background audio entirely, producing videos with only TTS narration.

FFmpeg Integration and Custom Filters

The bot constructs FFmpeg commands in video_creation/final_video.py using your configuration. You can extend the pipeline via ffmpeg_params, accepting raw FFmpeg arguments:

[settings]
ffmpeg_params = "-vf \"fade=t=in:st=0:d=0.5,format=yuv420p\" -c:v libx264 -preset slow -crf 23"

For advanced workflows, modify utils/ffmpeg.py where the FFmpeg class processes:

  • -c:v (video codec)
  • -c:a (audio codec)
  • -b:v and -b:a (bitrates mapped from your TOML settings)

Summary

  • Edit config.toml to change resolution, codecs, and bitrates without touching Python source
  • Use resolution_w and resolution_h to control output dimensions (default 1080×1920)
  • Set video_codec to libx264, h264_nvenc, or hevc_nvenc based on your hardware
  • Adjust background_audio_volume (0.0-1.0) to mix background music with TTS audio
  • Pass raw FFmpeg flags via ffmpeg_params for filter graphs and encoding tweaks

FAQ

How do I enable GPU acceleration for rendering? Set video_codec = "h264_nvenc" in config.toml. Ensure your NVIDIA drivers support NVENC and FFmpeg is compiled with --enable-nvenc. This reduces render time by 60-80% compared to CPU-only libx264.

Can I use custom background videos? Yes. Place your MP4 file in assets/backgrounds/ and set background_choice to the filename without extension. The bot automatically loops clips shorter than the final video duration.

What Audio codec settings improve compatibility? Use audio_codec = "aac" instead of libfdk_aac if your FFmpeg build lacks the FDK library. Both produce standard MPEG-4 audio, but aac has wider default support across devices.

Where does the bot save final videos? The final_video.py module writes to results/{subreddit}/final_{timestamp}.mp4 by default. Change the output path via settings[ "paths" ][ "save_final_video_path" ] in your configuration.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →