HLS segment failure at 11871
Hi,
I use this great module to transport RTSP into RTMP and HLS, I have two machines:
- machine A in LAN, pull RTSP from IPCameras (in LAN too) and push them to machine B
- machine B in WAN, receive RTMP and do HLS action
config of machine A
application live {
live on;
exec_static ffmpeg -rtsp_transport tcp -i rtsp://user:pwd@IPC -vcodec copy -an -f flv rtmp://B/live/cam;
exec_static ffmpeg -rtsp_transport tcp -i rtsp://user:pwd@IPC1 -vcodec copy -an -f flv rtmp://B/live/cam1;
exec_static ffmpeg -rtsp_transport tcp -i rtsp://user:pwd@IPC2 -vcodec copy -an -f flv rtmp://B/live/cam2;
}
config of machine B
application live {
live on;
hls on;
hls_path /tmp/hls;
hls_fragment 3s;
hls_playlist_length 9s;
}
Everything works fine, except when cam1 and cam2 reached 11871.ts: cam1.m3u8 and cam2.m3u8 not generated, and cam1-11871.ts, cam2-11871.ts become bigger and bigger. :
-rw-r--r-- 1 www www 2.9G Mar 23 15:30 cam1-11871.ts -rw-r--r-- 1 www www 4.1G Mar 23 15:30 cam2-11871.ts -rw-r--r-- 1 www www 274K Mar 23 15:30 cam-22653.ts -rw-r--r-- 1 www www 278K Mar 23 15:30 cam-22654.ts -rw-r--r-- 1 www www 279K Mar 23 15:30 cam-22655.ts -rw-r--r-- 1 www www 278K Mar 23 15:30 cam-22656.ts -rw-r--r-- 1 www www 277K Mar 23 15:30 cam-22657.ts -rw-r--r-- 1 www www 275K Mar 23 15:30 cam-22658.ts -rw-r--r-- 1 www www 272K Mar 23 15:30 cam-22659.ts -rw-r--r-- 1 www www 255K Mar 23 15:30 cam-22660.ts -rw-r--r-- 1 www www 161 Mar 23 15:30 cam.m3u8
I don't kown why. I watched two days, when they failed, I restart nginx of Machine B, they always failed at 11871.
PS: cam1 and cam2 is the same model, while cam is another model.
My English is not good, I hope that you understand what I mean.
Another day passed, and they failed at 11871 again, I'm so confused, can anyone tell me a technically reasonable explanation? thank you very much
If this is continuing to occur, can you output the log? That might hold some information on why the segment is hanging.
Also, can you post the the RTMP to HLS configuration you're using to produce the segments?
day and day passed, they failed at 11871 again and again.... @mbeacom Thank you for you reply. because the machine A is far away from me, and I can't access it now. May be I can go there after some days and change it's config to record some log.
I tried with 1s fragments, but it didn't occur. Are you sure there is enough memory and disk space all the time during the stream? Most weird, but still possible is you have corrupted RAM, but it's like nearly impossible to cause such problem.
We need to see logs from the moment when it happens. Without them we are not able to analyze this problem.