emarsden / dash-mpd-cli

Download media content from a DASH-MPEG or DASH-WebM MPD manifest
https://emarsden.github.io/dash-mpd-cli/
MIT License
293 stars 33 forks source link

Download failing due to "Subtitle representation is missing SegmentTemplate@duration" #10

Closed leovbernardo closed 1 year ago

leovbernardo commented 1 year ago

Hi Eric, Not sure where the issue is on the MPD below. There is 1 period, 2 audio and 5 video streams + subtitles. Even though I'm forcing to download video only, it is still failing due to an error associated with the subtitles. Any idea? Thanks!

dash-mpd-cli --verbose --video-only --keep-video ".\video\video.mp4" --cookies-from-browser Chrome "https://vod-as-09-14.video.globo.com/j/eyJhbGciOiJSUzUxMiIsImtpZCI6IjEiLCJ0eXAiOiJKV1QifQ.eyJjb3VudHJ5X2NvZGUiOiJCUiIsImRvbWFpbiI6InZvZC1hcy0wOS0xNC52aWRlby5nbG9iby5jb20iLCJleHAiOjE2OTE5MDEwNzUsImlhdCI6MTY5MTg5MzA0MiwiaXNzIjoicGxheWJhY2stYXBpLXByb2QtZ2NwIiwib3duZXIiOiI4MjYzN2Q1ZS00MWI1LTRlZDAtODUwYi1mNzg3YjJmNzAzYjgiLCJwYXRoIjoiL3IyNDBfNzIwL3Y0NS9kYi82Mi9jYS83MDU2NzIzX2NhMDJiNDU3OWI2NjQwODIxMDE2MjI4OTk4YWIzYTdiMDNmNzIxODcvNzA1NjcyMy1XTjByNVEtbWFuaWZlc3QuaXNtLzcwNTY3MjMubXBkIn0.id5Os60-NfkEKZR5Qmxfo3r0SadZiHauXqS5-2M1vgDq5COWK-hAIQ6bTvmm8Gb9GytjCdYJ7hoA-sSABEt7nw61YJB1P_V-acTTeSqrHtCOlrFuzTy4EaGzNCgE1E-bjd0vpeZRbDieCgTBI-dPTT7WY63n3b4MRvby-IlwPuybhHhvUP-DGKvXth0uT3E147qQZUoqqf1hjnnz7j0OvikSbOVvnBhY8xPFkz0s48pfTh6mbRV9-zy8CLkL4HKF_3P3qYV0Zogpp4Qh1_6th4mTyClN1PR4YTEybad3SX4y2KfZTcGdvBH41IDAteFuJKeL08z-BB6TpuPFsl8gag/r240_720/v45/db/62/ca/7056723_ca02b4579b6640821016228998ab3a7b03f72187/7056723-WN0r5Q-manifest.ism/7056723.mpd" [0s] [>-------------------------------------------------] Fetching DASH manifest Fetching the DASH manifest DASH manifest has 1 period Streams in period 1 (#1), duration 2677.556s: audio mp4a.40.2 | 125 Kbps | lang=en audio mp4a.40.2 | 125 Kbps | lang=pt video avc1.64001E | 351 Kbps | 640x360 video avc1.64001E | 614 Kbps | 640x360 video avc1.64001F | 1067 Kbps | 854x480 video avc1.64001F | 1915 Kbps | 1280x720 video avc1.640028 | 2965 Kbps | 1280x720 subs Wvtt/wvtt | pt | subs Vtt | pt | Handling period 1 (# 1) Using SegmentTemplate addressing mode for stpp subtitles Download failed: invalid media stream: Subtitle representation is missing SegmentTemplate@duration

emarsden commented 1 year ago

Hi, thanks for the report. This is rather silly; the current release is indeed unable to handle all types of addressing mode for subtitles, but there's no reason for that to produce an error unless you are downloading subtitles. I'll fix this in the next release in the next few days.

leovbernardo commented 1 year ago

Thanks Eric. Please advise if you need any additional details. Looking forward to the hot fix.

emarsden commented 1 year ago

Please check whether the latest release, v0.2.4, fixes this problem; I'm hoping it does (but your manifest is not accessible to me).

leovbernardo commented 1 year ago

success!! It worked like a charm. Now I just need to figure out how to decrypt the video (and audio). Actually, find a way to find the KEY...

Fetching the DASH manifest DASH manifest has 1 period Streams in period 1 (#1), duration 2677.556s: audio mp4a.40.2 | 125 Kbps | lang=en audio mp4a.40.2 | 125 Kbps | lang=pt video avc1.64001E | 351 Kbps | 640x360 video avc1.64001E | 614 Kbps | 640x360 video avc1.64001F | 1067 Kbps | 854x480 video avc1.64001F | 1915 Kbps | 1280x720 video avc1.640028 | 2965 Kbps | 1280x720 subs Wvtt/wvtt | pt | subs Vtt | pt | Preparing download for period 1 (#1) Audio stream selected: bw=125 Kbps lang=en codec=mp4a.40.2 ContentProtection: cenc KID: D4CF5CBFB5B2F5F68547A8E7BE976D12 ContentProtection: PlayReady ContentProtection: Widevine ContentProtection: PSSH (from init segment): AAA= Video stream selected: bw=2965 Kbps resolution=1280x720 codec=avc1.640028 ContentProtection: cenc KID: D4CF5CBFB5B2F5F68547A8E7BE976D12 ContentProtection: PlayReady ContentProtection: Widevine ContentProtection: PSSH (from init segment): AAA= Period #1: fetching 671 audio, 671 video and 671 subtitle segments [49s] [######################>---------------------------] Fetching video segments

leovbernardo commented 1 year ago

the "key" is a kind of going thru a rabbit hole. I have 35 tabs open and the only important thing I found was "notaghost9997" and "getwvkeys". But nobody is willing to share anything, apparently. My discord is leovbernardo in case you want to chat 😊. Thanks Eric.