You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to push a subtitles track into GPAC in live mode to generate a live HLS/DASH stream. Currently, the subtitles are pushed via a TCP socket from another application (see below).
From the command I expect GPAC to start creating the playlist and segments live while the VTT text arrives from the socket. What I see is that there are no files created in the res folder. And, when I stop the Python client (and the socket is closed), GPAC starts creating the playlist and segments as I expect them to be.
A given segment 0.0.0_dash1.vtt looks like
WEBVTT
00:00.000 --> 00:01.000
Current time: 00:00.000
00:01.000 --> 00:02.000
Current time: 00:01.000
Am I missing something from the TCP connection to signal the dasher to produce the subtitles track live?
Python client
This is the code for the subtitles_client.py client.
To run it:
python3 subtitles_client.py
which creates the WebVTT track, pushes it to the TCP socket, and prints the pushed string:
WEBVTT
00:00.000 --> 00:01.000
Current time: 00:00.000
00:01.000 --> 00:02.000
Current time: 00:01.000
00:02.000 --> 00:03.000
Current time: 00:02.000
00:03.000 --> 00:04.000
Current time: 00:03.000
00:04.000 --> 00:05.000
Current time: 00:04.000
00:05.000 --> 00:06.000
Current time: 00:05.000
00:06.000 --> 00:07.000
Current time: 00:06.000
00:07.000 --> 00:08.000
Current time: 00:07.000
This was not supported but should now work with master. Thanks for the test code
Some additional considerations: the srt/vtt parser is a line-based parser so processing packets coming from TCP is dangerous as the framing is unknown - for small real-time subs it should not be a problem but if the sender is not regulating there is no guarantee that what is read from TCP is always a complete number of lines, resulting in parsing errors...
The proper way to do this would be through pipes or using the (just reworked) ka option of the TCP input socket filter. This requires an open/close at each chunk (N full lines) sent but will avoid any undesired side effects.
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/
I want to push a subtitles track into GPAC in live mode to generate a live HLS/DASH stream. Currently, the subtitles are pushed via a TCP socket from another application (see below).
The GPAC command is:
From the command I expect GPAC to start creating the playlist and segments live while the VTT text arrives from the socket. What I see is that there are no files created in the
res
folder. And, when I stop the Python client (and the socket is closed), GPAC starts creating the playlist and segments as I expect them to be.A given segment
0.0.0_dash1.vtt
looks likeAm I missing something from the TCP connection to signal the
dasher
to produce the subtitles track live?Python client
This is the code for the
subtitles_client.py
client.To run it:
which creates the WebVTT track, pushes it to the TCP socket, and prints the pushed string:
The text was updated successfully, but these errors were encountered: