Code Monkey home page Code Monkey logo

pymp4decrypt's People

Contributors

truedread 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymp4decrypt's Issues

Decrypting audio does not work

Audio doesn't have explicit cipher/clear bytes, so the sample sizes are defined in the stsz box. The decrypter needs to be updated to make use of it.

Error (windows)

C:\Users\Suporte\Downloads\pymp4decrypt-master\src>python decrypt.py -k 4ce68c303ae037a59888d4866de39ffb -i C:\Users\Suporte\Downloads\pymp4decrypt-master\Blank.mp4 -o C:\Users\Suporte\Downloads\pymp4decrypt-master\Blank2.mp4
Traceback (most recent call last):
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 1089, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 1089, in
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pymp4-1.1.0-py3.7.egg\pymp4\parser.py", line 46, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 855, in _parse
AttributeError: 'bytes' object has no attribute 'items'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 2696, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 1093, in _parse
construct.core.RangeError: could not read prefix or enough elements, stream too short?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "decrypt.py", line 131, in
main()
File "decrypt.py", line 50, in main
decrypt(args.key, args.input, args.output)
File "decrypt.py", line 83, in decrypt
box = Box.parse_stream(reader)
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 186, in parse_stream
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pymp4-1.1.0-py3.7.egg\pymp4\parser.py", line 46, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 855, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 297, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 1544, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 859, in _parse
File "C:\Users\Suporte\AppData\Local\Programs\Python\Python37-32\lib\site-packages\construct-2.8.8-py3.7.egg\construct\core.py", line 2700, in _parse
construct.core.RangeError: could not read prefix or enough elements, stream too short?
parsing -> entries

Decrypting PIFF MP4s does not work

PIFF encrypted MP4s use UUIDs for box names instead of the normal type names (tenc, senc, pssh), so the decrypter would need to be updated to map each UUID to the box. Fortunately, pymp4 already supports parsing the PIFF boxes (at least on my fork).

Anything with an IV size greater than 8 would not work

"When a 16 byte Per_Sample_IV_Size is indicated and the least significant 8 bytes (64 bit counter) reaches the maximum value (0xFFFFFFFFFFFFFFFF), then incrementing it SHALL reset the 8 byte block counter to zero (bytes 8 to 15) without affecting the other 8 bytes of the counter (bytes 0 to 7)" (ISO/IEC 23001-7:2016).

The decrypter is assuming all IV sizes are set to 8 and is not reading the value for the actual IV size, so something with an IV size of 16 would fail.

Error (Linux)

suporte@SUP-13:~/pymp4decrypt/src$ python decrypt.py -k 4ce68c303ae037a59888d4866de39ffb -i ~/Blank\ -\ A\ Vinylmation\ Love\ Story-FitJ3hgxiAg.mp4 -o ~/Blank.mp4
Traceback (most recent call last):
File "decrypt.py", line 131, in
main()
File "decrypt.py", line 50, in main
decrypt(args.key, args.input, args.output)
File "decrypt.py", line 78, in decrypt
with BufferedReader(inp) as reader:
AttributeError: 'file' object has no attribute 'readable'

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.