A powerful Streamer.bot action that fetches GIFs from Giphy API and displays them as overlay sources in OBS Studio with automatic positioning, custom sizing, and built-in watermarking.
- Search Giphy: Search for GIFs using text commands from chat or other triggers
- Automatic OBS Integration: Creates browser sources in OBS with the fetched GIF
- Smart Positioning: Configurable positioning (fixed coordinates or random placement)
- Custom Sizing: Dynamic GIF sizing with minimum width enforcement and watermark space
- Built-in Watermarking: Automatic Giphy watermark overlay for compliance
- Temporary Files: Automatic cleanup of generated HTML files
- Fallback Support: Default GIF when search terms don't return results
- Content Rating Control: Configurable content rating filter (G, PG, PG-13, R)
- Streamer.bot (latest version recommended)
- OBS Studio with obs-websocket plugin
- Internet connection for Giphy API access
- Giphy API Key (free from Giphy Developers)
- Visit Giphy Developers
- Create a free account or sign in
- Create a new app to get your API key
- Copy the API key for later use
Set up these global variables in Streamer.bot:
| Variable Name | Type | Description | Example Value |
|---|---|---|---|
Giph_API_Key |
String | Your Giphy API key | your_api_key_here |
Giph_rating |
String | Content rating filter | pg-13 |
Giph_defaut |
String | Default search term when no input | funny cat |
Giph_Position_x |
Integer | Fixed X position (-1 for random) | -1 |
Giph_Position_y |
Integer | Fixed Y position (-1 for random) | -1 |
Giph_Sleep_S |
Integer | Display duration in seconds | 5 |
- Copy the code from
code.cs - Create a new C# action in Streamer.bot
- Paste the code and compile
- Configure the action trigger (e.g., chat command
!gif)
- Ensure OBS Studio is running
- Enable obs-websocket plugin
- Connect Streamer.bot to OBS
- The action will automatically create browser sources as needed
g- General audiencespg- Parental guidance suggestedpg-13- Parents strongly cautionedr- Restricted
- Set
Giph_Position_xandGiph_Position_yto-1for random positioning - Set specific coordinates for fixed positioning
- The system automatically centers GIFs on the specified coordinates
- Minimum Width: 200px (automatically enforced)
- Height Adjustment: Original height + 42px (for watermark space)
- Aspect Ratio: Maintained from original GIF
- Trigger the action (e.g., type
!gifin chat) - The system will use the default search term
- GIF appears in OBS for the configured duration
- Files are automatically cleaned up
If your trigger supports arguments:
- Use command with search term:
!gif dancing cat - The action searches Giphy for "dancing cat"
- Displays the first result found
- Chat Command:
!gif [search_term] - Channel Points: Redeem to show random GIF
- Follows/Subs: Automatic celebration GIFs
- Hotkeys: Manual GIF display
- Creates temporary HTML files in system temp directory
- Unique filenames using GUID to prevent conflicts
- Automatic cleanup after display duration
- Base64 encoded GIFs for offline display
- Responsive container with black background
- GIF displays at top with proper scaling
- Watermark positioned at bottom center
- Fixed 200x42px watermark dimensions
- Graceful fallback for API failures
- Logs all operations for debugging
- Validates OBS connection before execution
- Handles missing search results
- Static HttpClient for connection reuse
- Efficient Base64 encoding
- Minimal memory footprint
- Fast HTML generation
GIFs not appearing in OBS:
- Check OBS connection in Streamer.bot
- Verify obs-websocket is enabled
- Ensure OBS scene is active
API errors:
- Verify Giphy API key is correct
- Check internet connection
- Confirm API key hasn't exceeded rate limits
Positioning issues:
- Check canvas size detection
- Verify coordinate values are within bounds
- Test with random positioning first
No search results:
- Try different search terms
- Check content rating restrictions
- Verify default GIF setting
- Check Streamer.bot logs for detailed error messages
- All operations are logged with
[Giphy Action]prefix - API responses and OBS commands are logged for debugging
Giph_API_Key=your_giphy_api_key_here
Giph_rating=pg-13
Giph_defaut=funny meme
Giph_Position_x=-1
Giph_Position_y=-1
Giph_Sleep_S=5
- ✅ Custom property getters for Width/Height
- ✅ Unique FilePath generation with GUID
- ✅ HTML file saving with composite layout
- ✅ Centered watermark positioning (200x42px)
- ✅ Automatic cleanup and error handling
- ✅ Base64 embedded content for reliability
This project is provided as-is for use with Streamer.bot. Please ensure compliance with Giphy's terms of service when using their API.
I'm a small streamer who likes to Code so if you will use this code, please give some kind of contribution/shoutout to ArnieTW @Twtich.tv to help me with making content!~
Feel free to submit issues, feature requests, or improvements to enhance this Giphy integration for the Streamer.bot community.
Note: This action requires a valid Giphy API key and active OBS connection to function properly. Always test in a controlled environment before using in live streams.