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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user