#7382 closed defect (fixed)
ffplay doesn't play dash format with presentationTimeOffset.
Reported by: | satbaby | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | dash |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
here are two examples:
https://livesim.dashif.org/livesim/periods_60/continuous_1/testpic_2s/Manifest.mpd
https://akamai-axtest.akamaized.net/routes/lapd-v1-acceptance/www_c4/Manifest.mpd
How to reproduce:
ffplay https://livesim.dashif.org/livesim/periods_60/continuous_1/testpic_2s/Manifest.mpd ffplay version N-91691-g962c9313af Copyright (c) 2003-2018 the FFmpeg developers built with gcc 8.2.0 (Gentoo 8.2.0-r2 p1.2) configuration: --prefix=/mnt/BIG/ffmpeg/root/ --disable-doc --disable-stripping --enable-debug=1 --enable-libxml2 --enable-demuxer=dash --enable-openssl libavutil 56. 19.100 / 56. 19.100 libavcodec 58. 25.100 / 58. 25.100 libavformat 58. 17.103 / 58. 17.103 libavdevice 58. 4.101 / 58. 4.101 libavfilter 7. 26.100 / 7. 26.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 [dash @ 0x7f2328000b80] Could not read complete fragment.0B f=0/0 [https @ 0x7f232800aa00] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f2328017e40] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f232804a440] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f2328041240] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f232804e040] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f2328041340] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f2328018580] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0 [https @ 0x7f2328054a40] HTTP error 404 Not Found sq= 0B f=0/0 [dash @ 0x7f2328000b80] Failed to open fragment of playlist 0
I have patch, but no idea if is correct:
cat /tmp/try_to_fix_calc_cur_seg_no_with_presentation_timeoffset.diff diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index c6dddeb98f..fe6d95102b 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1294,7 +1294,7 @@ static int64_t calc_cur_seg_no(AVFormatContext *s, struct representation *pls) num += pls->first_seq_no; } else if (pls->fragment_duration){ if (pls->presentation_timeoffset) { - num = pls->presentation_timeoffset * pls->fragment_timescale / pls->fragment_duration; + num = pls->first_seq_no + (((get_current_time_in_sec() * pls->fragment_timescale)-pls->presentation_timeoffset) / pls->fragment_duration) - 120; } else if (c->publish_time > 0 && !c->availability_start_time) { num = pls->first_seq_no + (((c->publish_time - c->availability_start_time) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration; } else {
Attachments (1)
Change History (6)
by , 6 years ago
Attachment: | try_to_fix_calc_cur_seg_no_with_presentation_timeoffset.diff added |
---|
comment:1 by , 6 years ago
Description: | modified (diff) |
---|---|
Keywords: | dash added |
comment:2 by , 6 years ago
@ Steven Liu
Now with you patch https://patchwork.ffmpeg.org/patch/10218/ work ok.
comment:3 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed by commit id: ad9b4ecc26bef7babb31b58f19c869f6464c2db9
follow-up: 5 comment:4 by , 6 years ago
Replying to satbaby:
https://livesim.dashif.org/livesim/periods_60/continuous_1/testpic_2s/Manifest.mpd
There is still an issue with this stream afaict.
comment:5 by , 6 years ago
Replying to cehoyos:
Replying to satbaby:
https://livesim.dashif.org/livesim/periods_60/continuous_1/testpic_2s/Manifest.mpd
There is still an issue with this stream afaict.
fixed by : 7bb90a9449bc845ffbde0eea0dfcaf2b3eed4256
Please send your patch - made with
git format-patch
- to the FFmpeg development mailing list, patches are ignored on this bug tracker.