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

Decryption error #365

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

Decryption error #365

asermax opened this issue Apr 27, 2014 · 3 comments

Comments

@asermax
Copy link
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
Copy link
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
Copy link
Contributor Author

asermax commented Apr 27, 2014

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

@asermax
Copy link
Contributor Author

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 as completed May 5, 2014
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

No branches or pull requests

2 participants