Contributing
Thank you for considering contributing to this project! This guide outlines the process for contributing code, documentation, and feedback.
Code of Conduct
Be respectful, constructive, and professional. This project serves the broadcast engineering community, and we expect all contributors to uphold industry standards of professionalism.
How to Contribute
Reporting Bugs
Before creating a bug report:
- Check existing GitHub Issues
- Verify you’re running the latest version
- Test with a clean mpv configuration to rule out conflicts
When reporting bugs, include:
- mpv version: Output of
mpv --version - Operating System: Including version (e.g., Ubuntu 22.04, macOS 13.5, Windows 11)
- File Information: Container format, video codec, audio configuration
- Steps to Reproduce: Clear, numbered steps
- Expected Behaviour: What should happen
- Actual Behaviour: What actually happens
- Screenshots/Logs: If applicable
Suggesting Features
Feature requests should:
- Describe the use case clearly
- Explain how it benefits broadcast workflows
- Consider compatibility with existing features
- Reference any relevant broadcast standards (e.g., SMPTE, EBU)
Pull Requests
-
Fork the repository and create a feature branch
Terminal window git checkout -b feature/your-feature-name -
Follow coding standards:
- Lua code: 4-space indentation, descriptive variable names
- Comments: International English spelling, clear technical descriptions
- Documentation: Update README.md and inline comments
-
Test thoroughly:
- Test on Linux, macOS, and Windows if possible
- Test with various file formats (MP4, MOV, MXF, TS)
- Test with different framerates and audio channel counts
- Verify no regressions in existing functionality
-
Commit with clear messages:
Terminal window git commit -m "Add support for 32-channel audio routing" -
Submit pull request:
- Describe changes in detail
- Reference any related issues
- Include test results
Development Setup
Prerequisites
- mpv 0.35.0 or later
- Text editor with Lua support
- Test media files with various configurations
Testing Locally
# Clone your forkgit clone https://github.com/FiLORUX/mpv-broadcast-suite.gitcd mpv-broadcast-suite
# Create test configuration directorymkdir -p test_config/scripts
# Symlink files for testingln -s $(pwd)/mpv.conf test_config/ln -s $(pwd)/input.conf test_config/ln -s $(pwd)/scripts/*.lua test_config/scripts/
# Run mpv with test configurationmpv --config-dir=./test_config your_test_file.mp4Code Style Guidelines
Lua Scripts:
- Use 4 spaces for indentation (no tabs)
- Maximum line length: 100 characters
- Function names:
snake_case - Constants:
UPPER_SNAKE_CASE - Local variables: descriptive names (e.g.,
channel_count, notcc)
Comments:
- Use British English spelling (colour, behaviour, normalise)
- Technical terms: Use industry-standard terminology
- Complex algorithms: Include mathematical notation where helpful
Example:
-- Calculate drop-frame compensation for NTSC framerates-- Formula: frames + (drops_per_minute × complete_minutes) - (drops_per_10min × complete_10min_blocks)local function calc_dropframe(frames, fps_rounded, is_df) if not is_df then return frames end
local drop_per_min = (fps_rounded == 60) and 4 or 2 -- [rest of implementation]endDocumentation
Inline Comments
- Explain why, not just what
- Document edge cases and limitations
- Reference standards where applicable (e.g., “per SMPTE 12M-1”)
README Updates
- Keep language clear and professional
- Update keyboard reference tables when adding bindings
- Add new features to the appropriate section
- Update version in changelog
Release Process
Maintainers will:
- Review and test pull requests
- Merge approved changes to
mainbranch - Tag releases with semantic versioning (e.g.,
v1.1.0) - Update changelog in README.md
- Create GitHub release with notes
Questions?
Open a GitHub Discussion for:
- General questions about usage
- Feature brainstorming
- Best practices discussions
- Workflow optimisation tips
Recognition
Contributors will be recognised in:
- README.md acknowledgements section
- Git commit history
- Release notes for significant contributions
Thank you for contributing to the broadcast engineering community!