Git Product home page Git Product logo

svtplay-dl's People

Contributors

antoneliasson avatar awabom avatar cromigon avatar cybjit avatar dalgr avatar dentarg avatar frals avatar granbom avatar gyran avatar haraldgustafsson avatar iwconfig avatar jacalz avatar kricka91 avatar leakim avatar mikljohansson avatar ml-1 avatar mrcarlberg avatar mutoso avatar olof avatar qnorsten avatar quite avatar radiant64 avatar selepo avatar sopor avatar spaam avatar svallebro avatar sveinhansen avatar toran4 avatar wanders avatar zozs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svtplay-dl's Issues

Cant't record from viaplay.no/se

Hi.
Trying to record from viaplay.no/se, but i only get following error:

"ERROR That site is not supported. Make a ticket or send a message"

Is there a particular reason why this site dosen't work?
(I have an valid account that i try to use when trying to record)

Sincear, Michael

"event not found" when trying to dl from kanal5play.se

I just found this nice software and it's working very good for most sites... however, i'm not having any luck with kanal5play.se.

I suspected that it was the strange exclamation, hash and pipe characters in the URL that messes things up, but it does not seam to help to URL encode those.

user@ubuntu:/svtplay-dl$ ./svtplay-dl "http://www.kanal5play.se/#!/play/program/32403306/video/37500086|/program/32403306"
bash: !/play/program/32403306/video/37500086: event not found
user@ubuntu:
/svtplay-dl$

Please advice!

Thanks,
Croaton

Twitch "past broadcast" support

The Twitch support seems to support downloading "highlights" (with /c/ in the URL), but not "past broadcasts" (with /b/ in the URL).

Why can't i use -A in Windows?

When i run "svtplay-dl -h" i can't see -A in the help text as i do in Linux and i only get "svtplay-dl: error: no such option: -A". Why can't i use -A in Windows?

Subtitles?

I'm confused... is it (still) possible to get the SVT1 & 2 subtitles (separate .srt file)? Are they part of the .ts files now?

-peter

ViaPlay, error downloading subtitles

Downloading:
python svtplay-dl -St http://www.tv10play.se/program/teknikkungen-stephen-fry/
355267
INFO: Outfile: teknikkungen-stephen-fry-avsnitt-5-tv10-play.flv
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO: audiocodecid 2.00
INFO: audiodatarate 96.16
INFO: canseektoend FALSE
INFO: creationdate Sat Jan 19 18:19:16 2013
INFO: duration 1417.99
INFO: framerate 25.00
INFO: height 408.00
INFO: lastkeyframetimestamp 1417960.00
INFO: lasttimestamp 1417960.00
INFO: metadatacreator On2 Flix SDK for Dshow_2.7.4.0
INFO: On2 Technologies
INFO: profile VP6-E
INFO: videocodecid 4.00
INFO: videodatarate 1640.12
INFO: width 720.00
134312.259 kB / 1417.96 sec (99.9%)
Download complete
Traceback (most recent call last):
File "c:\python33\lib\runpy.py", line 160, in run_module_as_main
"main", fname, loader, pkg_name)
File "c:\python33\lib\runpy.py", line 73, in run_code
exec(code, run_globals)
File "svtplay-dl__main
.py", line 12, in
File "svtplay-dl\svtplay_dl__init__.py", line 165, in main
File "svtplay-dl\svtplay_dl__init__.py", line 87, in get_media
File "svtplay-dl\svtplay_dl\service\viaplay.py", line 70, in get_subtitle
File "svtplay-dl\svtplay_dl\utils__init__.py", line 208, in subtitle_sami
TypeError: unorderable types: str() > int()

I get these errors with quite a few programs from viaplay (TV3 et. al.)

Grateful for any tips, thanks!

TypeError: expected string or buffer

These two works:
svtplay-dl http://www.svtplay.se/video/897727/del-8-merkel-faller
svtplay-dl http://www.svtplay.se/video/897760/del-10-du-ar-dum

This doesn't:
svtplay-dl http://www.svtplay.se/video/897750/del-9-clinton-ar-hjarntvattad
Traceback (most recent call last):
File "/usr/bin/svtplay-dl", line 5, in
pkg_resources.run_script('svtplay-dl==0.9.2013.10.28', 'svtplay-dl')
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1255, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.10.28-py2.7.egg/EGG-INFO/scripts/svtplay-dl", line 7, in
svtplay_dl.main()
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.10.28-py2.7.egg/svtplay_dl/init.py", line 137, in main
get_media(url, options)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.10.28-py2.7.egg/svtplay_dl/init.py", line 79, in get_media
stream.get(options, url)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.10.28-py2.7.egg/svtplay_dl/service/svtplay.py", line 91, in get
download_hds(options, manifest)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.10.28-py2.7.egg/svtplay_dl/fetcher/hds.py", line 48, in download_hds
extension = re.search(r"(.[a-z0-9]+)$", options.output)
File "/usr/lib64/python2.7/re.py", line 142, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer

Design proposal: Let get_media() map URLs to site classes using a dictionary instead of calling handle() methods

See my branch urlparsing. I reason that it is get_media()'s responsibility to use the right module for download. It should not have to instantiate all of them and poke them one after the other to see which one might be able handle the url.

This solution uses a dictionary with the site's hostname as key and the handling class as value. It's basically a glorified switch-case construct. A simple example of this technique: http://bytebaker.com/2008/11/03/switch-case-statement-in-python/

Advantages:

  • No class functions (or methods that work like class functions: handle())
  • Only one place to look to see which class handles a given URL.
  • No ugly comparison against None -- just catch KeyError.
  • Slightly less code.
  • Dictionary lookups are done in constant time. Looping through a list takes linear time plus the time (and RAM) to instantiate all classes.

Kanal5.se - can't download subtitles

When i was trying to download subtitles from kanal5.se i only got an empty file and an error message:
INFO: Subtitle: avsnitt7.srt
Traceback (most recent call last):
File "/usr/local/bin/svtplay-dl", line 5, in
pkg_resources.run_script('svtplay-dl==0.9.2014.02.15', 'svtplay-dl')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 505, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1245, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/svtplay_dl-0.9.2014.02.15-py2.7.egg/EGG-INFO/scripts/svtplay-dl", line 7, in
svtplay_dl.main()
File "/usr/local/lib/python2.7/dist-packages/svtplay_dl-0.9.2014.02.15-py2.7.egg/svtplay_dl/init.py", line 189, in main
get_media(url, options)
File "/usr/local/lib/python2.7/dist-packages/svtplay_dl-0.9.2014.02.15-py2.7.egg/svtplay_dl/init.py", line 84, in get_media
get_one_media(stream, options)
File "/usr/local/lib/python2.7/dist-packages/svtplay_dl-0.9.2014.02.15-py2.7.egg/svtplay_dl/init.py", line 108, in get_one_media
stream.get_subtitle(options)
File "/usr/local/lib/python2.7/dist-packages/svtplay_dl-0.9.2014.02.15-py2.7.egg/svtplay_dl/service/kanal5.py", line 92, in get_subtitle
subtitle_json(options, data)
File "/usr/local/lib/python2.7/dist-packages/svtplay_dl-0.9.2014.02.15-py2.7.egg/svtplay_dl/utils/init.py", line 192, in subtitle_json
fd.write(subs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2015' in position 44: ordinal not in range(128)

When i used another program to download subtitles with (that program is not working anymore) it was a smi file and not a srt file but that was easy to fix with Subtitle Edit.
I know the episode have subtitle: http://www.kanal5play.se/play/program/322002/video/494695794

kanal5: only supports /video/ URLs

Most, if not all, media on kanal5play.se and kanal9play.se now use a /program/ URL scheme. These are stopped on a regexp on the top of kanal5.py's get() method. Fixing the regexp isn't enough though.

Thanks to @avtobiff for reporting this!

KeyError exception thrown by subtitle_tt

Cristian Ionescu-Idbohrn reported an issue with downloading subtitles
for urplay, where subtitle_tt throws a KeyError exception.

$ svtplay-dl -H -S http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen
INFO Outfile: mitt-sardinien-middagen-ur-play.ts
[37/38][================================================..] ETA: 0:00:00
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/bin/svtplay-dl/__main__.py", line 12, in <module>
  File "/usr/bin/svtplay-dl/svtplay_dl/__init__.py", line 137, in main

  File "/usr/bin/svtplay-dl/svtplay_dl/__init__.py", line 79, in get_media

  File "/usr/bin/svtplay-dl/svtplay_dl/service/urplay.py", line 37, in get
  File "/usr/bin/svtplay-dl/svtplay_dl/utils/__init__.py", line 129, in subtitle_tt

KeyError: 'dur'

Crash when trying to use some svtplay pages.

Trying to download I get:
svtplay-dl http://www.svtplay.se/video/1196701/del-3
Traceback (most recent call last):
File "/usr/bin/svtplay-dl", line 5, in
pkg_resources.run_script('svtplay-dl==0.9.2013.04.22', 'svtplay-dl')
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1239, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.04.22-py2.7.egg/EGG-INFO/scripts/svtplay-dl", line 7, in
svtplay_dl.main()
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.04.22-py2.7.egg/svtplay_dl/init.py", line 133, in main
get_media(url, options)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.04.22-py2.7.egg/svtplay_dl/init.py", line 78, in get_media
stream.get(options, url)
File "/usr/lib/python2.7/site-packages/svtplay_dl-0.9.2013.04.22-py2.7.egg/svtplay_dl/service/svtplay.py", line 53, in get
elif not options.hls and i["playerType"] == "flash":
KeyError: 'playerType'

Starting the debugger at line 49 and displaying data:

 45                 options.live = False
 46             streams = {}
 47             streams2 = {} #hack..
 48             import pdb; pdb.set_trace()
 49  ->         for i in data["video"]["videoReferences"]:
 50                 if options.hls and i["playerType"] == "ios":
 51                     stream = {}
 52                     stream["url"] = i["url"]
 53                     streams[int(i["bitrate"])] = stream
 54                 elif not options.hls and i["playerType"] == "flash":
(Pdb) data
{u'statistics': {u'category': u'film-och-drama', u'mmsCategory': u'1', u'broadcastTime': u'2200', 
u'title': u'del-3', 
u'statisticsUrl': u'http://ld.svt.se/svt/svt/s?svt-play.film-och-drama.the-hour.hela-program.del-3', 
u'programId': u'000000', u'client': u'svt-play', u'context': u'popout', u'broadcastDate': 
u'20130505', u'mmsClientNr': u'1001001', u'folderStructure': u'the-hour.hela-program'}, 
u'video': {u'videoReferences': 
[{u'url': u'http://svtplay9f-f.akamaihd.net/z/se/open/20130505/1325333-003A/HOUR-003A-473a5713a9b07ca1_,900,348,564,1680,2800,.mp4.csmil/manifest.f4m', 
u'bitrate': 0}, {u'url': u'http://svtplay9f-f.akamaihd.net/i/se/open/20130505/1325333-003A/HOUR-003A-473a5713a9b07ca1_,900,348,564,1680,2800,.mp4.csmil/master.m3u8', 
u'bitrate': 0}], u'subtitleReferences': [{u'url': u''}], u'live': False, u'materialLength': 3442, 
u'availableOnMobile': True, u'position': 0}, u'videoId': 1196701, u'context': {u'popoutUrl': 
u'/video/1196701/del-3?type=embed', u'title': u'Del 3'}}

I. e., it seems that the expected 'playerType' item isn't there? Or did stupid me just get this wrong?
$ git rev-parse HEAD
0636868

qbrick/svd: ajax request ends up in a 0 byte response

@avtobiff reported that svtplay-dl is unable to fetch at least some videos on Svenska Dagbladet.

$ ./svtplay-dl -v http://www.svd.se/kultur/amster-moter-veronica-maggio_8954474.svd
[1394377572.831] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP getting 'http://www.svd.se/kultur/amster-moter-veronica-maggio_8954474.svd'
[1394377573.052] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP got 111188 bytes from 'http://www.svd.se/kultur/amster-moter-veronica-maggio_8954474.svd' in 0.22s (= 4010334bps)
[1394377573.053] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP getting 'http://www.svd.se/?service=ajax&type=webTvClip&articleId=8954474'
[1394377573.154] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP got 0 bytes from 'http://www.svd.se/?service=ajax&type=webTvClip&articleId=8954474' in 0.10s (= 0bps)
[1394377573.155] ./svtplay-dl/svtplay_dl/service/qbrick.py/get: ERROR Can't find video file

Looking at the debug log, looks like the ajax request is broken for some reason.

Some urplay videos break

Some urplay videos break; some assumptions about the JSON seems to be incorrect or something.

svtplay-dl.git:(master):.$ ./svtplay-dl --verbose http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen
[1391359800.865] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP getting 'http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen'
[1391359801.386] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP got 32942 bytes from 'http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen' in 0.52s (= 505960bps)
[1391359801.388] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP getting 'http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen'
[1391359801.550] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP got 32942 bytes from 'http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen' in 0.16s (= 1633866bps)
[1391359801.551] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP getting 'http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen'
[1391359801.643] ./svtplay-dl/svtplay_dl/utils/__init__.py/get_http_data: DEBUG HTTP got 32942 bytes from 'http://urplay.se/Produkter/174681-Mitt-Sardinien-Middagen' in 0.09s (= 2848143bps)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./svtplay-dl/__main__.py", line 12, in <module>
  File "./svtplay-dl/svtplay_dl/__init__.py", line 154, in main
  File "./svtplay-dl/svtplay_dl/__init__.py", line 75, in get_media
  File "./svtplay-dl/svtplay_dl/service/urplay.py", line 36, in get
IndexError: string index out of range

Other videos work, e.g. http://urplay.se/Produkter/177175-Varlden-Drommar-och-drama-i-Georgien.

download_hds dont work with python3

$ svtplay-dl http://www.svtplay.se/video/965720/16-1-19-30-textat
INFO Outfile: rapport-161-1930-textat-svt-play.flv
Traceback (most recent call last):
  File "/home/anton/bin/svtplay-dl", line 12, in <module>
    svtplay_dl.main()
  File "/home/anton/src/svtplay-dl/svtplay_dl.py", line 1170, in main
    get_media(url, options)
  File "/home/anton/src/svtplay-dl/svtplay_dl.py", line 1128, in get_media
    stream.get(options, url)
  File "/home/anton/src/svtplay-dl/svtplay_dl.py", line 1010, in get
    download_hds(options, manifest, swf)
  File "/home/anton/src/svtplay-dl/svtplay_dl.py", line 370, in download_hds
    total = antal[1]["total"]
UnboundLocalError: local variable 'antal' referenced before assignment

Also broken: http://www.svtplay.se/video/965621/16-1-19-15, http://www.svtplay.se/video/950678/del-1-av-6-skara

HLS seems to work for all of them.

Licens?

Hej! Trevligt skript. Frågan är bara om jag kan använda det... Har du tänkt licensiera det med någon känd FOSS licens som MIT eller GPL?

tv3play.lt broken?

@avtobiff reported an issue with TV3Play.lt. RTMPDump is executed, but is unable
to actually fetch anything and just leaves a 0 byte file around. For instance:
http://www.tv3play.lt/programos/pishiaus-anekdotai/363655?autostart=true

$ ./svtplay-dl http://www.tv3play.lt/programos/pishiaus-anekdotai/363655?autostart=true
INFO: Outfile: pishiaus-anekdotai-pishiaus-anekdotas-vyrai-medzioja-antis-tv3-play.flv
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
ERROR: rtmp server sent error
ERROR: rtmp server requested close
INFO: no thumb requested

The same is true for any of the arbitrarily chosen videos i tried on tv3play.lt.

Adding -V to rtmpdump reveals the following:

DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING: error>
DEBUG: Property: <Name:               code, STRING: NetConnection.Connect.Rejected>
DEBUG: Property: <Name:        description, STRING: Connection failed: Application folder ([install-location]/applications/mcache) is missing.>
DEBUG: Property: <Name:           clientid, NUMBER: 1217041628.00>

Vimeo support is broken

[5.0.2]{1}anton@riven:~/src/svtplay-dl> svtplay-dl http://vimeo.com/13927597        
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/anton/src/svtplay-dl/svtplay-dl/__main__.py", line 12, in <module>
  File "/home/anton/src/svtplay-dl/svtplay-dl/svtplay_dl/__init__.py", line 137, in main
  File "/home/anton/src/svtplay-dl/svtplay-dl/svtplay_dl/__init__.py", line 79, in get_media
  File "/home/anton/src/svtplay-dl/svtplay-dl/svtplay_dl/service/vimeo.py", line 18, in get
IndexError: list index out of range

I believe that the JSON containing the actual stream URL's was previously inlined in the HTML but is now moved to a separate file described by the data-config-url attribute in a div element. Patch to follow.

Something wrong with URL?

Maybe svt has updated their URLs.

./svtplay-dl http://www.svtplay.se/video/599430/del-2-av-6
ERROR Something wrong with that url
ERROR Error code: 503

Getting HTTP Error 403: Forbidden with svtplay.se

I guess SVT has changed something again:

python svtplay-dl http://www.svtplay.se/video/295496/del-4-av-5
Traceback (most recent call last):
File "svtplay-dl", line 825, in
main()
File "svtplay-dl", line 821, in main
svtplay.get(url)
File "svtplay-dl", line 534, in get
download_http(test["url"], self.output)
File "svtplay-dl", line 79, in download_http
response = urlopen(url)
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.6/urllib2.py", line 435, in error
return self._call_chain(_args)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(_args)
File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden

Version:

python svtplay-dl --version
0.7.2012.08.29

Can't download from tv4play.se

$ svtplay-dl http://www.tv4play.se/program/allt-faller\?video_id\=2263028
INFO Outfile: allt-faller-del-6-tv4-playmp4
RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
WARNING: HandShake: Server not genuine Adobe!
ERROR: RTMP_Connect1, handshake failed.

$ svtplay-dl --version                                                   
0.8.2013.01.18

urplay and xml subtitles

Subtitle saving for urplay doesn't work; subtitle_tt(). It should not wipe data and must do:

tree = ET.ElementTree(ET.fromstring(data))

I started fixing it, but then ran into the fact that the parser doesn't handle for example <span tts:fontStyle="italic"> inside the <p> (and combined with <br />'s), so I was a bit overwhelmed...

Audio glitch in downloaded video (hds; svtplay, tv4play)

There is a problem with HDS download from svtplay (and tv4play as well, it seems). The videos I get have an audio glitch every 6 seconds. Typically at 00:05, 00:11, 00:17. Mplayer does play the whole video, but the audio noise/interruption is very noticeable and rather disturbing. VLC player actually stops playing any sound at all after the first occurence of a glitch. In Totem media player I don't hear any glitch.

If I use --hls, and get the .ts file, there is no glitch. At least for the reference video below, I didn't try others. Also, choosing a different quality doesn't seem to matter.

Reference: http://www.svtplay.se/klipp/1121175/brasilienkott0730

My system is an updated Arch Linux, so software is the latest, potentially bleeding.

Can we somehow verify the downloaded flv? Is it a matter of decoder? Codec? AAC is the choice of these sites.

I tried with mplayer -afm ffmpeg and -afm faad. No difference. Actually, with mplayer -novideo, it quits at the first glitch, 00:05, and exits with code 0. With -msglevel all=9, I see:

demux_lavf_fill_buffer()
ds_fill_buffer: EOF reached (stream: audio)  
A:   5.7 (05.6) of 79.9 (01:19.9)  0.6% 
ds_fill_buffer: EOF reached (stream: audio)  
A:   5.7 (05.7) of 79.9 (01:19.9)  0.6% 
EOF code: 1

Well...

Subtitle.

urplay and svtplay have support for subtitles.

When i break with ctrl+c it shows a long error message

When i break a download with ctrl+c i got a long error message. Why not only show a simple message that it been stopped by the user? I can see some message at the end, KeyboardInterupt:

File "c:\Python\lib\runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "c:\Python\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "svtplay-dl__main
.py", line 12, in
File "svtplay-dl\svtplay_dl__init__.py", line 165, in main
File "svtplay-dl\svtplay_dl__init__.py", line 78, in get_media
File "svtplay-dl\svtplay_dl\service\tv4play.py", line 87, in get
File "svtplay-dl\svtplay_dl\fetcher\hds.py", line 99, in download_hds
File "svtplay-dl\svtplay_dl\utils__init__.py", line 67, in get_http_data
File "c:\Python\lib\urllib2.py", line 404, in open
response = self._open(req, data)
File "c:\Python\lib\urllib2.py", line 422, in _open
'_open', req)
File "c:\Python\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "c:\Python\lib\urllib2.py", line 1214, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "c:\Python\lib\urllib2.py", line 1187, in do_open
r = h.getresponse(buffering=True)
File "c:\Python\lib\httplib.py", line 1045, in getresponse
response.begin()
File "c:\Python\lib\httplib.py", line 409, in begin
version, status, reason = self._read_status()
File "c:\Python\lib\httplib.py", line 365, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "c:\Python\lib\socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt

Accented characters disappearing

Just trying the 0.9.2014.01.03.5 HomeBrew version on my iMac, and I noticed the Swedish öäå disappear:

svtplay-dl -S http://www.svtplay.se/video/1719825/del-7-av-10
INFO Outfile: kta-mnniskor-del-7-av-10-svt-play.flv

-peter

KeyError/No Streams

Trying the latest git version:

http://www.svtplay.se/video/1514251/del-2-av-12
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./svtplay-dl/__main__.py", line 12, in <module>
  File "./svtplay-dl/svtplay_dl/__init__.py", line 136, in main

  File "./svtplay-dl/svtplay_dl/__init__.py", line 78, in get_media

  File "./svtplay-dl/svtplay_dl/service/svtplay.py", line 63, in get
KeyError: 0

Without the -H option I get "ERROR Can't find any streams."

(debian 3.2.0-4-486 #1 Debian 3.2.46-1+deb7u1 i686 GNU/Linux)

Subtitles tv4play

Hi,

Got the following error, on Debian:
svtplay-dl --hls -S http://www.tv4play.se/program/dicte?video_id=2314097

Traceback (most recent call last):
  File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/home/pberck/svtplay-dl/svtplay-dl/__main__.py", line 12, in <module>
  File "/home/pberck/svtplay-dl/svtplay-dl/svtplay_dl/__init__.py", line 126, in main
  File "/home/pberck/svtplay-dl/svtplay-dl/svtplay_dl/__init__.py", line 77, in get_media
  File "/home/pberck/svtplay-dl/svtplay-dl/svtplay_dl/service/tv4play.py", line 86, in get
NameError: global name 'subtitle_smi' is not defined

latest github version (0.9.2013.03.23). The video itself downloads fine, this comes after the video is ready.

On my mac with version 0.9.2013.02.22 it works fine.

-peter

Live?

Is there a way to get this working with the live "broadcasts" from svt? ( I mean http://www.svtplay.se/kanaler/svt1). I tried with and w/o the --live option, but to no avail....

(It's probably silly because most of it will be downloadable later, but I still wonder :-) )

-peter

Download from tv4play.

When I tried to download from TV4 play I got an error. After adding a print right before calling rtmpdump I got these parameters.
It works when I tired a clip and not an entire program. Is this a bug?

$ python svtplay-dl "http://www.tv4play.se/film_och_serier/solsidan?title=solsidan_del_6&videoid=1222589"
['rtmpdump', '-r', 'http://tv4playhds-f.akamaihd.net/z/mp4root{path}/{filename}.csmil/manifest.f4m', '-o', u'solsidan-solsidan-del-6-tv4-play.f4m', '-W', 'http://www.tv4play.se/flash/tv4playflashlets.swf', '-y', 'http://tv4playhds-f.akamaihd.net/z/mp4root/2012-07-06/pid2878830(1222589_,T3MP43,T3MP48,T3MP415,T3MP425,).mp4.csmil/manifest.f4m']
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: Unknown protocol!

$ python svtplay-dl "http://www.tv4play.se/film_och_serier/solsidan?title=bloopers_fran_solsidan_sasong_3&videoid=2205376"
['rtmpdump', '-r', 'rtmpe://cp70051.edgefcs.net/tv4ondemand', '-o', u'solsidan-bloopers-frn-solsidan-ssong-3-tv4-play.mp4', '-W', 'http://www.tv4play.se/flash/tv4playflashlets.swf', '-y', 'mp4:/mp4root/2012-07-15/20120715T155811_BloopersfrnSolsidanssong3_2205376_T6MP48_.mp4']

Cannot download www.svtplay.se/video/265580

svtplay-dl --version
0.7.2012.08.29

svtplay-dl http://www.svtplay.se/video/265580

Traceback (most recent call last):
File "/home/andfo/bin/svtplay-dl", line 825, in
main()
File "/home/andfo/bin/svtplay-dl", line 821, in main
svtplay.get(url)
File "/home/andfo/bin/svtplay-dl", line 534, in get
download_http(test["url"], self.output)
File "/home/andfo/bin/svtplay-dl", line 79, in download_http
response = urlopen(url)
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.6/urllib2.py", line 435, in error
return self._call_chain(_args)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(_args)
File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.