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

Decryption error #365

Closed
asermax opened this Issue Apr 27, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@asermax
Contributor

asermax commented Apr 27, 2014

I'm getting a bunch of decryption errors when watching crunchyroll streams lately; I'm not sure what is causing them, but they happen arbitrarily so I don't think it can be easily debugged:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/livestreamer-1.8.0-py2.7.egg/livestreamer/stream/segmented.py", line 114, in run
    self.write(segment)
  File "/usr/local/lib/python2.7/dist-packages/livestreamer-1.8.0-py2.7.egg/livestreamer/stream/hls.py", line 103, in write
    chunk = decryptor.decrypt(chunk)
  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py", line 295, in decrypt
    return self._cipher.decrypt(ciphertext)
ValueError: Input strings must be a multiple of 16 in length

Anyway, I was wondering if there's some way to get around this errors and ignore or retry the failed segment or something like that, without having to start the stream from scratch.

@chrippa

This comment has been minimized.

Show comment
Hide comment
@chrippa

chrippa Apr 27, 2014

Owner

This is very strange. Nothing is decrypted until the segment has been fully downloaded so partial segments should not be possible. I've pushed a workaround that in case we get a segment that is not correct size we cut it down to the nearest multiple of 16.

Owner

chrippa commented Apr 27, 2014

This is very strange. Nothing is decrypted until the segment has been fully downloaded so partial segments should not be possible. I've pushed a workaround that in case we get a segment that is not correct size we cut it down to the nearest multiple of 16.

@asermax

This comment has been minimized.

Show comment
Hide comment
@asermax

asermax Apr 27, 2014

Contributor

Alright, gonna test it out and get back at you, thanks for the quick response.

Contributor

asermax commented Apr 27, 2014

Alright, gonna test it out and get back at you, thanks for the quick response.

@asermax

This comment has been minimized.

Show comment
Hide comment
@asermax

asermax Apr 30, 2014

Contributor

So far it have been working alright, it seems to be handling the dangling bytes correctly.
The video glitches around the problematic segment but at least it doesn't stop and it isn't that noticeable. Thanks again!

Contributor

asermax commented Apr 30, 2014

So far it have been working alright, it seems to be handling the dangling bytes correctly.
The video glitches around the problematic segment but at least it doesn't stop and it isn't that noticeable. Thanks again!

@chrippa chrippa closed this May 5, 2014

javiercantero pushed a commit to javiercantero/livestreamer that referenced this issue Jan 7, 2017

Merge pull request #365 from beardypig/fix-picarto
Picarto update to support new site layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment