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

[srgssr] Extract the correct video + add subtitles (closes #14717) #14725

Closed
wants to merge 1 commit into from

Conversation

goggle
Copy link
Contributor

@goggle goggle commented Nov 11, 2017

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:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

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.

@refacto
Copy link

refacto commented May 26, 2018

This would be awesome to have. Subtitles are currently broken for me with the srgssr extractor.

@goggle
Copy link
Contributor Author

goggle commented May 28, 2018

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.

Comment on lines +154 to +156
# 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.
Copy link
Collaborator

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)?

Copy link
Contributor Author

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')
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

3 participants