spaam / svtplay-dl

Small command-line program to download videos from some streaming sites.
https://svtplay-dl.se
MIT License
718 stars 120 forks source link

How to chose between standard audio stream and "tydligare tal" audio stream? #1295

Closed JackTheRippchen closed 3 years ago

JackTheRippchen commented 3 years ago

svtplay-dl versions:

svtplay-dl 2.8 (amd64)

Operating system and Python version:

Windows 10 2004 x64; Python 3.8.6

What is the issue:

How can I chose between standard audio stream and "tydligare tal" audio stream?

svtplay-dl -P dash --list-quality https://www.svtplay.se/video/29199422/julkalendern-mirakel/julkalendern-mirakel-sasong-1-avsnitt-1

Why are there multiple entries with the same quality (5607)? If I define the quality to chose, which one will be chosen?

Jag önskar alla en god jul och ett gott nytt år! Hälsingar från Tyskland

whallin commented 3 years ago

I'm pretty much wondering the same as you here, @JackTheRippchen.

It seems as if SVT has started revamping the way you select between accessibility-specific versions of an episode, making it hard to distinguish which is what.

Would love to hear some other ideas and comments on this. Another example where I ran into this was "Vår tid är nu", also available on SVT Play.

spaam commented 3 years ago

never seen that before. right now there is no easy way to get it. im not sure how to present it. maybe something similar i did for 5.1 audio 🤔

whallin commented 3 years ago

never seen that before. right now there is no easy way to get it. im not sure how to present it. maybe something similar i did for 5.1 audio 🤔

I've never noticed that SVT has changed it to be like this, but I guess it's something new they're doing to improve user experience.

Let's just hope some sort of fix similar to the 5.1 audio-solution can be done.

JackTheRippchen commented 3 years ago

I've never noticed that SVT has changed it to be like this, but I guess it's something new they're doing to improve user experience.

The reason for introducing "tydligare tal" is explain in this blog entry.

JackTheRippchen commented 3 years ago

im not sure how to present it.

Maybe you could have a look on youtube-dl --list-formats https://www.svtplay.se/video/29199422/julkalendern-mirakel/julkalendern-mirakel-sasong-1-avsnitt-1

JackTheRippchen commented 3 years ago

I've never used youtube-dl before today, but with the attached batch file I can exactly select and download the streams I want to.

Julkalendern_2020_Avsnitt01.zip

tivolimeister commented 3 years ago

Any progress? ATM you sometimes get "tydligare tal", sometimes normal.

spaam commented 3 years ago

progress? nope, because i forgot about it 😄 i need to decide how a user can choose if they want normal or tydligare tal or danish or swedish or X or Y. that is "easy" thing to fix. the "hard" part is which one should we choose by default? right now we just take the first in the playlist we parse to get the info where to download the audio. the "problem" is the script support sites that is available in several countries like sweden, norway and denmark. discoveryplus is one of them. sure there are some ways to do it and its just more work to implement it, then all the different service's (svtplay, discoveryplus, viafree, ..) can have specific "rules" where it decide to prio X audio over Y like norwegian over danish. i don't really want that 😕

do you have a url to a video where that happen?

tivolimeister commented 3 years ago

After a closer look, seems like "tydligare tal" audio stream gets selected when available.

"Tydligare tal": https://www.svtplay.se/video/30551438/exit/exit-2-sasong-2-frihamn

Normal: https://www.svtplay.se/video/30346202/exit/exit-2-sasong-2-alla-har-nat-pa-nan

I get that you don't want a stressed solution but in the meantime, until a acceptable solution has formed, a simple way to override the audio stream and select among them manually would be greatly appreciated. Could be as simple as the index number, and list an indicator in --list-quality of what's what. At least with that you CAN get it work.

Mattias3891 commented 3 years ago

progress? nope, because i forgot about it 😄 i need to decide how a user can choose if they want normal or tydligare tal or danish or swedish or X or Y. that is "easy" thing to fix. the "hard" part is which one should we choose by default? right now we just take the first in the playlist we parse to get the info where to download the audio. the "problem" is the script support sites that is available in several countries like sweden, norway and denmark. discoveryplus is one of them. sure there are some ways to do it and its just more work to implement it, then all the different service's (svtplay, discoveryplus, viafree, ..) can have specific "rules" where it decide to prio X audio over Y like norwegian over danish. i don't really want that 😕

do you have a url to a video where that happen?

Ask user to do some choices first time they start svtplay-dl and save it to a config file.
Preferred language, subtitle, download method, ffmpeg container etc. Possibly two choices. One preferred default, one lesser preferred.

Personally, I love having a parameter/config file for things.

pythonuser3856 commented 3 years ago

Stream selection is an issue present with multiple links. Based on that I think it's fairly urgent to get a solution which provides a predictable result.

To simplify for the user of svtplay-dl I tend to agree with @Mattias3891 about using a configuration file. With support of multiple countries by svtplay-dl there is no given default to apply which fits all.

To address that the user could be requested/required to tailor svtplay-dl preferences at setting up svtplay-dl for use. Using a configuration file would enable the user to change preferences by editing the configuration file content.

A simple solution approach could be as follows: 1) svtplay-dl creates a configuration file if it's missing and fill in blanks (place holders) for required entries. 2) with a configuration file missing or where requried entries are missing in the configuration file, svtplay-dl informs the user about the condition including a short-hand description of available parameter values (to guide the user directly without a need to use the switch --help)

spaam commented 3 years ago

hmm. im not really sure if that is the best thing. if we want tydligare tal as standard. what do we do when its not avaible? skipt the video? its not really available at tv4play or viafree or discovery+ having hardcoded values is a bit meh because stuff change.

pythonuser3856 commented 3 years ago

Whatever value set as standard/default will cause an issue at a scenario where it does not apply. To avoid that you could make use of a priority sequence of selection order but with the added complexity that it would add.

A first solution based on configuration file enables a user to apply user specific preferences.

A first solution this way could later be expanded with additional logic such as site specific defaults. It could also be expanded to include a command-line switch to enable the user to apply an override value at a specific invocation of svtplay-dl.

If additional logic to what I describe as a first solution is costly in terms of design effort, the user would with a configuraiton alone still be enabled to perform the wanted selection. The user would with a first simple configuration file solution even have the option to switch between configuration files depending on site preferences.

pythonuser3856 commented 3 years ago

A solution could be based on inverse logic, i.e. configure what to exclude. Today there is a switch "--exclude" which I've interpreted to be for video-exclusion such as be able to exclude videos of type "teckentolkat"; why not build on that with a similar mechanism for audio streams ?

spaam commented 3 years ago

oyoy, if you guys feel adventures, feel free to test latest snapshot. its only for DASH right now.

xprmnt svtplay-dl-dev/lib ‹master*› » python3 -m svtplay_dl https://www.svtplay.se/video/31066234/morden-vid-kustvagen/ --list-quality                                                                                                                  130 ↵
WARNING: 'dplay' have been renamed to 'discoveryplus'
WARNING: Old service names still work at the moment. To avoid the warnings you need to rename the service(s) to the new name(s)
INFO: Quality:   METHOD:    Codec:     Resolution:     Language:            Role:
INFO: 6048       DASH       hevc-51    1920x1080       sv                   main
INFO: 6048       DASH       hevc-51    1920x1080       sv-x-tydligaretal    alternate
INFO: 6048       DASH       hevc-51    1920x1080       sv-x-tal             dub
INFO: 6048       DASH       hevc-51    1920x1080       sv                   main
INFO: 6048       DASH       hevc-51    1920x1080       sv-x-tydligaretal    alternate
INFO: 6048       DASH       hevc-51    1920x1080       sv-x-tal             dub
INFO: 5796       DASH       hevc       1920x1080       sv                   main
INFO: 5796       DASH       hevc       1920x1080       sv-x-tydligaretal    alternate
INFO: 5796       DASH       hevc       1920x1080       sv-x-tal             dub
INFO: 5719       DASH       h264-51    1920x1080       sv                   main
INFO: 5719       DASH       h264-51    1920x1080       sv-x-tydligaretal    alternate
INFO: 5719       DASH       h264-51    1920x1080       sv-x-tal             dub
INFO: 5719       DASH       h264-51    1920x1080       sv                   main
INFO: 5719       DASH       h264-51    1920x1080       sv-x-tydligaretal    alternate
INFO: 5719       DASH       h264-51    1920x1080       sv-x-tal             dub
INFO: 5466       DASH       h264       1920x1080       sv                   main
INFO: 5466       DASH       h264       1920x1080       sv-x-tydligaretal    alternate

I added two new things to choose from: language and role as you can see above. you can see for this video there is three different roles. if you want the main, dub or alternate versions you can choose with --audio-role VALUE replace VALUE with the thing you want for example --audio-role dub if you want a specific language you can use --audio-language VALUE like --audio-language sv-x-tydligaretal to choose the streams with it.

By default it will use the streams with role main. If you choose a language it will use that and skip the role option.

pythonuser3856 commented 3 years ago

This is fun ! I'm using python code snapshot 20210516_130933 runing on windows 8.1 with python 3.8.10

Two quick comments (from only two attempts of use):

1) One crash at using "--list-quality" with https://www.svtplay.se/video/30987662/ut-och-stjala-hastar ( the printout is quite long so I dare to only include the trailing trace) Traceback (most recent call last): File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py__main.py", line 15,in svtplay_dl.main() File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl__init__.py", line 69, in main get_media(urls[0], config, version__) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\utils\getmedia.py", line 62, in get_media get_one_media(stream) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\utils\getmedia.py", line 112, in get_one_media for i in streams: File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\service\svtplay.py", line 95, in get yield from videos File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\service\svtplay.py", line 112, in _get_video yield from dashparse(self.config, self.http.request("get", i["url"]), i["url "], output=self.output) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\fetcher\dash.py", line 217, in dashparse yield from _dashparse(config, res.text, url, output, cookies=res.cookies, ** kwargs) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\fetcher\dash.py", line 252, in _dashparse subtitles = adaptionset(attributes, temp, url, baseurl) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\fetcher\dash.py", line 149, in adaptionset if streams.keys(): AttributeError: 'list' object has no attribute 'keys'

2) The printout at a successful run using switch "--list-quality" is very wide Is it perhaps even wider than 80 characters ? Example run: svtplay-dl_sshot_20210516_130933py__main__.py --list-quality https://www.svtplay.se/video/30987426/dagen-gryr

INFO: Quality: METHOD: Codec: Resolution: Language: Role : INFO: 6236 DASH hevc 1920x1080 sv-x-tal dub

INFO: 6236 DASH hevc 1920x1080 sv-x-tal dub

INFO: 6235 DASH hevc 1920x1080 sv main

INFO: 6235 DASH hevc 1920x1080 sv main

The end of the word "main" ends up at position 79 of a width ranging between 0 and 79 The colon (":") of "Role:" on the title line ends up wrapped to next line at a use of 80 characters width

spaam commented 3 years ago

1) great. i will look into that. seems related to subs :)

2) the line INFO: Quality: METHOD: Codec: Resolution: Language: Role: is 81 char long. i have no idea how big terminals people are using. it worked in cmd with default size. my terminal on macOS is similar size. i guess i could turn down the space at some places :)

pythonuser3856 commented 3 years ago

Two more comments:

1) At using "--audio-language sv" as only parameter svtplay-dl does not select highest available bitrate svtplay-dl_sshot_20210516_130933py__main__.py --list-quality https://www.svtplay.se/video/30940178/a-perfect-day INFO: Quality: METHOD: Codec: Resolution: Language: Role : INFO: 6285 DASH hevc-51 1920x1080 sv main

INFO: 6285 DASH hevc-51 1920x1080 sv-x-tydligaretal alte rnate INFO: 6285 DASH hevc-51 1920x1080 sv-x-tal dub

INFO: 6285 DASH hevc-51 1920x1080 sv main ... py c:\svtplaydll\svtplay-dl_sshot_20210516_130933py__main__.py --audio-language sv https://www.svtplay.se/video/30940178/a-perfect-day INFO: Outfile: a.perfect.day.a.perfect.day-7f5fd79-svtplay.mp4 INFO: Selected to download dash, bitrate: 5873 format: h264-51

2) A crash at an attempt to download using: svtplay-dl_sshot_20210516_130933py__main.py --quality 6285 https://www.svtplay.se/video/30940178/a-perfect-day Traceback (most recent call last): File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py__main__.py", line 15,in svtplay_dl.main() File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl__init__.py", line 69, in main get_media(urls[0], config, version__) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\utils\getmedia.py", line 62, in get_media get_one_media(stream) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\utils\getmedia.py", line 214, in get_one_media fstream = select_quality(stream.config, videos) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\utils\stream.py", line 155, in select_quality quality = ", ".join(f"{str(x)} ({str(y)})" for x, y in data) File "c:\svtplaydll\svtplay-dl_sshot_20210516_130933py\svtplay_dl\utils\stream.py", line 155, in quality = ", ".join(f"{str(x)} ({str(y)})" for x, y in data) ValueError: too many values to unpack (expected 2)

spaam commented 3 years ago

1) that is expected because of

  --format-preferred h264,h264-51
                        Choose the format you prefer, --list-quality to show which one to choose from

h264 and h264-51 is default value. 2) that seems to have been broke a while, fix it :)

pythonuser3856 commented 3 years ago

About length or number of characters per line

"INFO" is short hand for INFORMATION Perhaps it's possible to shorten some of the others as well ?

If the column value (instead of the column title) determines the column width it's of course irrelevant.

spaam commented 3 years ago

sure it could but is that really an issue? 🤔

i could make it even shorter and remove all the spaces so it will be less readable too.

INFO: Quality: Method: Codec: Resolution: Language: Role:
INFO: 6043 dash hevc 1920x1080 sv main
INFO: 6043 dash hevc 1920x1080 sv-x-tal dub
INFO: 6043 dash hevc 1920x1080 sv main
INFO: 6043 dash hevc 1920x1080 sv-x-tal dub
INFO: 5626 dash h264 1920x1080 sv main
INFO: 5626 dash h264 1920x1080 sv-x-tal dub

vs

INFO: Quality:   METHOD:  Codec:   Resolution:  Language:            Role:
INFO: 6043       DASH     hevc     1920x1080    sv                   main
INFO: 6043       DASH     hevc     1920x1080    sv-x-tal             dub
INFO: 6043       DASH     hevc     1920x1080    sv                   main
INFO: 6043       DASH     hevc     1920x1080    sv-x-tal             dub
INFO: 5626       DASH     h264     1920x1080    sv                   main
INFO: 5626       DASH     h264     1920x1080    sv-x-tal             dub

i think the last one is easier to read.

i'm using logging method thing to display text to people. info is just some information to the user. and sometimes we have a warning message like this new one:

WARNING: 'dplay' have been renamed to 'discoveryplus'
WARNING: Old service names still work at the moment. To avoid the warnings you need to rename the service(s) to the new name(s)

and we have error and debug for different stuff, but i feel this logging message type should be in a separate issue and not this one. 🤔

pythonuser3856 commented 3 years ago

Straight columns are for sure more readable ! At using MS-windows I get a terminal window with a default width of 80 chars, hence my comment.

spaam commented 3 years ago

i talked to some friends who are using windows10 and this terminal window thing and they say its 120x30, same as my cmd. mixed answers 🤔

pythonuser3856 commented 3 years ago

Well, not all have the latest version. The MS-windows 8.1 that I use has a default width of 80 and 8x12 font. But primarily I think it's a matter of usability. Use a width you see as needed by functionality but have in mind that one may want to use multiple terminal windows simultaneously visible on a limited screen size. I'm using up to a two-digit number of terminal windows myself.

spaam commented 3 years ago

interesting. i thought people stopped using windows 8.x in favour of 10 🤔 latest snapshot from yesterday should be better for you then. it should be like 5 chars shorter.

pythonuser3856 commented 3 years ago

Using an older version has its advantages of stable functional content; what I like is that you don't have to re-learn things from that the software firm want to promote sales based on changes to user interaction w/o real functional changes. That's a time thief if you want to continue to perform your daily tasks. But there is an end to everything, end of support is close up. There is of course some new functionality worth using but for that I'm using a separate installation & computer. About terminal window size: Note that I refer to the default size and that it can be alterered. The size impact on a use of multiple simultaneous windows is of more importance, at least to me.

pythonuser3856 commented 3 years ago

I've used the new snapshot 20210516_200220 with a couple of links and it looks very good, no hickups at using it with SVTplay and URplay !

A question: The printout from using "--list-quality" indicates language "sv" for https://www.svtplay.se/video/31175122/line-of-duty/line-of-duty-sasong-6-avsnitt-1

The new switch "--audio-language" does in this case not select "sv" audio but I do get swedish subtitles. The outcome is fine with me but it does not match the switch "--audio-language". If the web page does not provide any means for svtplay-dl to indicate that audio is native english, why not simplify and change the switch and its description from "--audio-language" to "--language" ? I mean, you do get swedish language.

My example: https://www.svtplay.se/video/31175122/line-of-duty/line-of-duty-sasong-6-avsnitt-1 Using "svtplay-dl --audio-language sv " will get me a version with native english and hardcoded swedish subitles

spaam commented 3 years ago

sv value is what i get from the playlist of the videos svtplay have. i have no idea if its swedish or english or danish or x they actually speak in the video. now days on svtplay it can be svor sv-x-tydligaretal or sv-x-tal. some other sites it may include those languages i said before , i mean the "correct" language. sure i could switch it to language if its better.

pythonuser3856 commented 3 years ago

I like a stable and consistent interface since I make use of it from scripts. But what I think is that if the "audio" is removed from "--audio-language" there will likely be less questions over its use ... What I failed to express earlier; Great job !

spaam commented 3 years ago

everyone likes a stable interface. :) that is why i made a request so people can try it out and give input before a release like you did which is great :) if i change to --language i guess i should mention its used for the audio in the help `--help`` text so people dont think its something else. 🤔

bohelax commented 3 years ago

Something a little strange is still going on. Using the latest version of youtube-dl.exe (2021.05.16) to list the audio only files I get: hls-cmaf-full-stereo-Svenska mp4 audio only [sv] hls-cmaf-full-stereo-Tydligare_tal mp4 audio only [sv-x-tydligaretal] hls-cmaf-full-stereo-Upplõst_text mp4 audio only [sv-x-tal] hls-cmaf-full-surround-Svenska mp4 audio only [sv] hls-cmaf-full-surround-Tydligare_tal mp4 audio only [sv-x-tydligaretal] hls-cmaf-full-surround-Upplõst_text mp4 audio only [sv-x-tal] hls-cmaf-lb-full-stereo-Svenska mp4 audio only [sv] hls-cmaf-lb-full-stereo-Tydligare_tal mp4 audio only [sv-x-tydligaretal] hls-cmaf-lb-full-stereo-Upplõst_text mp4 audio only [sv-x-tal] hls-stereo-Svenska mp4 audio only [sv] hls-ts-avc-stereo-Svenska mp4 audio only [sv] hls-ts-full-stereo-Svenska mp4 audio only [sv] hls-ts-full-stereo-Tydligare_tal mp4 audio only [sv-x-tydligaretal] hls-ts-full-stereo-Upplõst_text mp4 audio only [sv-x-tal] hls-ts-full-surround-Svenska mp4 audio only [sv] hls-ts-full-surround-Tydligare_tal mp4 audio only [sv-x-tydligaretal] hls-ts-full-surround-Upplõst_text mp4 audio only [sv-x-tal] hls-ts-lb-full-stereo-Svenska mp4 audio only [sv] hls-ts-lb-full-stereo-Tydligare_tal mp4 audio only [sv-x-tydligaretal] hls-ts-lb-full-stereo-Upplõst_text mp4 audio only [sv-x-tal] dashhbbtv-5 m4a audio only [sv] DASH audio 195k , m4a_dash container, mp4a.40.2 (48000Hz)

Using svtplay-dl snapshot 20210518_185419 I get: bin>svtplay-dl.py --list-quality https://www.svtplay.se/klipp/31179954/trailer-line-of-duty-sasong-6 INFO: Quality: METHOD: Codec: Resolution: Language: Role: INFO: 3745 DASH h264 1920x1080 sv main INFO: 3745 DASH h264 1920x1080 sv main INFO: 3745 DASH h264 1920x1080 sv main INFO: 3745 DASH h264 1920x1080 sv main INFO: 3745 DASH h264 1920x1080 sv main INFO: 2760 HLS h264 1920x1080 sv main INFO: 2760 HLS h264 1920x1080 sv main INFO: 2760 HLS h264 1920x1080 sv main INFO: 2682 HLS h264 1920x1080 sv main INFO: 2379 DASH h264 1280x720 sv main INFO: 2379 DASH h264 1280x720 sv main INFO: 2379 DASH h264 1280x720 sv main INFO: 2379 DASH h264 1280x720 sv main INFO: 2379 DASH h264 1280x720 sv main . . . (I did not include all the Resolutions above) I used the LOD trailer to experiment with because it's small. The actually downloaded trailer is fine (without using any optional arguments).

Added later on: I downloaded the first LOD episode (https://www.svtplay.se/video/31175122/line-of-duty/line-of-duty-sasong-6-avsnitt-1) four times using No options and --audio-role main/dub/alternate. The result is: No option and main are identical (by binary compare). dub works i.e. subtitles are voiced (Uppläst_text) No option and alternate differs (by binary compare), although I cant hear the difference.

Great work @spaam !!! //BoH

pythonuser3856 commented 3 years ago

When choosing to get subtitles it seems as if these do not always match the audio selection. There are at times text-items included for hearing impaired such as "TELEFONEN RINGER".

Is it perhaps so that selection of subtitle should go hand in hand with selection of audio type ?

When attempting to use the switches "--subtitle" and "--all-subtitles" I get multiple .SRT-files all with the same file name. An example using snaphot 20210520_123348 (running on windows 8.1 and python 3.8.10). Here I've added the switch "--force-subtitle" to better illustrate the resulting output:

py c:\svtplaydll\svtplay-dl_sshot_20210520_123348py__main__.py --subtitle --force-subtitle --all-subtitles --only-audio https://www.svtplay.se/video/17324078/yarden INFO: Outfile: yarden.yarden-8b247a1-svtplay.sv.srt INFO: Outfile: yarden.yarden-8b247a1-svtplay.sv.srt INFO: Outfile: yarden.yarden-8b247a1-svtplay.sv.srt INFO: Outfile: yarden.yarden-8b247a1-svtplay.sv.srt INFO: Outfile: yarden.yarden-8b247a1-svtplay.sv.srt INFO: Outfile: yarden.yarden-8b247a1-svtplay.sv.srt

Another example is the link https://www.svtplay.se/video/31009398/inland Available streams: py c:\svtplaydll\svtplay-dl_sshot_20210520_123348py__main__.py --list-quality https://www.svtplay.se/video/31009398/inland INFO: Quality: METHOD: Codec: Resolution: Language: Role: INFO: 6360 DASH hevc-51 1920x1080 sv main INFO: 6360 DASH hevc-51 1920x1080 sv-x-tydligaretal alternate INFO: 6360 DASH hevc-51 1920x1080 sv-x-tal dub INFO: 6360 DASH hevc-51 1920x1080 sv main INFO: 6360 DASH hevc-51 1920x1080 sv-x-tydligaretal alternate INFO: 6360 DASH hevc-51 1920x1080 sv-x-tal dub INFO: 6108 DASH hevc 1920x1080 sv main INFO: 6108 DASH hevc 1920x1080 sv-x-tydligaretal alternate INFO: 6108 DASH hevc 1920x1080 sv-x-tal dub INFO: 6106 DASH h264-51 1920x1080 sv main INFO: 6106 DASH h264-51 1920x1080 sv-x-tydligaretal alternate INFO: 6106 DASH h264-51 1920x1080 sv-x-tal dub INFO: 6106 DASH h264-51 1920x1080 sv main INFO: 6106 DASH h264-51 1920x1080 sv-x-tydligaretal alternate INFO: 6106 DASH h264-51 1920x1080 sv-x-tal dub < snip >

And at downloading, this time w/o "--force-subtitle", I get a collision in .SRT file names: py c:\svtplaydll\svtplay-dl_sshot_20210520_123348py__main__.py --subtitle --all-subtitles https://www.svtplay.se/video/31009398/inland INFO: Outfile: inland.inland-6deb432-svtplay.sv.srt INFO: Outfile: inland.inland-6deb432-svtplay.sv.srt WARNING: File (inland.inland-6deb432-svtplay.sv.srt) already exists. Use --force-subtitle to overwrite INFO: Outfile: inland.inland-6deb432-svtplay.sv.srt WARNING: File (inland.inland-6deb432-svtplay.sv.srt) already exists. Use --force-subtitle to overwrite INFO: Outfile: inland.inland-6deb432-svtplay.sv.srt WARNING: File (inland.inland-6deb432-svtplay.sv.srt) already exists. Use --force-subtitle to overwrite INFO: Outfile: inland.inland-6deb432-svtplay.sv.srt WARNING: File (inland.inland-6deb432-svtplay.sv.srt) already exists. Use --force-subtitle to overwrite INFO: Outfile: inland.inland-6deb432-svtplay.sv.srt WARNING: File (inland.inland-6deb432-svtplay.sv.srt) already exists. Use --force-subtitle to overwrite INFO: Outfile: inland.inland-6deb432-svtplay.mp4 INFO: Selected to download dash, bitrate: 6106 format: h264-51 [0099/1282][===.....................................] ETA: 0:01:15 < snip >

spaam commented 3 years ago

When attempting to use the switches "--subtitle" and "--all-subtitles" I get multiple .SRT-files all with the same file name.

yep that is because a bug i fixed earlier. it crashed before. the issue is that we had subs in the .mpd playlist and subs via old way where its defined. next will filter out all the subs that is the same.

ofc it will have TELEFONEN RINGER its CC subtitles. having it to reflect the --language feels bit bad. maybe people want the subtile and not the audio? 🤔

pythonuser3856 commented 3 years ago

My bad thinking, I see your point about subtitles and language. But as long as the .SRT-files are named differently, and by that stored separately when retrieved, they are so small in size that there's no need to select which to get. Just get them all. Or do they all convey Closed Captions content ?

At retrieving multiple .SRT-files; is it possible to let the file name reflect the .SRT-file content ? Perhaps this finding is better moved to a different thread...

Sorry, now I've done what I should have started with and that is to view the film via a web browser. Using Firefox I now see that CC is all that's available as subtitles for my two examples.

spaam commented 3 years ago

this is fixed in 3.9.1. test it and see if it works, if not create a new issue with all the info :)