-
Notifications
You must be signed in to change notification settings - Fork 1
Web UI
⚠️ Note: The Web UI interface is currently not up to date and may not work properly. It will be updated once the Java desktop application reaches version 1.0. For now, please use the desktop GUI for the best experience.
The Web UI provides a browser-based interface powered by Streamlit, perfect for server deployments and remote access.
Web UI provides:
- ✅ Browser-based interface
- ✅ Three operation modes (encoder, subtitle, renamer)
- ✅ File upload support
- ✅ Settings management
- ✅ Progress tracking
- ✅ Download results
The Web UI interface exists but is outdated and may contain bugs or missing features. Development focus is currently on the desktop GUI application.
# Using Python
python EncodeForge/src/main/resources/python/encodeforge_webui.py
# Or using Streamlit directly
streamlit run EncodeForge/src/main/resources/python/encodeforge_webui.pyOpen your browser to:
http://localhost:8501
pip install streamlit pandas openai-whisper requests numbagit clone https://github.com/yourusername/encodeforge.git
cd encodeforge
pip install -r requirements.txt
streamlit run EncodeForge/src/main/resources/python/encodeforge_webui.pyOperation Mode Selection:
- Encoder
- Subtitle
- Metadata
General Settings:
- FFmpeg path
- Check FFmpeg button
- Output directory
Mode-Specific Settings:
- Displayed based on selected mode
- Provider selection
- Quality settings
- API keys
File Upload:
- Drag and drop files
- Multiple file selection
- Supported formats displayed
Queue Display:
- Shows uploaded files
- File sizes
- Remove buttons
Results:
- Progress bars
- Success/failure indicators
- Download buttons
- Click "Upload video files"
- Select multiple files
- Click "Add Files" to add to queue
In Sidebar:
- Output format (MP4, MKV, AVI, MOV)
- Hardware acceleration (NVENC, AMF, QSV)
- Quality settings
- Audio settings
- Click "
▶️ Start Conversion" - Watch progress bars
- Download results when complete
- Click "Upload video files"
- Select files needing subtitles
- Configure subtitle settings
In Sidebar:
- Enable Whisper generation
- Select Whisper model
- Enable OpenSubtitles download
- Enter API keys
- Select languages
- Click "🎙️ Generate/Download Subtitles"
- Wait for processing
- Download subtitle files
- Click "Upload media files"
- Select files to rename
- Ensure TMDB API key is set
- Click "👀 Preview Renames"
- Review suggested names
- Expand files to see details
- Click "✅ Apply Renames"
- Download renamed files
Create Dockerfile:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8501
CMD ["streamlit", "run", "EncodeForge/src/main/resources/python/encodeforge_webui.py", "--server.port=8501", "--server.address=0.0.0.0"]Build and run:
docker build -t encodeforge-webui .
docker run -p 8501:8501 encodeforge-webuiCreate /etc/nginx/sites-available/encodeforge:
server {
listen 80;
server_name encodeforge.example.com;
location / {
proxy_pass http://localhost:8501;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
}
}Enable:
sudo ln -s /etc/nginx/sites-available/encodeforge /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxsudo certbot --nginx -d encodeforge.example.comAdd authentication (recommended for production):
# Add to webui file
import streamlit_authenticator as stauth
names = ['admin']
usernames = ['admin']
passwords = ['password']
hashed_passwords = stauth.Hasher(passwords).generate()
authenticator = stauth.Authenticate(names, usernames, hashed_passwords, 'cookie', 'secret_key', [30])
name, authentication_status, username = authenticator.login('Login', 'main')
if authentication_status == False:
st.error('Username/password is incorrect')
elif authentication_status == None:
st.warning('Please enter your username and password')
elif authentication_status:
# Main app code here
passSet upload limits:
import streamlit as st
st.set_page_config(
page_title="EncodeForge",
page_icon="🎬",
layout="wide",
initial_sidebar_state="expanded"
)
# Set max upload size (default 200MB)
# Must be configured in .streamlit/config.tomlCreate .streamlit/config.toml:
[server]
maxUploadSize = 1000
maxMessageSize = 1000Web UI uses Streamlit session state:
- Settings persist during session
- API keys stored in session
- Files uploaded to temp directory
Set for production:
export TMDB_API_KEY="your_key"
export OPENSUBTITLES_API_KEY="your_key"
export STREAMLIT_SERVER_PORT=8501
export STREAMLIT_SERVER_ADDRESS=0.0.0.0Issue: "Files not uploading"
- Check: File size limits
- Check: Browser compatibility
- Solution: Use modern browser
Issue: "FFmpeg not found"
- Check: FFmpeg installed on server
- Solution: Set FFmpeg path in sidebar
Issue: "Connection timeout"
- Check: Large file processing
- Solution: Increase timeout settings
Issue: "Port already in use"
-
Solution: Change port:
streamlit run app.py --server.port=8502
Run with debug:
streamlit run app.py --logger.level=debugCreate API wrapper:
from flask import Flask, request, jsonify
import subprocess
app = Flask(__name__)
@app.route('/api/encode', methods=['POST'])
def encode_video():
file_path = request.json['file_path']
cmd = [
'python', 'encodeforge_cli.py', 'encoder',
file_path,
'--use-nvenc'
]
result = subprocess.run(cmd, capture_output=True, text=True)
return jsonify({
'status': 'success' if result.returncode == 0 else 'error',
'output': result.stdout
})
if __name__ == '__main__':
app.run(port=5000)- Use Hardware Acceleration - Configure GPU on server
-
Increase Workers - Set
--server.numThreads - Cache Files - Use SSD storage
- Monitor Resources - Watch CPU/GPU/RAM usage
- Queue System - Implement job queue for multiple users
Heroku:
heroku create encodeforge-webui
git push heroku mainRailway:
railway init
railway upGoogle Cloud Run:
gcloud run deploy encodeforge \
--source . \
--platform managed \
--region us-central1Create docker-compose.yml:
version: '3.8'
services:
webui:
build: .
ports:
- "8501:8501"
volumes:
- ./data:/app/data
environment:
- TMDB_API_KEY=${TMDB_API_KEY}
- OPENSUBTITLES_API_KEY=${OPENSUBTITLES_API_KEY}Run:
docker-compose up -dNeed server deployment? The Web UI is perfect for remote access!