signicode / ahead-server

A low latency HLS server
GNU Affero General Public License v3.0
28 stars 3 forks source link

Streamed access to chunks. #1

Open MichalCz opened 4 years ago

MichalCz commented 4 years ago

The intention of Ahead Server is not to understand the file structure or be connected to any specific format. FFMpeg, GStreamer, MP4Box and others have more than sufficient capabilities in terms of creating segments and it's not our intention to compete. It's also not our intention to get strongly linked with any specific segmenter as well.

The simplest way to solve that is to use the filesystem - create a mount in the place where the segmenters write their chunks. There are two possibilities:

Next mount the outcome in the writing point, then hijack the streams and push them straight to the outputs (via rereadable for caching).

FUSE may be a bit more efficient as it's using native bindings, but WebDAV seems simpler.

MichalCz commented 4 years ago

This approach would also allow using long segments with multiple closed or half-closed GOPs in the segment.