Create encrypted avc3 clearkey testcase
Categories
(Core :: Audio/Video: Playback, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: bryce, Assigned: bryce)
References
Details
(Whiteboard: [media-tests])
Attachments
(5 files)
We could use a testcase to cover bug 1560092. I've got some of the test media from that case that should be suitable.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
This has been a little more involved than I initially expected. Providing details here for posterity.
- I'm adapting media from this test https://live.unified-streaming.com/firefoxbug/test.html for our tests.
- That media doesn't have clearkey info in the pssh box, it only has widevine info. For our test harness we currently need the clearkey info to come via pssh, rather than by another channel (such as keyids, which is how the test page appears to pass them in using shaka-player).
- So I've manually built the required pssh box based on the keyid:key paring 10000000100010001000100000000001:3A2A1B68DD2BD9B2EEB25E84C4776668 (only the id goes in the box).
- I've saved the pssh box binary data to a file
newpssh
and used Bento4's mp4edit to replace the pssh in the test filemp4edit.exe --replace moov/pssh:newpssh big-buck-bunny-cenc-avc3-init.mp4.orig big-buck-bunny-cenc-avc3-init.mp4.rewritten-pssh
The new pssh is created as follows:
00 00 00 34 <- Box length
70 73 73 68 <- "pssh"
01 <- Version
00 00 00 <- Flags
10 77 EF EC C0 B2 4D 02 AC E3 3C 1E 52 E2 FB 4B <- clearkey id
00 00 00 01 <- #keyids
10 00 00 00 10 00 10 00 10 00 10 00 00 00 00 01 <- keyid
00 00 00 00 <- Length of further data (0)
I'll attach the files involved here for reference.
Assignee | ||
Comment 2•4 years ago
|
||
Original init segment from the test stream
Assignee | ||
Comment 3•4 years ago
|
||
Rewritten init segment
Assignee | ||
Comment 4•4 years ago
|
||
Lovingly hand crafted pssh box for clearkey data
Assignee | ||
Comment 5•4 years ago
|
||
First media segment for test stream
Assignee | ||
Comment 6•4 years ago
|
||
Assignee | ||
Comment 7•4 years ago
|
||
Assignee | ||
Comment 8•4 years ago
•
|
||
Something I've found while testing this is that most tests in our test suite don't fail on this as I'd expect if I partially revert the changes in bug 1617929 (specifically if I revert the last patch). If I do that, the MediaChangeMonitor will fail to find an SPS, and will never create a decoder. However, this results in the monitor eating those frames, so the tests skip over them because of this code. This results in many tests still passing, as at the video element level it looks like the stream has played -- current time, duration, and played ranges all point to a stream being played correctly.
The one saving grace is that the waiting for key test fails if we don't create a decoder. I believe this is because without an EME decoder we never correctly identify that we're waiting on a key to decode, so we timeout.
It may make sense to follow this up at some stage with a gtest that more specifically targets our ability to extract extra data from avc3 samples.
Pushed by bvandyk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f47699bd7815 Add avc3 clearkey test. r=alwu,dminor
Comment 10•4 years ago
|
||
bugherder |
Description
•