So my problem is this:
I have a main process that is using as source bmdcapture, that process is creating a set of 4 different streams using HLS, so the command is something like this (showing only one to simplify):
ffmpeg -i /data/pipe0 hls_time 10 /data/input0/out.m3u8
That works awesome! No problem at all. Now, if I se that output as input for another stream, it works ok. So, if I do:
ffmpeg -i /data/input0/out.m3u8 hls_time 10 /data/input1/out.m3u8
It works ok, no problem at all. I can play it and it works ok.
However, the problem is if I want to use that first HLS to do RTMP streaming... the video gets corrupted, it jumps, sometimes it does not play at all... etc. Is worth to mention, I'm using Akamai to sent the package, but if I use wowza, the same thing happens.
But, I have the solution. Use 2 seconds segments, like this:
ffmpeg -i /data/input0/out.m3u8 hls_time 2 rtmp://akamai.end.point/file
And just by doing that change, the stream works flawlessly without problems. However, the main process I have (ffmpeg -i /data/pipe0 hls_time 10 /data/input0/out.m3u8
) I need it to be 10 seconds, instead of 2, so I cannot change it... one solution could be create something else in the middle, but that adds complexity specially because this system runs 24/7, so that is not an option...
The question is: why I cannot stream using 10s segments as the source?