Repository: youtube-dl
Issue: rtve.es:infantil and multiple waiting times
Labels: patch-available,external-bugs,mpd

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a broken site support
- [x] I've verified that I'm running youtube-dl version **2021.12.17**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log

<!--
Provide the complete verbose output of youtube-dl that clearly demonstrates the problem.
Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this:
 [debug] System config: []
 [debug] User config: []
 [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
 [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
 [debug] youtube-dl version 2021.12.17
 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
 [debug] Proxy map: {}
 <more lines>
-->

```
$ youtube-dl -v https://www.rtve.es/infantil/serie/pinocho/video/dos-pinochos/6643979/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.rtve.es/infantil/serie/pinocho/video/dos-pinochos/6643979/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.5 (CPython) - Linux-5.15.53-1-MANJARO-x86_64-with-glibc2.35
[debug] exe versions: ffmpeg 5.0.1, ffprobe 5.0.1, rtmpdump 2.4
[debug] Proxy map: {}
[rtve.es:infantil] Fetching manager info
[rtve.es:infantil] 6643979: Downloading JSON metadata
[rtve.es:infantil] 6643979: Downloading url information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading MPD manifest
[rtve.es:infantil] 6643979: Downloading MPD manifest
WARNING: [rtve.es:infantil] 6643979: Failed to parse XML not well-formed (invalid token): line 1, column 0
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading MPD manifest
[rtve.es:infantil] 6643979: Downloading MPD manifest
WARNING: [rtve.es:infantil] 6643979: Failed to parse XML not well-formed (invalid token): line 1, column 0
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading MPD manifest
[rtve.es:infantil] 6643979: Downloading MPD manifest
WARNING: [rtve.es:infantil] 6643979: Failed to parse XML not well-formed (invalid token): line 1, column 0
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading m3u8 information
[rtve.es:infantil] 6643979: Downloading MPD manifest
[rtve.es:infantil] 6643979: Downloading MPD manifest
WARNING: [rtve.es:infantil] 6643979: Failed to parse XML not well-formed (invalid token): line 1, column 0
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://lote5-vod-hls-geoblockurl.akamaized.net/resources/TE_GLEAD/mp4/7/6/1657130979867.mp4/video.mpd?idasset=6643979'
[dashsegments] Total fragments: 696
[download] Destination: Los dos Pinochos-6643979.fdash-video=3959000.mp4
[download] 100% of 327.95MiB in 01:12
[debug] Invoking downloader on 'https://lote5-vod-hls-geoblockurl.akamaized.net/resources/TE_GLEAD/mp4/7/6/1657130979867.mp4/video.mpd?idasset=6643979'
[dashsegments] Total fragments: 349
[download] Destination: Los dos Pinochos-6643979.fdash-audio=193202-1.m4a
[download] 100% of 16.19MiB in 00:19
[ffmpeg] Merging formats into "Los dos Pinochos-6643979.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Los dos Pinochos-6643979.fdash-video=3959000.mp4' -i 'file:Los dos Pinochos-6643979.fdash-audio=193202-1.m4a' -c copy -map 0:v:0 -map 1:a:0 'file:Los dos Pinochos-6643979.temp.mp4'
Deleting original file Los dos Pinochos-6643979.fdash-video=3959000.mp4 (pass -k to keep)
Deleting original file Los dos Pinochos-6643979.fdash-audio=193202-1.m4a (pass -k to keep)

```


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Provide any additional information, suggested solution and as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

It gets stuck on "Downloading MPD manifest" line like 2-3 minutes various times as you can see in the log and finally the video gets downloaded. I don't know if those waiting times are the expected behavior or it is not. If it's the second case here is the issue, not a broken site one but a malfunction at least. I also tried the last version (youtube-dl 2022.07.12.810) from the more update builds from https://github.com/ytdl-patched/youtube-dl with the same result.