-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[srgssr] Extract the correct video + add subtitles (closes #14717) #14725
Conversation
This would be awesome to have. Subtitles are currently broken for me with the srgssr extractor. |
I think this needs some rework. We should not remove the old method to get the video sources... instead we should keep them as a fallback. |
# This is needed because for audio medias the podcast url is usually | ||
# always included, even if is only an audio segment and not the | ||
# whole episode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have an example for this case(whole podcast URL present for an audio segment)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at this: https://www.srf.ch/play/radio/popupaudioplayer?id=50b20dc8-f05b-4972-bf03-e438ff2833eb
The loaded json
file is this: https://il.srgssr.ch/integrationlayer/2.0/mediaComposition/byUrn/urn:srf:audio:50b20dc8-f05b-4972-bf03-e438ff2833eb.json
We are only interested in the object chapterList -> 5
. But this object contains a key podcastSdUrl
which contains the URL https://podcasts.srf.ch/world/audio/Echo-der-Zeit_23-02-2021-1800.1614103565876.mp3?assetId=7602dd05-7f30-4c9f-88d4-2cd9c445efa8
. This URL links to the podcast of the whole episode, not just segment we would like to retrieve.
'rtr': 'rm', | ||
'swi': 'en', | ||
} | ||
known_formats = ('TTML', 'VTT') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have an example with TTML subtitles? all the videos that i've tested with has only VTT subtitles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think TTML subtitles do not exist anymore.
This video (https://www.srf.ch/play/tv/rundschau/video/schwander-rot-gruene-stadtpolitik-min-li-marti-tamilen-kirche?urn=urn:srf:video:2da578e3-dbb4-4657-a539-f01089a67831) used to have TTML subtitles.
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
This pull request solves the issues described in #14717, and adds subtitle support. Furthermore, it uses
self._extract_akamai_formats
to extract these formats too, and the tests have been adjusted.