spaam / svtplay-dl

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

No subtitles in tv4play.se #930

Open epikuren opened 6 years ago

epikuren commented 6 years ago

I have succeeded installing svtplay-dl 2.0. in Ubuntu bash on Windows 10. It works well with tv4play.se, but I cannot download any subtitles. Is it possible to fix this?

spaam commented 6 years ago

what happens when you download it? does it crash? nothing happen? do you have an url? :)

epikuren commented 6 years ago

Är svenska ok? Om jag försöker ladda ner med: svtplay-dl -S https://www.tv4play.se/program/sweetbitter/10315175

får jag följande resultat:

INFO: Starting new HTTPS connection (1): www.tv4play.se INFO: Starting new HTTPS connection (1): playback-api.b17g.net INFO: Starting new HTTPS connection (1): lbs-usp-hls-vod.cmore.se INFO: Starting new HTTPS connection (1): cmoreseusphlsvod63.akamaized.net INFO: Starting new HTTPS connection (1): cmoreseusphlsvod15.akamaized.net INFO: Starting new HTTPS connection (1): lbs-usp-hls-vod.cmore.se INFO: Starting new HTTPS connection (1): cmoreseusphlsvod18.akamaized.net ... INFO: Starting new HTTPS connection (1): cmoreseusphlsvod55.akamaized.net Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/bin/svtplay-dl/main.py", line 13, in File "/usr/local/bin/svtplay-dl/svtplay_dl/init.py", line 63, in main File "/usr/local/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 56, in get_media File "/usr/local/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 157, in get_one_media File "/usr/local/bin/svtplay-dl/svtplay_dl/utils/getmedia.py", line 152, in options_subs_dl File "/usr/local/bin/svtplay-dl/svtplay_dl/subtitle/init.py", line 58, in download File "/usr/local/bin/svtplay-dl/svtplay_dl/subtitle/init.py", line 277, in wrstsegment IndexError: list index out of range

Det går bra att ladda ner utan undertexter, men jag behöver dem.. Uppskattar annars möjligheten att ladda ner TV4-program, eftersom jag avskyr tv-reklam...

Sopor commented 6 years ago

Undertextproblemet är väl redan nämt i #925 så detta är inget nytt problem med 2.0.

JohnnyJorgensen commented 6 years ago

I have the same problem. Also get the index out of range error. None of the subtitle switches seem to work with TV4Play.

ottob commented 6 years ago

I ran into the same issue today:

$ ./svtplay-dl -S https://www.tv4play.se/program/the-young-pope/3970075
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "./svtplay-dl/__main__.py", line 13, in <module>
  File "./svtplay-dl/svtplay_dl/__init__.py", line 63, in main
  File "./svtplay-dl/svtplay_dl/utils/getmedia.py", line 56, in get_media
  File "./svtplay-dl/svtplay_dl/utils/getmedia.py", line 157, in get_one_media
  File "./svtplay-dl/svtplay_dl/utils/getmedia.py", line 152, in options_subs_dl
  File "./svtplay-dl/svtplay_dl/subtitle/__init__.py", line 58, in download
  File "./svtplay-dl/svtplay_dl/subtitle/__init__.py", line 277, in wrstsegment
IndexError: list index out of range
Sopor commented 6 years ago

@spaam Could this be useful for the TV4 subtitle issue?

Sopor commented 6 years ago

How it is possible that svtplay-dl now suddenly can download webvtt from TV4? https://lbs-usp-hls-vod.cmore.se/vod/4d529/mbd2a3emm33(3971715_ISMUSP).ism/mbd2a3emm33(3971715_ISMUSP)-textstream_swe=3000-1.webvtt So when i downloaded Parlamentet i got an SRT subtitle file. Hmm, it seems to be svtplay-dl that are doing this? Why isn't this issue closed if it is working?

JohnnyJorgensen commented 6 years ago

Really interesting. Parlamentet worked for me too, but I tried downloading JUST the subtitle, and it took a REALLY long time before anything happened. But I got the SRT file.

Sopor commented 6 years ago

Add -verbose and you will see how it is downloading small part of the subtitle. Yes, it will take about 25 seconds to download only the subtitle but that is much better than no subtitle at all. Maybe it should bring up some kind of message to show what it is doing instead of a blank prompt?

Sopor commented 6 years ago

@JohnnyJorgensen did you noticed any quality issues in Parlamentet? For me i get lag in the video. I will do some more testing.

JohnnyJorgensen commented 6 years ago

@Sopor- Now that you mention it. It's not a lot, but the video doesn't seem to play 100% smoothly. For some time now, I've had problems with VLC, it doesn't play correctly and once in a while it crashes all together. Haven't had time to investigate that problem, though. But in this case I even tested with Windows Media Player, and that one didn't play smoothly either... :-( If it has any impact on the problem, I'm using the ffmpeg version that Bengt-H mentioned in thread #925.

epikuren commented 6 years ago

I still don't get any subtitles. And I don't understand how to download by using "webvtt ". For the moment I pay for Cmore with TV4 programs, so the problem for me is solved - but for a price... But if someone could be kind enough to tell me what exact command to write if I, for example, want to download "https://www.tv4play.se/program/parlamentet/3209953" WITH subtitles (or only the subtitle), I would be very grateful.

Sopor commented 6 years ago

@epikuren To download the subtitle you need to use latest master If you want to download both the video and the subtitle svtplay-dl -S https://www.tv4play.se/program/parlamentet/3209953 If you only want to download the subtitle svtplay-dl -S --force-subtitle https://www.tv4play.se/program/parlamentet/3209953 It will take up to 60 seconds to get the subtitle (it converts the webvtt to srt) so don't abort it.

epikuren commented 6 years ago

Thank you for your answer. It is the same command I have used before, without getting any subtitles. But now it seems to work! I have tried with several programs from TV4 Play. Most of the times it works fine to download video and subtitle at the same time, once I had to download the subtitle separately. But it works! And I have been able to download subs from TV4 Play for the first time in a long time. Lets hope that it lasts...

hpsu commented 6 years ago

I still get list index out of range on several titles, for instance https://www.tv4play.se/program/hem-till-g%C3%A5rden?video_id=3973270

epikuren commented 6 years ago

Yes, it seems to work sometimes, sometimes not. I got the same error when downloading that particular show, even if I tried to download subs separately. But with antoher show

JohnnyJorgensen commented 6 years ago

If you cannot be sure getting subtitles - and you need them - the application is not so useful.

You could try look at it from the perspective that nothing is fool proof and be grateful for what you DO get?

Remember that the good developers of this application are doing this for free and on their own time... ;-)

OldSchool297 commented 5 years ago

I know how to get subtitles from Hem till gården past summer because they changed from webvtt to streaming subtitles. I have all subtitles from 2015 to 2017 autumn. I also have the most from 2013-2014. I miss from autumn 2017 to spring 2018. If anyone has them we can make a trade? Sadly i can't download them with the swedish program uwtd. Is there any other program that can download the new streaming subtitles?

OldSchool297 commented 5 years ago

Does anyone knows how to get the subtitle stream from Tv4 and download it without the swedish program uwtd?

Sopor commented 5 years ago

@OldSchool297 You can use svtplay-dl but you need latest master. Note: It looks like nothing happens when it downloads the subtitle but that it because there is no progress indicator.

hpsu commented 5 years ago

@Sopor-

I still get the List index out of range with latest master

Traceback (most recent call last):
  File "/usr/bin/svtplay-dl", line 7, in <module>
    svtplay_dl.main()
  File "/usr/lib/python3.7/site-packages/svtplay_dl/__init__.py", line 64, in main
    get_media(urls[0], config, __version__)
  File "/usr/lib/python3.7/site-packages/svtplay_dl/utils/getmedia.py", line 56, in get_media
    get_one_media(stream)
  File "/usr/lib/python3.7/site-packages/svtplay_dl/utils/getmedia.py", line 174, in get_one_media
    options_subs_dl(subfixes)
  File "/usr/lib/python3.7/site-packages/svtplay_dl/utils/getmedia.py", line 169, in options_subs_dl
    subs[0].download()
  File "/usr/lib/python3.7/site-packages/svtplay_dl/subtitle/__init__.py", line 58, in download
    data = self.wrstsegment(subdata)
  File "/usr/lib/python3.7/site-packages/svtplay_dl/subtitle/__init__.py", line 301, in wrstsegment
    if len(subs) > 0 and itmes[1] == subs[-1][1]:
IndexError: list index out of range
Sopor commented 5 years ago

It seems to be the same as i get #1038

OldSchool297 commented 5 years ago

I get a message about: The program can't start because api-ms-win-crt-stdio-l1-1-0.dll is missing from your computer.

hpsu: Do you follow Hem till gården everyday? Because i miss some subtitles, i have some if you may miss some.

OldSchool297 commented 5 years ago

Do i need to install Svtplay-dl in Windows 7? I have the folder but i only get the error message as i wrote earlier. https://svtplay-dl.se/install/source/

Sopor commented 5 years ago

@OldSchool297 To solve the missing dll file you should be able to fix that with Microsoft Visual C++ 2015 Redistributable and if you can't get svtplay-dl 2.1 to work you can always download latest master. Follow this video on how to download an already compiled version for Windows. To compile svtplay-dl in Windows from source is not so easy.

OldSchool297 commented 5 years ago

I have now installed http://m.majorgeeks.com/content/page/install_all_the_microsoft_c_runtimes_at_once_with_visual_c_runtime_installer.html but i get the same error message. I have these Visual c++ http://www.imagebam.com/image/3643f11104401014 I run an antique computer with an old 1,9ghz processor that can't install Win 8 even so maybe it's to old to run Svtplay-dl?

granbom commented 5 years ago

@OldSchool297 if you have an outdated operating system (like windows 7, that Microsoft stopped supporting 4 years ago) I suggest that you install something safer on your computer. A computer with an 1,9 GHz processor is perfectly fine running svtplay-dl but you will have issues with a lot of applications apart from svtplay-dl if you are running an old operating system that even the manufacturer abandoned in January 2015.

OldSchool297 commented 5 years ago

You had right it was the 2015 runtime, it never got fully installed, i had to remove the 2017 first to install 2015, Svtplay-dl now open and loads some texts and then close quit. Does it work by Command prompt like Youtube-dl?

OldSchool297 commented 5 years ago

Has got Svtplay-dl to work and it should be able to download from Tv4. C: svtplay-dl svtplay-dl.exe -o I: svtplay-dl -S -M --remux -f https://www.tv4play.se/program/ home-t ... 5rden / 11832356 gets up: Merge susbtitle needs ffmpeg. Where to install it? In svtplay folder?

Have downloaded the latest ffmpeg and run setx /M PATH "C:\svtplay-dl\ffmpeg\bin;%PATH%" but get the same message about ffmpeg.

https://www.wdiaz.org/how-to-install-ffmpeg-on-windows/

In system it looks like this: C:\svtplay-dl\ffmpeg\bin;C:\Windows\system32;C:\Windows;C:\Wi ndows\System32\Wbem;C:\Windows\System32\WindowsPow erShell\v1.0"

It looks like this under System in Win 7: http://www.imagebam.com/image/c977af1106423894

Sopor commented 5 years ago

@OldSchool297 Put ffmpeg.exe in the same folder as svtplay-dl.exe. It is the easiest way.

OldSchool297 commented 5 years ago

I did that and restarted and now i got this:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users>cd..

C:\Users>cd..

C:>C:\svtplay-dl\svtplay-dl.exe -o C:\svtplay-dl -S -M --remux -f https://www.t v4play.se/program/hem-till-g%C3%A5rden/11832356 Traceback (most recent call last): File "C:\Python35\lib\site-packages\cx_Freeze\initscripts__startup.py", lin e 14, in run File "C:\Python35\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26 , in run File "bin/svtplay-dl", line 7, in File "c:\projects\svtplay-dl\lib\svtplay_dl__init__.py", line 63, in main File "c:\projects\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 56, in ge t_media File "c:\projects\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 157, in g et_one_media File "c:\projects\svtplay-dl\lib\svtplay_dl\utils\getmedia.py", line 152, in o ptions_subs_dl File "c:\projects\svtplay-dl\lib\svtplay_dl\subtitle__init__.py", line 58, in download File "c:\projects\svtplay-dl\lib\svtplay_dl\subtitle\init__.py", line 291, i n wrstsegment IndexError: list index out of range

C:>

Sopor commented 5 years ago

Yes, that is already reported #1038

OldSchool297 commented 5 years ago

Thank you, can anyone download subtitle from? https://www.tv4play.se/program/hem-till-g%C3%A5rden/11832356

OldSchool297 commented 5 years ago

Any other program that can download subtitle from Tv4? The program m3u8_dl can download but it can't work on my computer.