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

- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at https://gpac.io/downloads/gpac-nightly-builds/
- [ ] 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

Detailed guidelines: https://gpac.io/bug-reporting/

https://github.com/gpac/gpac/assets/26531945/27cb2f13-cf40-49b8-9e51-917c461d2dae

  
Reproduce scenario:

  1- i took the beepbop.mp4 (file attached to this issue) and generated a dash_session using following command:
   
 
```bash
gpac -i beepbop.mp4  -o dash_session/live.mpd
```
this generates the following files:

```bash
dash_session:
total 92
drwxrwxr-x 2   4096 nov.  16 12:06 .
drwxrwxr-x 5   4096 nov.  16 12:13 ..
-rw-rw-r-- 1   2221 nov.  16 12:06 beepbop_dash_track1_1.m4s
-rw-rw-r-- 1   2335 nov.  16 12:06 beepbop_dash_track1_2.m4s
-rw-rw-r-- 1   2365 nov.  16 12:06 beepbop_dash_track1_3.m4s
-rw-rw-r-- 1   2417 nov.  16 12:06 beepbop_dash_track1_4.m4s
-rw-rw-r-- 1   2507 nov.  16 12:06 beepbop_dash_track1_5.m4s
-rw-rw-r-- 1    861 nov.  16 12:06 beepbop_dash_track1_init.mp4
-rw-rw-r-- 1   7560 nov.  16 12:06 beepbop_dash_track2_1.m4s
-rw-rw-r-- 1   7774 nov.  16 12:06 beepbop_dash_track2_2.m4s
-rw-rw-r-- 1   8394 nov.  16 12:06 beepbop_dash_track2_3.m4s
-rw-rw-r-- 1   8871 nov.  16 12:06 beepbop_dash_track2_4.m4s
-rw-rw-r-- 1   8975 nov.  16 12:06 beepbop_dash_track2_5.m4s
-rw-rw-r-- 1    965 nov.  16 12:06 beepbop_dash_track2_init.mp4
-rw-rw-r-- 1   1445 nov.  16 12:06 live.mpd

```

   2- i saved a route session to route.gpc using the command:
   
```bash
 gpac -i dash_session/live.mpd dashin:forward=mani -o route://234.1.1.1:1234/live.mpd -netcap-dst=route.gpc
```

   3- i examined the content of the route.gpc by dumping the route_session using two methods , direcely dumping files with in_route module and using fout. 
commands used:
```bash
gpac -i route://234.1.1.1:1234/live.mpd:gcache=false -netcap-src=route.gpc -o dash_session_via_route_fout/'$File$':dynext
```
```
gpac -i route://234.1.1.1:1234/live.mpd:odir=dash_session_via_route_in_dump/ -netcap-src=route.gpc 
```
 results :

```bash
dash_session_via_route_fout:
total 88
drwxrwxr-x 2   4096 nov.  16 12:12 .
drwxrwxr-x 5   4096 nov.  16 12:13 ..
-rw-rw-r-- 1   2335 nov.  16 12:12 beepbop_dash_track1_2.m4s
-rw-rw-r-- 1   2365 nov.  16 12:12 beepbop_dash_track1_3.m4s
-rw-rw-r-- 1   2417 nov.  16 12:12 beepbop_dash_track1_4.m4s
-rw-rw-r-- 1   2507 nov.  16 12:12 beepbop_dash_track1_5.m4s
-rw-rw-r-- 1    861 nov.  16 12:12 beepbop_dash_track1_init.mp4
-rw-rw-r-- 1   7560 nov.  16 12:12 beepbop_dash_track2_1.m4s
-rw-rw-r-- 1   7774 nov.  16 12:12 beepbop_dash_track2_2.m4s
-rw-rw-r-- 1   8394 nov.  16 12:12 beepbop_dash_track2_3.m4s
-rw-rw-r-- 1   8871 nov.  16 12:12 beepbop_dash_track2_4.m4s
-rw-rw-r-- 1   8975 nov.  16 12:12 beepbop_dash_track2_5.m4s
-rw-rw-r-- 1    981 nov.  16 12:12 beepbop_dash_track2_init.mp4
-rw-rw-r-- 1   1447 nov.  16 12:12 live.mpd
```
    
```bash
-rw-rw-r-- 1   2335 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_2.m4s
-rw-rw-r-- 1   2365 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_3.m4s
-rw-rw-r-- 1   2417 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_4.m4s
-rw-rw-r-- 1   2507 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_5.m4s
-rw-rw-r-- 1    861 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_init.mp4
-rw-rw-r-- 1   7560 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_1.m4s
-rw-rw-r-- 1   7774 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_2.m4s
-rw-rw-r-- 1   8394 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_3.m4s
-rw-rw-r-- 1   8871 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_4.m4s
-rw-rw-r-- 1   8975 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_5.m4s
-rw-rw-r-- 1    965 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_init.mp4
-rw-rw-r-- 1   1447 nov.  16 12:18 dash_session_via_route_in_dump/service1/live.mp
```


we can see clearly that we systimatically drop the first segment of the track1  ( beepbop_dash_track1_1.m4s)



when I play the route session here is what i got:

1- i am omitting the verbose logs and only displaying what i think is relevant:

we receive the manifest file normally

[ROUTE] Service 1 got TSI 0 config package:
[ROUTE] Service 1 received MPD file live.mpd

we receive the first segment for track_2 normally

[ROUTE] Service 1 got file beepbop_dash_track2_1.m4s (TSI 20 TOI 1) size 7560 in 0 ms (320 bytes in 1 fragments)
[ROUTE] Pushing file beepbop_dash_track2_1.m4s to cache
[ROUTE] Service 1 got file beepbop_dash_track2_init.mp4 (TSI 20 TOI 4294967295) size 981 in 1 ms
[ROUTE] Pushing file beepbop_dash_track2_init.mp4 to cache

then we receive a bench of downloader fail to create service error for beepbop_dash_track1_init (more than two , i’m just omitting )

[Downloader] failed to create session for http://groute/service1/beepbop_dash_track1_init.mp4: Bad Parameter
[Downloader] failed to create session for http://groute/service1/beepbop_dash_track1_init.mp4: Bad Parameter

than we receive the second segments for the track1 beepbop_dash_track1_2.m4s.

[ROUTE] Pushing fragment from file beepbop_dash_track1_2.m4s to cache
[ROUTE] Service 1 got file beepbop_dash_track1_2.m4s (TSI 10 TOI 2) size 2335 in 620 ms
[ROUTE] Pushing file beepbop_dash_track1_2.m4s to cache

And the Dasher drop the first segment of track1:

[DASH] Error in downloading new segment http://groute/service1/beepbop_dash_track1_1.m4s: Bad Parameter

from now on all segments are received normally and the session is error free.

So to sum up when we create the route session from the dash session using netcap the route session isn’t able to correctly transport the first segment of the track1.



Segment lost when replaying route session from capture file
This is a GitHub Issue
repo:gpac
owner:gpac
Title : Segment lost when replaying route session from capture file
Issue date:

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

- [ ] I looked for a similar issue and couldn't find any.
- [ ] I tried with the latest version of GPAC. Installers available at https://gpac.io/downloads/gpac-nightly-builds/
- [ ] 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

Detailed guidelines: https://gpac.io/bug-reporting/

https://github.com/gpac/gpac/assets/26531945/27cb2f13-cf40-49b8-9e51-917c461d2dae

  
Reproduce scenario:

  1- i took the beepbop.mp4 (file attached to this issue) and generated a dash_session using following command:
   
 
```bash
gpac -i beepbop.mp4  -o dash_session/live.mpd
```
this generates the following files:

```bash
dash_session:
total 92
drwxrwxr-x 2   4096 nov.  16 12:06 .
drwxrwxr-x 5   4096 nov.  16 12:13 ..
-rw-rw-r-- 1   2221 nov.  16 12:06 beepbop_dash_track1_1.m4s
-rw-rw-r-- 1   2335 nov.  16 12:06 beepbop_dash_track1_2.m4s
-rw-rw-r-- 1   2365 nov.  16 12:06 beepbop_dash_track1_3.m4s
-rw-rw-r-- 1   2417 nov.  16 12:06 beepbop_dash_track1_4.m4s
-rw-rw-r-- 1   2507 nov.  16 12:06 beepbop_dash_track1_5.m4s
-rw-rw-r-- 1    861 nov.  16 12:06 beepbop_dash_track1_init.mp4
-rw-rw-r-- 1   7560 nov.  16 12:06 beepbop_dash_track2_1.m4s
-rw-rw-r-- 1   7774 nov.  16 12:06 beepbop_dash_track2_2.m4s
-rw-rw-r-- 1   8394 nov.  16 12:06 beepbop_dash_track2_3.m4s
-rw-rw-r-- 1   8871 nov.  16 12:06 beepbop_dash_track2_4.m4s
-rw-rw-r-- 1   8975 nov.  16 12:06 beepbop_dash_track2_5.m4s
-rw-rw-r-- 1    965 nov.  16 12:06 beepbop_dash_track2_init.mp4
-rw-rw-r-- 1   1445 nov.  16 12:06 live.mpd

```

   2- i saved a route session to route.gpc using the command:
   
```bash
 gpac -i dash_session/live.mpd dashin:forward=mani -o route://234.1.1.1:1234/live.mpd -netcap-dst=route.gpc
```

   3- i examined the content of the route.gpc by dumping the route_session using two methods , direcely dumping files with in_route module and using fout. 
commands used:
```bash
gpac -i route://234.1.1.1:1234/live.mpd:gcache=false -netcap-src=route.gpc -o dash_session_via_route_fout/'$File$':dynext
```
```
gpac -i route://234.1.1.1:1234/live.mpd:odir=dash_session_via_route_in_dump/ -netcap-src=route.gpc 
```
 results :

```bash
dash_session_via_route_fout:
total 88
drwxrwxr-x 2   4096 nov.  16 12:12 .
drwxrwxr-x 5   4096 nov.  16 12:13 ..
-rw-rw-r-- 1   2335 nov.  16 12:12 beepbop_dash_track1_2.m4s
-rw-rw-r-- 1   2365 nov.  16 12:12 beepbop_dash_track1_3.m4s
-rw-rw-r-- 1   2417 nov.  16 12:12 beepbop_dash_track1_4.m4s
-rw-rw-r-- 1   2507 nov.  16 12:12 beepbop_dash_track1_5.m4s
-rw-rw-r-- 1    861 nov.  16 12:12 beepbop_dash_track1_init.mp4
-rw-rw-r-- 1   7560 nov.  16 12:12 beepbop_dash_track2_1.m4s
-rw-rw-r-- 1   7774 nov.  16 12:12 beepbop_dash_track2_2.m4s
-rw-rw-r-- 1   8394 nov.  16 12:12 beepbop_dash_track2_3.m4s
-rw-rw-r-- 1   8871 nov.  16 12:12 beepbop_dash_track2_4.m4s
-rw-rw-r-- 1   8975 nov.  16 12:12 beepbop_dash_track2_5.m4s
-rw-rw-r-- 1    981 nov.  16 12:12 beepbop_dash_track2_init.mp4
-rw-rw-r-- 1   1447 nov.  16 12:12 live.mpd
```
    
```bash
-rw-rw-r-- 1   2335 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_2.m4s
-rw-rw-r-- 1   2365 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_3.m4s
-rw-rw-r-- 1   2417 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_4.m4s
-rw-rw-r-- 1   2507 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_5.m4s
-rw-rw-r-- 1    861 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track1_init.mp4
-rw-rw-r-- 1   7560 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_1.m4s
-rw-rw-r-- 1   7774 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_2.m4s
-rw-rw-r-- 1   8394 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_3.m4s
-rw-rw-r-- 1   8871 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_4.m4s
-rw-rw-r-- 1   8975 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_5.m4s
-rw-rw-r-- 1    965 nov.  16 12:18 dash_session_via_route_in_dump/service1/beepbop_dash_track2_init.mp4
-rw-rw-r-- 1   1447 nov.  16 12:18 dash_session_via_route_in_dump/service1/live.mp
```


we can see clearly that we systimatically drop the first segment of the track1  ( beepbop_dash_track1_1.m4s)



when I play the route session here is what i got:

1- i am omitting the verbose logs and only displaying what i think is relevant:

we receive the manifest file normally

[ROUTE] Service 1 got TSI 0 config package:
[ROUTE] Service 1 received MPD file live.mpd

we receive the first segment for track_2 normally

[ROUTE] Service 1 got file beepbop_dash_track2_1.m4s (TSI 20 TOI 1) size 7560 in 0 ms (320 bytes in 1 fragments)
[ROUTE] Pushing file beepbop_dash_track2_1.m4s to cache
[ROUTE] Service 1 got file beepbop_dash_track2_init.mp4 (TSI 20 TOI 4294967295) size 981 in 1 ms
[ROUTE] Pushing file beepbop_dash_track2_init.mp4 to cache

then we receive a bench of downloader fail to create service error for beepbop_dash_track1_init (more than two , i’m just omitting )

[Downloader] failed to create session for http://groute/service1/beepbop_dash_track1_init.mp4: Bad Parameter
[Downloader] failed to create session for http://groute/service1/beepbop_dash_track1_init.mp4: Bad Parameter

than we receive the second segments for the track1 beepbop_dash_track1_2.m4s.

[ROUTE] Pushing fragment from file beepbop_dash_track1_2.m4s to cache
[ROUTE] Service 1 got file beepbop_dash_track1_2.m4s (TSI 10 TOI 2) size 2335 in 620 ms
[ROUTE] Pushing file beepbop_dash_track1_2.m4s to cache

And the Dasher drop the first segment of track1:

[DASH] Error in downloading new segment http://groute/service1/beepbop_dash_track1_1.m4s: Bad Parameter

from now on all segments are received normally and the session is error free.

So to sum up when we create the route session from the dash session using netcap the route session isn’t able to correctly transport the first segment of the track1.



--- end body ---
