Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple HLS / WWDC downloads stuttering when played back #25773

Open
lypanov opened this issue Jun 24, 2020 · 0 comments
Open

Apple HLS / WWDC downloads stuttering when played back #25773

lypanov opened this issue Jun 24, 2020 · 0 comments

Comments

@lypanov
Copy link

@lypanov lypanov commented Jun 24, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.06.16.1
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ
  • I've spent hours Googling and trying every other method I can think of.

Verbose log(s)

NATIVE HLS

$ youtube-dl --hls-prefer-native -f hls-324 https://developer.apple.com/videos/play/wwdc2020/102/ -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--hls-prefer-native', '-f', 'hls-324', 'https://developer.apple.com/videos/play/wwdc2020/102/', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.8.3 (CPython) - Linux-4.14.83-17437689-aarch64-with-glibc2.17
[debug] exe versions: ffmpeg 4.2.3, ffprobe 4.2.3
[debug] Proxy map: {}
[generic] 102: Requesting header
[generic] 102: Downloading webpage
WARNING: Falling back on generic information extractor.
[generic] 102: Extracting information
[generic] 102: Downloading m3u8 information
[download] Downloading playlist: Platforms State of the Union - WWDC 2020 - Videos - Apple Developer
[generic] playlist Platforms State of the Union - WWDC 2020 - Videos - Apple Developer: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[debug] Invoking downloader on 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/prog_index.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 893
[download] Destination: Platforms State of the Union - WWDC 2020 - Videos - Apple Developer-102.mp4
[download] 100% of 165.81MiB in 14:43
[debug] ffmpeg command line: ffprobe -show_streams 'file:Platforms State of the Union - WWDC 2020 - Videos - Apple Developer-102.mp4'
[download] Finished downloading playlist: Platforms State of the Union - WWDC 2020 - Videos - Apple Developer

FFMPEG HLS

$ youtube-dl -f hls-324 https://developer.apple.com/videos/play/wwdc2020/102/ -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'hls-324', 'https://developer.apple.com/videos/play/wwdc2020/102/', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.8.3 (CPython) - Linux-4.14.83-17437689-aarch64-with-glibc2.17
[debug] exe versions: ffmpeg 4.2.3, ffprobe 4.2.3
[debug] Proxy map: {}
[generic] 102: Requesting header
[generic] 102: Downloading webpage
WARNING: Falling back on generic information extractor.
[generic] 102: Extracting information
[generic] 102: Downloading m3u8 information
[download] Downloading playlist: Platforms State of the Union - WWDC 2020 - Videos - Apple Developer
[generic] playlist Platforms State of the Union - WWDC 2020 - Videos - Apple Developer: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[debug] Invoking downloader on 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/prog_index.m3u8'
[download] Destination: Platforms State of the Union - WWDC 2020 - Videos - Apple Developer-102.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.43 Safari/537.36
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Referer: https://developer.apple.com/videos/play/wwdc2020/102/
' -i https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/prog_index.m3u8 -c copy -f mp4 'file:Platforms State of the Union - WWDC 2020 - Videos - Apple Developer-102.mp4.part'
ffmpeg version n4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-omx --enable-shared --enable-version3 --host-cflags='"-fPIC"'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[tcp @ 0x300009de10] Starting connection attempt to 17.253.53.207 port 443
[tcp @ 0x300009de10] Successfully connected to 17.253.53.207 port 443
[hls @ 0x300009b490] Skip ('#EXT-X-VERSION:7')
[hls @ 0x300009b490] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:370')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:470')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:574')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:941')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:1306')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:1858')
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:306')
<CUT>
[hls @ 0x300009b490] Skip ('#EXT-X-BITRATE:104')
[hls @ 0x300009b490] HLS request for url 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_0.mp4', offset 0, playlist 0
[hls @ 0x300009b490] Opening 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_0.mp4' for reading
[tcp @ 0x30006db230] Starting connection attempt to 17.253.105.204 port 443
[tcp @ 0x30006db230] Successfully connected to 17.253.105.204 port 443
[AVIOContext @ 0x300073f580] Statistics: 713 bytes read, 0 seeks
[hls @ 0x300009b490] HLS request for url 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_1.mp4', offset 0, playlist 0
[hls @ 0x300009b490] Opening 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_1.mp4' for reading
[tcp @ 0x300012dfc0] Starting connection attempt to 17.253.105.204 port 443
[tcp @ 0x300012dfc0] Successfully connected to 17.253.105.204 port 443
[hls @ 0x300009b490] HLS request for url 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_2.mp4', offset 0, playlist 0
[hls @ 0x300009b490] Opening 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_2.mp4' for reading
[tcp @ 0x30000a0bd0] Starting connection attempt to 17.253.53.209 port 443
[tcp @ 0x30000a0bd0] Successfully connected to 17.253.53.209 port 443
[h264 @ 0x300071b4a0] Reinit context to 960x544, pix_fmt: yuv420p
Input #0, hls, from 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/prog_index.m3u8':
  Duration: 01:29:23.83, start: 10.066733, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown, left), 960x540 (960x544) [SAR 1:1 DAR 16:9], 85 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
    Metadata:
      variant_bitrate : 0
      major_brand     : iso5
      minor_version   : 1
      compatible_brands: isomiso5hlsf
      creation_time   : 2020-06-20T19:42:52.000000Z
Output #0, mp4, to 'file:Platforms State of the Union - WWDC 2020 - Videos - Apple Developer-102.mp4.part':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown, left), 960x540 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 85 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc
    Metadata:
      variant_bitrate : 0
      major_brand     : iso5
      minor_version   : 1
      compatible_brands: isomiso5hlsf
      creation_time   : 2020-06-20T19:42:52.000000Z
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 41083, current: 40040; changing to 41084. This may result in incorrect timestamps in the output file.
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 41084, current: 41041; changing to 41085. This may result in incorrect timestamps in the output file.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x30006da300] DTS 300000 < 343043 out of order
[hls @ 0x300009b490] DTS 300000 < 343043 out of order
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 41085, current: -2002; changing to 41086. This may result in incorrect timestamps in the output file.
<CUT>
[hls @ 0x300009b490] HLS request for url 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_892.mp4', offset 0, playlist 0
[https @ 0x3000133d30] Opening 'https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/avc_540p_2000_892.mp4' for reading
frame=160202 fps=492 q=-1.0 size=  167424kB time=01:29:05.30 bitrate= 256.6kbits/s speed=[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 160401241, current: 160358198; changing to 160401242. This may result in incorrect timestamps in the output file.
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 160401242, current: 160359199; changing to 160401243. This may result in incorrect timestamps in the output file.
<CUT>
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 160671511, current: 160628468; changing to 160671512. This may result in incorrect timestamps in the output file.
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 160671512, current: 160629469; changing to 160671513. This may result in incorrect timestamps in the output file.
[ffmpeg] Downloaded 173032304 bytes
[download] 100% of 165.02MiB in 05:29
[download] Finished downloading playlist: Platforms State of the Union - WWDC 2020 - Videos - Apple Developer
<CUT>
p4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 160851735, current: 160808648; changing to 160851736. This may result in incorrect timestamps in the output file.
[mp4 @ 0x300072e680] Non-monotonous DTS in output stream 0:0; previous: 160851736, current: 160809649; changing to 160851737. This may result in incorrect timestamps in the output file.
No more output streams to write to, finishing.
frame=160754 fps=493 q=-1.0 Lsize=  168977kB time=01:29:23.72 bitrate= 258.1kbits/s speed=16.5x    
video:167643kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.795370%
Input file #0 (https://devstreaming-cdn.apple.com/videos/wwdc/2020/102/1/D80F0868-A427-49B2-8422-D79AB307560E/avc_540p_2000/prog_index.m3u8):
  Input stream #0:0 (video): 160754 packets read (171666917 bytes); 
  Total: 160754 packets (171666917 bytes) demuxed
Output file #0 (file:Platforms State of the Union - WWDC 2020 - Videos - Apple Developer-102.mp4.part):
  Output stream #0:0 (video): 160754 packets muxed (171666917 bytes); 
  Total: 160754 packets (171666917 bytes) muxed
[AVIOContext @ 0x30005ddbd0] Statistics: 14 seeks, 671 writeouts
[AVIOContext @ 0x300073f580] Statistics: 85772644 bytes read, 0 seeks
[AVIOContext @ 0x30006d2ba0] Statistics: 88087757 bytes read, 0 seeks
[AVIOContext @ 0x30006a9050] Statistics: 52696 bytes read, 0 seeks

Description

With hls-prefer-native option provided the resulting file is unplayable in the video player I otherwise have perfect results with for youtube-dl.

With ffmpeg HLS the file plays, but, plays back with non stop 500ms pauses/gaps in the output. The output is also so extremely long that I'm unable to paste it in full due to an absurd numbers of the DTS timestamp warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.