[FFmpeg-trac] #7382(avformat:new): ffplay doesn't play dash format with presentationTimeOffset.
FFmpeg
trac at avcodec.org
Sun Aug 26 16:46:30 EEST 2018
#7382: ffplay doesn't play dash format with presentationTimeOffset.
----------------------------------+--------------------------------------
Reporter: satbaby | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
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 {
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7382>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list