diff mbox

[FFmpeg-devel] avformat/dashdec: Fix calc_cur_seg_no if availability_start_time not

Message ID CAAtY0+B-FK8GYeggtPmFrQ=yQRE=Sj0fOXja0Y0p+g4y97La+A@mail.gmail.com
State New
Headers show

Commit Message

Jacek Jendrzej Aug. 21, 2018, 12:33 p.m. UTC
Hi.
Here is an example:
http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd

ffplay http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd
ffplay version N-91650-g6972dae5a4 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. 24.100 / 58. 24.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 @ 0x7ffa8c000b80] Could not read complete fragment.0B f=0/0
[dash @ 0x7ffa8c000b80] Could not read complete fragment.0B f=0/0
Input #0, dash, from '
http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd':
  Duration: N/A, start: 1534854670.016000, bitrate: N/A
  Program 0
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360,
30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 300000
      id              : V300
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 48000
      id              : A48
[http @ 0x7ffa8c073fc0] HTTP error 404 Not Found   10KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c074780] HTTP error 404 Not Found    6KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c236200] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c32d940] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c086000] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
[http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0

Comments

Liu Steven Aug. 21, 2018, 11:36 p.m. UTC | #1
> On Aug 21, 2018, at 20:33, jacek jendrzej <overx300@gmail.com> wrote:
> 
> Hi.
> Here is an example:
> http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd
> 
> ffplay http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd
> ffplay version N-91650-g6972dae5a4 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. 24.100 / 58. 24.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 @ 0x7ffa8c000b80] Could not read complete fragment.0B f=0/0
> [dash @ 0x7ffa8c000b80] Could not read complete fragment.0B f=0/0
> Input #0, dash, from '
> http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd':
>  Duration: N/A, start: 1534854670.016000, bitrate: N/A
>  Program 0
>    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360,
> 30 fps, 30 tbr, 90k tbn, 60 tbc
>    Metadata:
>      variant_bitrate : 300000
>      id              : V300
>    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
>    Metadata:
>      variant_bitrate : 48000
>      id              : A48
> [http @ 0x7ffa8c073fc0] HTTP error 404 Not Found   10KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c074780] HTTP error 404 Not Found    6KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c236200] HTTP error 404 Not Found    0KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c32d940] HTTP error 404 Not Found    0KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c086000] HTTP error 404 Not Found    0KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
> [http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
> <0001-Fix-calc_cur_seg_no-if-availability_start_time-no.patch>_______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

LGTM

Thanks
Steven
Liu Steven Aug. 29, 2018, 8:39 a.m. UTC | #2
> 在 2018年8月22日,上午7:36,Steven Liu <lq@chinaffmpeg.org> 写道:
> 
> 
> 
>> On Aug 21, 2018, at 20:33, jacek jendrzej <overx300@gmail.com> wrote:
>> 
>> Hi.
>> Here is an example:
>> http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd
>> 
>> ffplay http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd
>> ffplay version N-91650-g6972dae5a4 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. 24.100 / 58. 24.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 @ 0x7ffa8c000b80] Could not read complete fragment.0B f=0/0
>> [dash @ 0x7ffa8c000b80] Could not read complete fragment.0B f=0/0
>> Input #0, dash, from '
>> http://vm2.dashif.org/livesim-dev/testpic_2s/Manifest.mpd':
>> Duration: N/A, start: 1534854670.016000, bitrate: N/A
>> Program 0
>>   Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360,
>> 30 fps, 30 tbr, 90k tbn, 60 tbc
>>   Metadata:
>>     variant_bitrate : 300000
>>     id              : V300
>>   Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
>>   Metadata:
>>     variant_bitrate : 48000
>>     id              : A48
>> [http @ 0x7ffa8c073fc0] HTTP error 404 Not Found   10KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c074780] HTTP error 404 Not Found    6KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c236200] HTTP error 404 Not Found    0KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c32d940] HTTP error 404 Not Found    0KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c086000] HTTP error 404 Not Found    0KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
>> [dash @ 0x7ffa8c000b80] Failed to open fragment of playlist 0
>> [http @ 0x7ffa8c2312c0] HTTP error 404 Not Found    0KB sq=    0B f=0/0
>> <0001-Fix-calc_cur_seg_no-if-availability_start_time-no.patch>_______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> LGTM
> 
Pushed

> Thanks
> Steven
> 
> 
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

From 08980973a58afbf441e624f2dcd6b7efb537c97e Mon Sep 17 00:00:00 2001
From: Jacek Jendrzej <overx300@gmail.com>
Date: Tue, 21 Aug 2018 14:15:42 +0200
Subject: [PATCH] lavf/dashdec: Fix calc_cur_seg_no if availability_start_time not
 present

---
 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index c6dddeb98f..85fbe6aacc 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1296,7 +1296,7 @@  static int64_t calc_cur_seg_no(AVFormatContext *s, struct representation *pls)
             if (pls->presentation_timeoffset) {
                 num = pls->presentation_timeoffset * pls->fragment_timescale / pls->fragment_duration;
             } 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;
+                num = pls->first_seq_no + (((c->publish_time - c->time_shift_buffer_depth + pls->fragment_duration) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration;
             } else {
                 num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration;
             }
-- 
2.18.0