-
Notifications
You must be signed in to change notification settings - Fork 1
Developer Guide
Joshua edited this page Oct 22, 2025
·
1 revision
Information for developers who want to contribute to or extend EncodeForge.
EncodeForge consists of three main components:
- Java GUI - JavaFX-based desktop application
- Python Core - FFmpeg operations and processing
- Bridge - Communication between Java and Python
┌─────────────────────────────────────────┐
│ JavaFX GUI (Frontend) │
│ - MainController │
│ - UI Components │
│ - Event Handling │
└──────────────┬──────────────────────────┘
│
│ PythonBridge
│
┌──────────────▼──────────────────────────┐
│ Python Core (Backend) │
│ - EncodeForgeCore │
│ - ConversionHandler │
│ - SubtitleHandler │
│ - RenamingHandler │
│ - FFmpegManager │
└──────────────┬──────────────────────────┘
│
│ FFmpeg / Providers
│
┌──────────────▼──────────────────────────┐
│ External Services │
│ - FFmpeg │
│ - Whisper AI │
│ - TMDB/TVDB APIs │
│ - Subtitle Providers │
└─────────────────────────────────────────┘
Frontend:
- Java 17
- JavaFX 17
- Maven
- FXML for UI
Backend:
- Python 3.8+
- FFmpeg
- OpenAI Whisper
- Requests (API calls)
Build:
- Maven (Java)
- jpackage (Native installers)
- Python (CLI/Web UI)
-
Java 17+
java -version
-
Maven 3.8+
mvn -version
-
Python 3.8+
python --version
-
FFmpeg
ffmpeg -version
-
Git
git --version
git clone https://github.com/yourusername/encodeforge.git
cd encodeforgecd EncodeForge
mvn clean install# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtJava GUI:
cd EncodeForge
mvn javafx:runCLI:
cd EncodeForge/src/main/resources/python
python encodeforge_cli.py --helpWeb UI:
cd EncodeForge/src/main/resources/python
streamlit run encodeforge_webui.pyEncodeForge/src/main/java/com/encodeforge/
├── MainApp.java # Application entry point
├── controller/ # MVC Controllers
│ ├── MainController.java
│ ├── InitializationDialog.java
│ └── ...
├── service/ # Business logic
│ ├── DependencyManager.java
│ ├── PythonBridge.java
│ └── ...
├── util/ # Utilities
│ ├── PathManager.java
│ ├── ResourceExtractor.java
│ └── ...
└── model/ # Data models
└── ...
EncodeForge/src/main/resources/python/
├── encodeforge_core.py # Main orchestrator
├── encodeforge_cli.py # CLI interface
├── encodeforge_webui.py # Web UI
├── encodeforge_api.py # API wrapper
├── ffmpeg_core.py # FFmpeg operations
├── ffmpeg_manager.py # FFmpeg management
├── subtitle_manager.py # Subtitle operations
├── metadata_grabber.py # Metadata fetching
├── profile_manager.py # Profile management
├── encodeforge_modules/ # Core modules
│ ├── conversion_handler.py
│ ├── subtitle_handler.py
│ ├── renaming_handler.py
│ └── ...
├── subtitle_providers/ # Subtitle providers
│ ├── whisper_manager.py
│ ├── opensubtitles_manager.py
│ └── ...
└── metadata_providers/ # Metadata providers
├── tmdb_provider.py
├── tvdb_provider.py
└── ...
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Code:
- Bug fixes
- New features
- Performance improvements
- Code refactoring
Documentation:
- Wiki pages
- Code comments
- README updates
- Tutorials
Testing:
- Unit tests
- Integration tests
- Bug reports
- Test cases
Design:
- UI/UX improvements
- Icons and graphics
- Themes
- Layout improvements
Style:
- Follow Java conventions
- Use meaningful names
- Add JavaDoc comments
- Keep methods small
- Avoid deep nesting
Example:
/**
* Processes video files using hardware acceleration.
*
* @param files List of video files to process
* @param settings Conversion settings
* @return Processing results
*/
public ProcessingResult processFiles(List<File> files, ConversionSettings settings) {
// Implementation
}Style:
- Follow PEP 8
- Use type hints
- Add docstrings
- Max line length: 100 characters
- Use meaningful names
Example:
def process_video(
file_path: str,
settings: ConversionSettings
) -> ProcessingResult:
"""
Process video file with given settings.
Args:
file_path: Path to video file
settings: Conversion settings
Returns:
Processing result with status and output
"""
# ImplementationFormat:
<type>: <subject>
<body>
<footer>
Types:
-
feat- New feature -
fix- Bug fix -
docs- Documentation -
style- Formatting -
refactor- Code refactoring -
test- Tests -
chore- Maintenance
Example:
feat: Add support for AMD AMF hardware acceleration
- Implement AMD AMF encoder detection
- Add AMF-specific settings
- Update UI to show AMF options
Closes #123
Java:
mvn testPython:
pytest tests/Test full workflows:
- Encoding pipeline
- Subtitle generation
- Metadata fetching
- File renaming
Test Checklist:
- All three modes work
- Hardware acceleration detected
- Subtitles generate/download
- Metadata fetches correctly
- Settings save/load
- Logs display properly
- Error handling works
- Test your changes thoroughly
- Update documentation if needed
- Follow code standards
- Add tests for new features
- Rebase on latest main branch
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
How did you test your changes?
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex code
- [ ] Documentation updated
- [ ] Tests added/updated
- [ ] No new warnings- Maintainer reviews code
- Automated tests run
- Changes requested if needed
- Approval and merge
Subtitle Provider:
- Create provider class in
subtitle_providers/ - Inherit from
BaseProvider - Implement required methods
- Register in
subtitle_manager.py
Metadata Provider:
- Create provider class in
metadata_providers/ - Inherit from
BaseProvider - Implement API calls
- Register in
metadata_grabber.py
- Plan the feature
- Design the architecture
- Implement backend logic
- Add UI components
- Test thoroughly
- Document usage
Profiling:
- Use Java Flight Recorder for Java
- Use cProfile for Python
- Identify bottlenecks
- Optimize critical paths
Techniques:
- Parallel processing
- Caching
- Lazy loading
- Memory optimization
- GitHub Issues
- GitHub Discussions
- Discord (if available)
Contributions are licensed under MIT License.
Ready to contribute? Start by forking the repository and creating a feature branch!