Please use this template for troubleshooting questions.
My issue:
A massive long stream creates big files. Need to split them either in time or size or with a script
How I encountered the problem:
Juge resultfiles after hours of streaming
Solutions I’ve tried:
1 Restart server, not nice, stream continued in next file.
2 Looking at the documentation. No clue
Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric):
Latest
Deployment environment:
Debian
Minimal NGINX config to reproduce your issue (preferably running on https://tech-playground.com/playgrounds/nginx for ease of debugging, and if not as a code block):(Tip → Run nginx -T to print your entire NGINX config to your terminal.)
NGINX access/error log:(Tip → You can usually find the logs in the /var/log/nginx directory.)
Hey @Wim! There isn’t enough information in your post to be able to help you out. Can you please answer the following?:
What type of files are being created?
What information is in the files?
What exactly do you mean by a long stream? It has a few potential meanings in NGINX, depending on the context.
What version of NGINX are you running? Due to various differences depending on where it is being installed, latest can actually mean a version that was released 4 years ago. Please run nginx -V and paste the output
Finally, can you share your sanitized config? Like the template says, running nginx -T should print it out to your terminal.
# Incoming stream 1
application stream1 {
live on;
record all;
record_path /var/www/html/opnames/stream1;
record_unique on;
record_suffix -%H_%M_%S.flv;
}
The result is that it will create a file -678967-gdggd.flv
This file will grow very fast to more than 500Mb/h for continues usage this is a problem. Splitting the files into more smaller files either by size and/of length or other is the solution I am looking for. Cannot find it in the docs.