I'm using `FFmpeg` with `gpac` to generate multiple resolutions from source video and package these segments to HLS respectively.
I've packaged hundreds of videos using the same commands without any issues.

You can find the original video [here](https://teachcamp.net/dashboard/download/storage/UTBSQk1ERWdMU0JUWlhOemFXOXVJREF4SUMwZ2RHVmhZMmhqWVcxd0lDaE5ZWGtnTWpBeU1pa3ViWEEw).

> Just for comparison, a perfectly working video [here](https://teachcamp.net/dashboard/download/storage/Wm1sdVpDQnpiMk5wWVd3Z2JXVmthV0VnWVdOamIzVnVkSE1nZDJsMGFDQlRhR1Z5Ykc5amF5QW9hVzRnTlNCTlNVNHBMbTF3TkE9PQ==).
> I'm only generating one resolution for now (144p) for testing only.

### Generating Audio
```bash
ffmpeg -y -i video.mp4 -c:a aac -b:a 126k -vn 1668036377967_audio.m4a
```

### Generating Video
```bash
ffmpeg -y -i video.mp4 -preset slow -tune film -vsync passthrough -an -c:v libx264 -crf 18 -b:v 200k -pix_fmt yuv420p -vf scale=256:144 -f mp4 1668035664380_144p.mp4
```

### Packaging
```bash
gpac -i 1668035664380_144p.mp4 -i 1668035664380_audio.m4a -o playlist.m3u8:segdur=10:profile=dashavc264.onDemand:m2ts
```

<details>
<summary>Error Logs</summary>

```bash

[IsoMedia] Track 2 is disabled, ignoring track - you may retry by specifying alltk option
[IsoMedia] Track 2 is disabled, ignoring track - you may retry by specifying alltk option
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
gpac: media_tools/m2ts_mux.c:2026: gf_m2ts_mux_pes_get_next_packet: Assertion `stream->pes_data_remain >= copy_next' failed.
Aborted
```
</details>

I really do not know where is the issue, and how to read the error logs.


Unexpected MPEG2-TS Muxer packaging HLS
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Unexpected MPEG2-TS Muxer packaging HLS
Issue date:

--- start body ---
I'm using `FFmpeg` with `gpac` to generate multiple resolutions from source video and package these segments to HLS respectively.
I've packaged hundreds of videos using the same commands without any issues.

You can find the original video [here](https://teachcamp.net/dashboard/download/storage/UTBSQk1ERWdMU0JUWlhOemFXOXVJREF4SUMwZ2RHVmhZMmhqWVcxd0lDaE5ZWGtnTWpBeU1pa3ViWEEw).

> Just for comparison, a perfectly working video [here](https://teachcamp.net/dashboard/download/storage/Wm1sdVpDQnpiMk5wWVd3Z2JXVmthV0VnWVdOamIzVnVkSE1nZDJsMGFDQlRhR1Z5Ykc5amF5QW9hVzRnTlNCTlNVNHBMbTF3TkE9PQ==).
> I'm only generating one resolution for now (144p) for testing only.

### Generating Audio
```bash
ffmpeg -y -i video.mp4 -c:a aac -b:a 126k -vn 1668036377967_audio.m4a
```

### Generating Video
```bash
ffmpeg -y -i video.mp4 -preset slow -tune film -vsync passthrough -an -c:v libx264 -crf 18 -b:v 200k -pix_fmt yuv420p -vf scale=256:144 -f mp4 1668035664380_144p.mp4
```

### Packaging
```bash
gpac -i 1668035664380_144p.mp4 -i 1668035664380_audio.m4a -o playlist.m3u8:segdur=10:profile=dashavc264.onDemand:m2ts
```

<details>
<summary>Error Logs</summary>

```bash

[IsoMedia] Track 2 is disabled, ignoring track - you may retry by specifying alltk option
[IsoMedia] Track 2 is disabled, ignoring track - you may retry by specifying alltk option
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
[MPEG2-TS Muxer] Not enough data to fill current PES (PID 101) - filling with 0xFF
gpac: media_tools/m2ts_mux.c:2026: gf_m2ts_mux_pes_get_next_packet: Assertion `stream->pes_data_remain >= copy_next' failed.
Aborted
```
</details>

I really do not know where is the issue, and how to read the error logs.


--- end body ---
