-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
mpv not able to play encrypted-mp4 (cenc-aes-ctr) #4579
Comments
Because you first need to read mpv manual to figure how to correctly set ffmpeg avoptions. |
Fair enough. I can understand the frustration with lazy users, but for us it's not quite as simple as for you developers (the whole AVOptions vs. AVFormatContext vs. ... was realized later). So while i'm thankful for the hint, you could have also add a one-liner to show me what to do. Nonetheless: Working (and maybe correct usage):
|
Actually this option exists: https://mpv.io/manual/master/#options-demuxer-lavf-cryptokey It's from ancient MPlayer times, and apparently it doesn't work. |
@wm4 might as well remove it, to prevent confusion. |
Thanks for the follow-up remarks! |
The first time I saw a user try to use this option, and apparently it didn't work. I'm not exactly sure why, but the code seems to be broken anyway. Apart from not doing any error checking (neither mallocs nor warning the user against invalid input), it forgets to add a 0 terminator. Use the corresponding AVOption instead, which probably works. See #4579.
Actually replaced it with different code. |
So what's this about multiple options? |
Actually I think only |
I can't follow your discussion, but the source of my usage of |
Oh, so it's a private mp4 option. Better to remove the mpv option then. |
Was at least somewhat broken, and is misleading. I don't really have an idea why FFmpeg as two AVOptions here anyway. We don't need to care, and I'm only aware of 1 user trying this option ever. See #4579.
And it's gone. |
Was at least somewhat broken, and is misleading. I don't really have an idea why FFmpeg has two AVOptions here anyway. We don't need to care, and I'm only aware of 1 user trying this option ever. See #4579.
How can I use multiple keys? |
Hi, new mpv-user here evaluating the player for some project of mine.
I'm having trouble playing encrypted-mp4 with mpv. Is there anything wrong (usage or misinterpretation of functionality) or is this a bug?
Example
Let's assume we got a sample-video:
SampleVideo_1280x720_1mb.mp4
(actual video does not matter).Play original
1:
ffplay SampleVideo_1280x720_1mb.mp4
-> OK
2:
mpv SampleVideo_1280x720_1mb.mp4
-> OK
Encrypt
Let's encrypt it using ffmpeg and cenc-aes-ctr:
3:
ffmpeg -i SampleVideo_1280x720_1mb.mp4 -vcodec copy -acodec copy -encryption_scheme cenc-aes-ctr -encryption_key 76a6c65c5ea762046bd749a2e632ccbb -encryption_kid a7e61c373e219033c21091fa607bf3b8 SampleVideo_1280x720_1mb_encrypted.mp4
Play encrypted:
4:
ffplay SampleVideo_1280x720_1mb_encrypted.mp4 -decryption_key 76a6c65c5ea762046bd749a2e632ccbb
-> OK
5: shinchiro build
mpv --demuxer-lavf-cryptokey=76a6c65c5ea762046bd749a2e632ccbb SampleVideo_1280x720_1mb_encrypted.mp4
mpv --demuxer-lavf-cryptokey=76A6C65C5EA762046BD749A2E632CCBB SampleVideo_1280x720_1mb_encrypted.mp4
(just to be sure)-> No -> looks it's beeing interpreted as unencrypted-stream or decryption is broken
-> tons of bitstream errors
6: lachs0r build
mpv --demuxer-lavf-cryptokey=76a6c65c5ea762046bd749a2e632ccbb SampleVideo_1280x720_1mb_encrypted.mp4
mpv --demuxer-lavf-cryptokey=76A6C65C5EA762046BD749A2E632CCBB SampleVideo_1280x720_1mb_encrypted.mp4
(just to be sure)-> No -> looks it's beeing interpreted as unencrypted-stream or decryption is broken
-> tons of bitstream errors
Version info
Everything tested on windows:
Edit:
mpv 0.25.0-7bfeb8b-amended (C) 2000-2017 mpv/MPlayer/mplayer2 projects built on Sun Jun 25 04:29:14 UTC 2017
installed through (non-Vapoursynth-PPA)Log-file
log @ gist
Remarks
Checking
ffplay --help
and searching for crypto-stuff, there are various entries and maybe this is the core of these problems.Entries:
I suppose my
ffplay
-command is using case 3, whilempv
is using case 1. As the command i used for mpv is the only one i can imagine (only crypto-related) it's the only thing i tried.I'm not that familiar with ffmpeg/ffplay (at this module-level), but i can imagine, that internally AVFormat and AVOptions are treated very differently.
The text was updated successfully, but these errors were encountered: