gpac icon indicating copy to clipboard operation
gpac copied to clipboard

Dasher. Adding --keep_ts to MP4Box breaks stream

Open alex-rsk opened this issue 1 year ago • 0 comments

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

Greetings again. Sorry for annoying issues. I'm just trying to stabilize my stream from sequential mp4 pieces. I have a problem. The stream suddenly stops either because player's buffer is empty, or buffer is full. Sometimes player doesn't find a file for "rep3" and playback becomes "limpy".

On the other hand i don't see any errors except numerous warnings that segments are feeding "too late" to the MP4box. These warnings start to appear some time after running my stream. I suspect that problem is related in increasing timing errors. When I delete manifest.mpd and context.txt, these warnings disappear for some time.

To cope it, I'm trying different options with MP4box, but almost all vain.

This time I try to overcome unstability by adding keep_ts option. I follow guidelines in gpac wiki, which says: If the inputs change but form a continuous timeline, [-keep_ts])() must be used to skip timeline reconstruction. This is exact my case. So my command is:

#Calling this earlier than previous segment ends to play.
 MP4Box -dash 2000 -dash-ctx  context.txt -profile dashavc264:live --utcs="https://time.akamai.com/?iso&ms" \
-mpd-refresh 2 -dynamic -bs-switching merge \
-segment-timeline -url-template -insert-utc -min-buffer 15 -mpd-title "Test" -time-shift 30 \
--sflush=end  \
--keep_ts=true \
input.mp4#video:dur=10:#Representation=norm input.mp4#video:dur=10:@ffsws:osize=640x360:osar=16/9:scale=bilinear@enc:c=avc:fintra=2#Representation=bad
input.mp4#trackID=3:id=eng:#Role=subtitle:#Language=eng:dur=10

Mp4Box output doesn't contain any errors except warnings like in this issue. But the stream doesn't play, reference dash.js player shows black screen.

Thank you.

alex-rsk avatar Jul 08 '24 11:07 alex-rsk