Enhance media API transcoding and video streaming capabilities

- Added support for limiting concurrent transcoding operations in the media API to prevent resource exhaustion.
- Implemented functions to retrieve video duration and bitrate using ffprobe for improved streaming performance.
- Enhanced the generate_transcoded_stream function to handle HTTP range requests, allowing for more efficient video playback.
- Updated VideoModal component to disable fluid and responsive modes, ensuring proper container boundaries during video playback.
- Improved logging throughout the transcoding process for better error tracking and debugging.
This commit is contained in:
salirezav
2025-11-04 11:55:27 -05:00
parent de46753f15
commit 5070d9b2ca
15 changed files with 391 additions and 99 deletions

View File

@@ -131,10 +131,23 @@ services:
environment:
- MEDIA_VIDEOS_DIR=/mnt/nfs_share
- MEDIA_THUMBS_DIR=/mnt/nfs_share/.thumbnails
- MAX_CONCURRENT_TRANSCODING=2 # Limit concurrent transcoding operations
volumes:
- /mnt/nfs_share:/mnt/nfs_share
ports:
- "8090:8090"
deploy:
resources:
limits:
cpus: '4' # Limit to 4 CPU cores (adjust based on your system)
memory: 2G # Limit to 2GB RAM per container
reservations:
cpus: '1' # Reserve at least 1 CPU core
memory: 512M # Reserve at least 512MB RAM
# Alternative syntax for older Docker Compose versions:
# cpus: '4'
# mem_limit: 2g
# mem_reservation: 512m
mediamtx:
image: bluenviron/mediamtx:latest