0

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?

1

The reason is because HLS as a source is really just a static file (a bunch of .TS packets). This requires you feed the new ffmpeg process (in your case RTMP) at x1 speed, or real time. You can do this with the -re flag before the input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.