-
Notifications
You must be signed in to change notification settings - Fork 263
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
AES-128 decryption in a separate worker #10
Comments
another optimization that should help playback on low-end platforms: c0284ea |
Hi, I've been working on this issue and have some results. I couldn't handle progressive downloading so I keep the segment and wait the download to be finished before move from side to side. I'm also facing a strange sync loss on the first bytes of the chunk (WARN:TS: lost sync between offsets:0/188) but it seems this doesn't affect user experience. @mangui , can you help on this? The commit is here and it's possible to see it working on http://bem.tv/flashls I'm planning to define a CONFIG::Worker to avoid size impacts on the current builds before I suggest a pull request. I'll make some Scout benchmarks also. |
great ! Decrypting with the incorrect IV causes the first block of plaintext to be corrupt but subsequent plaintext blocks will be correct. This is because a plaintext block can be recovered from two adjacent blocks of ciphertext. |
I could reproduce the sync loss with HEAD so I think isn't a problem with the worker. Can you try to reproduce also with http://dev.movingbits.nl/playlist/testing/encrypted/index.m3u8?player_id=Testing123456789&public=true source? |
indeed the sync loss issue is reproduced with flashls/master, but not with flashls/v0.1.1 |
Hi @flavioribeiro If an EXT-X-KEY tag with a KEYFORMAT of "identity" does not have the bad IV is affecting the decryption of the first 16 bytes. and the warning msg to be printed: now why these warning traces are appearing now and not in previous releases ? it is related to this commit 47d2efd: flashls now reuses demux instance when loading continuous segments of same level. as a consequence continuity counter issue at begining of TS fragment are now detected ;-) previously this was skipped by the probe() function. and why it has no impact on playback ? usually first TS packet is PAT. PAT is repeated multiple times in the fragment. once PAT is subsequently found, parsing restart @ beginning of TS fragment ... so nothing is lost. |
Awesome. Thank you for sharing all this information. Since #103 was opened, I'm curious about FlasCC and I will wait for the PR before continue on the refactory of AES.as as we talked few days ago. |
no issue, I will do some refactoring in AES.as and try to incorporate your changes |
use ENTER_FRAME event instead of standard timer to schedule chunk decryption. using this technique we can observe with Adobe Scout that the frame rendering time is within boundaries related to #10
hi @tecteun, do you have plans to integrate your tecteun/faest here? If not so, I can try to work on that. |
:) why workers? The lib is so fast, 60 mb/s on an older q6600 Intel. Single thread... —Reply to this email directly or view it on GitHub. |
@tecteun yeah, what I mean is if you're planning to integrate faest on flashls by yourself or you need some help on this. |
I think most of the work is already done, but I am also short on time, so if you can pick up some work, please do! —Reply to this email directly or view it on GitHub. |
Owww. I see, this is a different codebase... |
In my branch AES decryption isnt the bottleneck, instead it is the video PES/NAL parsing. So it makes more sense to implement PES/NAL parsing in FlasCC too. |
makes the decryption on a separate worker should decrease the CPU usage and improve the overall performance.
https://github.com/jcward/AS3-Worker-Compat
The text was updated successfully, but these errors were encountered: