Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

I have a project which is reading from RTSP streams and saves short 5-second segments to `mp4` files using FFmpeg and GStreamer.
I would like to be able to convert these `mp4` files to fragmented `fmp4` files in order to use them for HLS streaming.

My current pipeline looks like this:
- FFmpeg or GStreamer outputs short `mp4` files to a `/tmp` directory
- I run MP4Box on the file using this command:
```
MP4Box -dash 10000 -rap -frag-rap -segment-name output_ -out master.m3u8 /tmp/1690461275.mp4
```
- I then copy the resulting `.m4s` file to a new location which stores it for a longer period of time, and store the data from the `master_1.m3u8` file in a database so i can access the duration when generating a `.m3u8` file

I then have a webserver that serves the `.m4s` files

The users are suppose to be able to choose a timeframe of their liking, and i need to generate an `.m3u8` file on the fly which corresponds to the timeframe.

The problem that i am having is that no matter how i construct the `.m3u8` file, only the first segment in my playlist plays.
I think it might have something to do with my `MP4Box` command but i am not experienced enough in this field to tell for sure.
I would like to avoid running the MP4Box command when the user requests the stream to reduce delay, thats why i want convert the `mp4` files one by one.

Is it possible to make my usecase work using `MP4Box`?

TLDR: I want to convert `mp4` files to `m4s` files continuously and then create `m3u8` playlists on the fly.

Convert MP4 to Fragmented MP4 continuously and create HLS playlist on the fly
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Convert MP4 to Fragmented MP4 continuously and create HLS playlist on the fly
Issue date:

--- start body ---
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!

- [X] I looked for a similar issue and couldn't find any.
- [X] I tried with the latest version of GPAC. Installers available at http://gpac.io/downloads/gpac-nightly-builds/
- [X] I give enough information for contributors to reproduce my issue (meaningful title, github labels, platform and compiler, command-line ...). I can share files anonymously with this dropbox: https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95

I have a project which is reading from RTSP streams and saves short 5-second segments to `mp4` files using FFmpeg and GStreamer.
I would like to be able to convert these `mp4` files to fragmented `fmp4` files in order to use them for HLS streaming.

My current pipeline looks like this:
- FFmpeg or GStreamer outputs short `mp4` files to a `/tmp` directory
- I run MP4Box on the file using this command:
```
MP4Box -dash 10000 -rap -frag-rap -segment-name output_ -out master.m3u8 /tmp/1690461275.mp4
```
- I then copy the resulting `.m4s` file to a new location which stores it for a longer period of time, and store the data from the `master_1.m3u8` file in a database so i can access the duration when generating a `.m3u8` file

I then have a webserver that serves the `.m4s` files

The users are suppose to be able to choose a timeframe of their liking, and i need to generate an `.m3u8` file on the fly which corresponds to the timeframe.

The problem that i am having is that no matter how i construct the `.m3u8` file, only the first segment in my playlist plays.
I think it might have something to do with my `MP4Box` command but i am not experienced enough in this field to tell for sure.
I would like to avoid running the MP4Box command when the user requests the stream to reduce delay, thats why i want convert the `mp4` files one by one.

Is it possible to make my usecase work using `MP4Box`?

TLDR: I want to convert `mp4` files to `m4s` files continuously and then create `m3u8` playlists on the fly.

--- end body ---
