Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segment lost when replaying route session from capture file #2702

Closed
3 tasks
soheibthriber opened this issue Dec 13, 2023 · 1 comment
Closed
3 tasks

Segment lost when replaying route session from capture file #2702

soheibthriber opened this issue Dec 13, 2023 · 1 comment

Comments

@soheibthriber
Copy link
Contributor

soheibthriber commented Dec 13, 2023

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

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

beepbop.mp4

Reproduce scenario:

1- i took the beepbop.mp4 (file attached to this issue) and generated a dash_session using following command:

gpac -i beepbop.mp4  -o dash_session/live.mpd

this generates the following files:

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:

 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:

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 :

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
-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.

@soheibthriber soheibthriber changed the title Segement lost when replaying route sessios from capture file Segement lost when replaying route session from capture file Dec 13, 2023
@rbouqueau rbouqueau changed the title Segement lost when replaying route session from capture file Segment lost when replaying route session from capture file Dec 13, 2023
jeanlf added a commit that referenced this issue Dec 14, 2023
@jeanlf
Copy link
Member

jeanlf commented Dec 14, 2023

Thanks for the detailed report.
There was indeed a scheduling issue for vod dash/hls sources, potentially sending init segment before the S-TSID, now fixed on master.

Note that the bug does not apply for live sources

@jeanlf jeanlf closed this as completed Dec 14, 2023
rbouqueau pushed a commit that referenced this issue Feb 1, 2024
gorinje pushed a commit to Bevara/Access-open that referenced this issue Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants