yt-dlp: goplay extractor broken

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

  • I’m reporting a broken site
  • I’ve verified that I’m running yt-dlp version 2023.01.06 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

Belgium

Provide a description that is worded well enough to be understood

goplay.be now loads newer videos in a new format. (DASH MPD) which means the current extractor is broken.

Extracted the following information so far;

curl -X POST https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10150078534976527/streams
{
  "stream_id": "091f9127-c615-4354-9006-af3fb09ac261",
  "duration": 2687.64,
  "stream_type": "on_demand",
  "stream_manifest": "https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10150078534976527/GRQ/streams/091f9127-c615-4354-9006-af3fb09ac261/manifest.mpd",
  "manifest_format": "dash",
  "time_events_url": "https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10150078534976527/GRQ/streams/091f9127-c615-4354-9006-af3fb09ac261/time-events.json"
}

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['--verbose', '-o', '/media/data2/series/Big Brother/Season 3/%(series)s - S0%(season_number)sE%(episode_number)s.%(ext)s', '--no-hls-use-mpegts', '-u', 'PRIVATE', '-p', 'PRIVATE', '-N', '8', '-f', 'bestvideo+bestaudio', '--merge-output-format', 'mp4', 'https://www.goplay.be/video/big-brother/big-brother-s3/big-brother-s3-aflevering-32']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version 2023.01.06 [6becd2508] (linux_exe)
[debug] Python 3.10.6 (CPython x86_64 64bit) - Linux-5.15.0-60-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, secretstorage-3.3.1, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1767 extractors
[GoPlay] Logging in
[GoPlay] Authenticating username
[GoPlay] Authenticating password
[GoPlay] Extracting URL: https://www.goplay.be/video/big-brother/big-brother-s3/big-brother-s3-aflevering-32
[GoPlay] big-brother-s3-aflevering-32: Downloading webpage
[GoPlay] 5bd06f78-6e20-439b-8d67-cfe152c0cd68: Downloading JSON metadata
ERROR: An extractor error has occurred. (caused by KeyError('manifestUrls')); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp/extractor/common.py", line 693, in extract
  File "yt_dlp/extractor/goplay.py", line 83, in _real_extract
KeyError: 'manifestUrls'

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 28 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I figured out how to merge the files successfully with the help of this stackoverflow article: first make a document with all names of the files that looks like this

$ cat mylist.txt
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

and then execute the following ffmpeg commando

$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

I downloaded the manifest file and checked it

image

if we remove the preroll + ads

  • 3 parts left

image

Every part has 1080p 720p … and 1 audio link image

Then I downloaded them using

part1: yt-dlp -f qualityID+audioID <url to manifest> part2: yt-dlp -f qualityID+audioID <url to manifest> part3: yt-dlp -f qualityID+audioID <url to manifest>

As an alternative, you could concatenate the fragments list for all periods and have them downloaded by yt-dlp as a single file.

I made an update to the goplay extractor that does this. It works on the recent De Mol streams.

It’s not ideal to do this at the goplay extractor level, I guess. I assume other sources with multi-period MPD streams will have the same problem, so it would be better if the MPD code could separate the periods (and perhaps merge them).

Thanks! Currently at work so I’ll check myself later, much appreciated! How did you figure out what audio goes with what video?

EDIT nvm doesn’t seem to be relevant if you actually download the manifest. Using the -F flag gives me everything at once, so 3 audio files, and 3 video files per resolution

I haven’t looked into this yet either. Since the GoPlay app now supports AirPlay I’m using that instead of downloading it first.

@CNugteren do any of you have an idea how to fix this issue, since you were involved in older patches?

Don’t count on me too much, all I did last time was apply patches from different people together in a new branch, I didn’t actually go into the details of how the extractor works.

Hopefully someone can fix it in time!

Doesn’t look like it’s just newer videos - for example, I could download De Rechtbank S12E05 just fine last sunday using the “old” URL format, but S12E02 right now has the new format too.

Thanks for your investigation though, I thought I was going crazy. I just verified your findings for another video 😊

the api of goplay.be returns following:

GET https://api.goplay.be/web/v1/videos/long-form/26e19146-57ef-4ea4-ab41-e247061d8407

{
    "videoUuid": "26e19146-57ef-4ea4-ab41-e247061d8407",
    "title": "Aflevering 3",
    "brand": "PLAY4",
    "duration": 2643,
    "dates": {
        "publishDate": 1673985600,
        "unpublishDate": 1684619940
    },
    "adType": "SSAI",
    "ads": {
        "enablePreroll": true
    },
    "flags": {
        "hasProductPlacement": false,
        "isProtected": true,
        "isSeekable": true,
        "isStreaming": false,
        "isDrm": false
    },
    "position": 0,
    "streamTypes": [],
    "ssai": {
        "contentSourceID": "2615619",
        "videoID": "10149680614757527"
    },
    "parentalRating": "12+",
    "tracking": {
        "cimTag": "vid.tvi.ep.vod.free"
    }
}

It then does a POST to https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10149680614692527/streams (2615619 being the contentSourceID and 10149680614692527 the videoId

Doubleclick returns the stream_manifest which contains the video including ads and prerolls.

{
    "stream_id": "3ecc516e-14e7-4276-a97e-35968b3b17ac",
    "duration": 2750.36,
    "stream_type": "on_demand",
    "stream_manifest": "https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10149680614692527/GRQ/streams/3ecc516e-14e7-4276-a97e-35968b3b17ac/manifest.mpd",
    "manifest_format": "dash",
    "time_events_url": "https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10149680614692527/GRQ/streams/3ecc516e-14e7-4276-a97e-35968b3b17ac/time-events.json",
    "subtitles": [
        {
            "language": "nl",
            "ttml": "https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10149680614692527/GRQ/streams/3ecc516e-14e7-4276-a97e-35968b3b17ac/ttml/e743427a-605e-45e1-a53a-1c35557523af.ttml",
            "webvtt": "https://pubads.g.doubleclick.net/ondemand/dash/content/2615619/vid/10149680614692527/GRQ/streams/3ecc516e-14e7-4276-a97e-35968b3b17ac/vtt/e743427a-605e-45e1-a53a-1c35557523af.vtt"
        }
    ]
}

Downloading the MPD file directly via yt-dlp {stream_manifest} gives me very mixed results - it seems the audio and video are now split up in 3 parts…

WARNING: [generic] Falling back on generic information extractor
[generic] manifest: Extracting information
[info] Available formats for manifest:
ID                                     EXT RESOLUTION FPS │   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
f14a8946-45cc-4c18-a38b-0030d1578d78-0 m4a audio only     │  128k dash  │ audio only        mp4a.40.2  128k 48k [nl] DASH audio, m4a_dash
fd37a468-7700-4068-b941-6df53a510710   m4a audio only     │  128k dash  │ audio only        mp4a.40.2  128k 48k [nl] DASH audio, m4a_dash
fdfc6f74-68ca-4933-bc6d-a19a6881772c   m4a audio only     │  128k dash  │ audio only        mp4a.40.2  128k 48k [nl] DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-1 m4a audio only     │  129k dash  │ audio only        mp4a.40.2  129k 48k DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-2 m4a audio only     │  129k dash  │ audio only        mp4a.40.2  129k 48k DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-3 m4a audio only     │  129k dash  │ audio only        mp4a.40.2  129k 48k DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-4 m4a audio only     │  129k dash  │ audio only        mp4a.40.2  129k 48k DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-5 m4a audio only     │  129k dash  │ audio only        mp4a.40.2  129k 48k DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-6 m4a audio only     │  130k dash  │ audio only        mp4a.40.2  130k 48k DASH audio, m4a_dash
f14a8946-45cc-4c18-a38b-0030d1578d78-7 m4a audio only     │  131k dash  │ audio only        mp4a.40.2  131k 48k DASH audio, m4a_dash
98304c2b-76c0-453b-85dd-99a3df729a06-0 mp4 640x360     25 │  200k dash  │ avc1.64001e  200k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-1 mp4 640x360     25 │ 1004k dash  │ avc1.64001e 1004k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-2 mp4 640x360     25 │ 1004k dash  │ avc1.64001e 1004k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-3 mp4 640x360     25 │ 1004k dash  │ avc1.64001e 1004k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-4 mp4 640x360     25 │ 1016k dash  │ avc1.64001e 1016k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-5 mp4 640x360     25 │ 1053k dash  │ avc1.64001e 1053k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-6 mp4 640x360     25 │ 1053k dash  │ avc1.64001e 1053k video only          DASH video, mp4_dash
793e68e8-9bef-44cf-8832-08f5a9385356   mp4 768x432     25 │ 1000k dash  │ avc1.64001E 1000k video only          DASH video, mp4_dash
98304c2b-76c0-453b-85dd-99a3df729a06-7 mp4 768x432     25 │ 1000k dash  │ avc1.64001E 1000k video only          DASH video, mp4_dash
fdd8c87e-2e2d-41c7-a291-45ec95cf14a8   mp4 768x432     25 │ 1000k dash  │ avc1.64001E 1000k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-0 mp4 1024x576    25 │  357k dash  │ avc1.4d401f  357k video only          DASH video, mp4_dash
368b7c6c-6c67-45a3-8879-8f52f442a025   mp4 1024x576    25 │ 1500k dash  │ avc1.64001F 1500k video only          DASH video, mp4_dash
60987e7d-a6cc-491c-91a4-99a60a49e26b   mp4 1024x576    25 │ 1500k dash  │ avc1.64001F 1500k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-1 mp4 1024x576    25 │ 1500k dash  │ avc1.64001F 1500k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-2 mp4 1024x576    25 │ 1604k dash  │ avc1.4d401f 1604k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-3 mp4 1024x576    25 │ 1604k dash  │ avc1.4d401f 1604k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-4 mp4 1024x576    25 │ 1604k dash  │ avc1.4d401f 1604k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-5 mp4 1024x576    25 │ 1631k dash  │ avc1.4d401f 1631k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-6 mp4 1024x576    25 │ 1678k dash  │ avc1.4d401f 1678k video only          DASH video, mp4_dash
9860ee25-eddc-4f30-b3fc-dd443846c6ec-7 mp4 1024x576    25 │ 1678k dash  │ avc1.4d401f 1678k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-0 mp4 1280x720    25 │  479k dash  │ avc1.64001f  479k video only          DASH video, mp4_dash
0fc32a6c-169e-467e-a9e8-f50863c9634b   mp4 1280x720    25 │ 2300k dash  │ avc1.64001F 2300k video only          DASH video, mp4_dash
6aeaa3a7-0ad2-4b24-adba-4fcf994dbb83   mp4 1280x720    25 │ 2300k dash  │ avc1.64001F 2300k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-1 mp4 1280x720    25 │ 2300k dash  │ avc1.64001F 2300k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-2 mp4 1280x720    25 │ 2511k dash  │ avc1.64001f 2511k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-3 mp4 1280x720    25 │ 2511k dash  │ avc1.64001f 2511k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-4 mp4 1280x720    25 │ 2511k dash  │ avc1.64001f 2511k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-5 mp4 1280x720    25 │ 2566k dash  │ avc1.64001f 2566k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-6 mp4 1280x720    25 │ 2615k dash  │ avc1.64001f 2615k video only          DASH video, mp4_dash
809f3f8a-2d21-4b2d-992d-b18c871c0d83-7 mp4 1280x720    25 │ 2615k dash  │ avc1.64001f 2615k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-0 mp4 1920x1080   25 │  808k dash  │ avc1.640028  808k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-1 mp4 1920x1080   25 │ 3848k dash  │ avc1.640028 3848k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-2 mp4 1920x1080   25 │ 3848k dash  │ avc1.640028 3848k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-3 mp4 1920x1080   25 │ 3848k dash  │ avc1.640028 3848k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-4 mp4 1920x1080   25 │ 3858k dash  │ avc1.640028 3858k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-5 mp4 1920x1080   25 │ 3858k dash  │ avc1.640028 3858k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-6 mp4 1920x1080   25 │ 3958k dash  │ avc1.640028 3958k video only          DASH video, mp4_dash
1f8fb6c1-37cb-44ef-a233-344a7d0e1bc2-7 mp4 1920x1080   25 │ 4300k dash  │ avc1.640032 4300k video only          DASH video, mp4_dash
351adfcf-f794-4d2a-b0ad-a7f7ab9321bc   mp4 1920x1080   25 │ 4300k dash  │ avc1.640032 4300k video only          DASH video, mp4_dash
b9ffb2aa-e9de-4d6b-bcc9-258abee80305   mp4 1920x1080   25 │ 4300k dash  │ avc1.640032 4300k video only          DASH video, mp4_dash