Opened 6 years ago

Closed 6 years ago

#6925 closed defect (worksforme)

Dash demuxer does not stop after -t <timeout> expires

Reported by: Aman Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: dash
Cc: Steven Liu Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When using -t <timeout> on an output being fed by a dash muxed input, the ffmpeg process does not stop when the timeout is reached. No output packets are created, but the input keeps reading until the source EOFs.

How to reproduce:

Below you can see that time=00:00:01.96, but fps and speed approach 0 while the process keeps running and printing out "Opening segment-XX.m4s"

./ffmpeg -f dash -i https://20skyfiregce-vimeo.akamaized.net/exp\=1513997557\~acl\=%2F150608819%2F%2A\~hmac\=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191,606502196,606502193,606502192/master.mpd\?base64_init\=1 -t 2 -c copy -f null /dev/null
ffmpeg version N-89577-gcdd72a654d Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/tmp/ffmpeg-master --enable-libxml2 --enable-shared --disable-static --disable-stripping
  libavutil      56.  6.100 / 56.  6.100
  libavcodec     58.  8.100 / 58.  8.100
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  7.100 /  7.  7.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
[dash @ 0x7fbf7a003400] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-0.mp4' for reading
[dash @ 0x7fbf7a003400] Could not read complete fragment.
[dash @ 0x7fbf7a003400] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-0.m4s' for reading
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fbf7b014a00] Found duplicated MOOV Atom. Skipped it
[dash @ 0x7fbf7a003400] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-1.m4s' for reading
Input #0, dash, from 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191,606502196,606502193,606502192/master.mpd?base64_init=1':
  Duration: 00:14:59.00, start: 0.000000, bitrate: 0 kb/s
  Program 0
    Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt470bg/smpte170m/bt470bg), 640x360 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
  No Program
    Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
Output #0, null, to '/dev/null':
  Metadata:
    encoder         : Lavf58.3.100
    Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt470bg/smpte170m/bt470bg), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc
    Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[dash @ 0x7fbf7a003400] DTS 0 < 141141 out of order
[https @ 0x7fbf7b809e00] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-2.m4s' for reading
[dash @ 0x7fbf7a003400] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-2.m4s' for reading
[https @ 0x7fbf7b809e00] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-3.m4s' for reading
[dash @ 0x7fbf7a003400] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-3.m4s' for reading
[https @ 0x7fbf7b809e00] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-4.m4s' for reading
[dash @ 0x7fbf7a003400] Opening 'https://20skyfiregce-vimeo.akamaized.net/exp=1513997557~acl=%2F150608819%2F%2A~hmac=66533877b715b5446be24c122d9727f64046feac273cd7557ef9a825316b41cd/150608819/video/606502191/chop/segment-4.m4s' for reading
...
frame=   50 fps=0.4 q=-1.0 Lsize=N/A time=00:00:01.96 bitrate=N/A speed=0.0173x

Change History (6)

comment:1 by colin ng, 6 years ago

Unable to access the content (return Access Denied).

comment:2 by colin ng, 6 years ago

Unable to access the content (return Access Denied).

comment:3 by Aman, 6 years ago

The input does not matter, try any mpd url.

in reply to:  3 comment:4 by colin ng, 6 years ago

Replying to tmm1:

The input does not matter, try any mpd url.

Please provide a sample. The current ffmpeg does not support mpd with byte range info.

comment:5 by Steven Liu, 6 years ago

liuqideMacBook-Pro:xxx liuqi$ ./ffmpeg -i http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd -t 5 a.mp4
ffmpeg version N-89611-g613f789c19 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-fontconfig --enable-gpl --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-version3 --cc='ccache gcc' --enable-nonfree --enable-videotoolbox --enable-libxml2
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  7.100 /  7.  7.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[dash @ 0x7fd072800a00] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_0.m4v' for reading
[dash @ 0x7fd072800a00] Could not read complete fragment.
[dash @ 0x7fd072800a00] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_1.m4v' for reading
[dash @ 0x7fd072800a00] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_a64k/bbb_a64k_0.m4a' for reading
[dash @ 0x7fd072800a00] Could not read complete fragment.
[dash @ 0x7fd072800a00] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_a64k/bbb_a64k_1.m4a' for reading
Input #0, dash, from 'http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd':
  Duration: 00:10:34.00, start: 0.000000, bitrate: 0 kb/s
  Program 0
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 1513 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Stream #0:1: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7fd072830800] using SAR=1/1
[libx264 @ 0x7fd072830800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x7fd072830800] profile High, level 3.1
[libx264 @ 0x7fd072830800] 264 - core 148 r2694 3b70645 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'a.mp4':
  Metadata:
    encoder         : Lavf58.3.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.9.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.9.100 aac
[dash @ 0x7fd072800a00] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_2.m4v' for reading
[dash @ 0x7fd072800a00] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_a64k/bbb_a64k_2.m4a' for reading
frame=  150 fps= 51 q=-1.0 Lsize=     264kB time=00:00:05.01 bitrate= 431.4kbits/s speed=1.71x
video:178kB audio:80kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.568110%
[libx264 @ 0x7fd072830800] frame I:1     Avg QP:15.82  size:  7435
[libx264 @ 0x7fd072830800] frame P:46    Avg QP:19.55  size:  2652
[libx264 @ 0x7fd072830800] frame B:103   Avg QP:21.79  size:   504
[libx264 @ 0x7fd072830800] consecutive B-frames:  4.7%  2.7% 26.0% 66.7%
[libx264 @ 0x7fd072830800] mb I  I16..4: 59.9% 33.5%  6.6%
[libx264 @ 0x7fd072830800] mb P  I16..4:  6.8% 12.3%  0.8%  P16..4:  4.5%  1.3%  0.8%  0.0%  0.0%    skip:73.5%
[libx264 @ 0x7fd072830800] mb B  I16..4:  1.6%  0.7%  0.0%  B16..8:  2.5%  0.4%  0.1%  direct: 6.0%  skip:88.7%  L0:44.9% L1:46.9% BI: 8.2%
[libx264 @ 0x7fd072830800] 8x8 transform intra:53.4% inter:72.5%
[libx264 @ 0x7fd072830800] coded y,uvDC,uvAC intra: 7.5% 22.3% 6.9% inter: 1.3% 6.2% 0.5%
[libx264 @ 0x7fd072830800] i16 v,h,dc,p: 72% 17%  8%  3%
[libx264 @ 0x7fd072830800] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 20% 40%  1%  1%  1%  1%  1%  1%
[libx264 @ 0x7fd072830800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 25% 20%  4%  4%  4%  4%  4%  4%
[libx264 @ 0x7fd072830800] i8c dc,h,v,p: 75% 14% 10%  1%
[libx264 @ 0x7fd072830800] Weighted P-Frames: Y:21.7% UV:21.7%
[libx264 @ 0x7fd072830800] ref P L0: 65.1% 10.1% 21.2%  3.3%  0.3%
[libx264 @ 0x7fd072830800] ref B L0: 76.6% 18.4%  5.0%
[libx264 @ 0x7fd072830800] ref B L1: 92.6%  7.4%
[libx264 @ 0x7fd072830800] kb/s:290.21
[aac @ 0x7fd07380a600] Qavg: 3537.413
liuqideMacBook-Pro:xxx liuqi$

comment:6 by Carl Eugen Hoyos, 6 years ago

Priority: importantnormal
Resolution: worksforme
Status: newclosed
$ ffmpeg -i http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd -t 5 out.mp4
ffmpeg version N-89611-g613f789 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --enable-gpl --enable-libxml2
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  7.100 /  7.  7.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[dash @ 0x3652400] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_0.m4v' for reading
[dash @ 0x3652400] Could not read complete fragment.
[dash @ 0x3652400] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_1.m4v' for reading
[dash @ 0x3652400] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_a64k/bbb_a64k_0.m4a' for reading
[dash @ 0x3652400] Could not read complete fragment.
[dash @ 0x3652400] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_a64k/bbb_a64k_1.m4a' for reading
Input #0, dash, from 'http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd':
  Duration: 00:10:34.00, start: 0.000000, bitrate: 0 kb/s
  Program 0
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 1513 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Stream #0:1: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf58.3.100
    Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.9.100 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.9.100 aac
[dash @ 0x3652400] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_30fps_1024x576_2500k/bbb_30fps_1024x576_2500k_2.m4v' for reading
[dash @ 0x3652400] Opening 'http://dash.edgesuite.net/akamai/bbb_30fps/./bbb_a64k/bbb_a64k_2.m4a' for reading
frame=  150 fps=0.0 q=31.0 Lsize=     581kB time=00:00:05.01 bitrate= 949.6kbits/s speed=8.83x
video:496kB audio:80kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.981460%
[aac @ 0x36c4380] Qavg: 3537.413
Note: See TracTickets for help on using tickets.