shaka-project / shaka-streamer

A simple config-file based approach to preparing streaming media, based on FFmpeg and Shaka Packager.
https://shaka-project.github.io/shaka-streamer/
Apache License 2.0
199 stars 62 forks source link

Shaka Streamer Binaries #87

Closed mariocynicys closed 3 years ago

mariocynicys commented 3 years ago

Steps to build:

joeyparrish commented 3 years ago

Just back from vacation. Will try to take another pass at review today if at all possible.

joeyparrish commented 3 years ago

BTW, I really like the latest changes. Much cleaner!

joeyparrish commented 3 years ago

I spent some time playing around with the code, and I think I understand it now. I may add a few comments later.

So as soon as you can resolve conflicts with this PR, I am ready to merge it. Thank you for your hard work on this! It's really exciting to see it landing.

mariocynicys commented 3 years ago

@joeyparrish While testing with --test-hermetics enabled, the drmTests for DASH and HLS fails.

+ /home/omar/.local/lib/python3.8/site-packages/streamer_binaries/packager-linux-x64 'in=/tmp/shaka-live-05_j15_r/5953b968-e71f-47fd-ba32-a663cc91e2b8,stream=video,init_segment=output_files/video_144p_108k_h264_init.mp4,segment_template=output_files/video_144p_108k_h264_$Number$.mp4' --quiet --segment_duration 4 --generate_static_live_mpd --mpd_output output_files/dash.mpd --hls_playlist_type VOD --hls_master_playlist_output output_files/hls.m3u8 --enable_widevine_encryption --key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test --content_id EC71357493E0C07F58469229C8E31B38 --signer widevine_test --aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9 --aes_signing_iv d58ce954203b7c9a9a9d467f59839249 --protection_scheme cenc --clear_lead 0
[0904/092728:ERROR:proto_json_util.cc(34)] Failed to parse from JSON:  error: Unexpected end of string. Expected a value.

^
[0904/092728:ERROR:widevine_key_source.cc(409)] Failed to convert JSON to proto: 
[0904/092728:ERROR:packager_util.cc(80)] Widevine encryption key source failed to fetch keys: 13 (SERVER_ERROR): Failed to extract encryption key from ''.
Chrome 92.0.4515 (Linux 0.0.0) Shaka Streamer has widevine encryption enabled (hls) FAILED
        Error
            at <Jasmine>
            at UserContext.<anonymous> (tests.js:544:49)
        shaka.util.Error {
          "severity": 2,
          "category": 1,
          "code": 1001,
          "data": [
            "http://localhost:5000/output_files/hls.m3u8",
            500,
            "Some processes exited with non-zero exit codes",
            {
              "content-length": "46",
              "content-type": "text/html; charset=utf-8, text/plain"
            },
            0
          ],
          "handled": false
        } thrown
        Error: Failed to close Shaka Streamer
            at stopStreamer (tests.js:57:11)
            at async UserContext.<anonymous> (tests.js:80:5)

and

+ /home/omar/.local/lib/python3.8/site-packages/streamer_binaries/packager-linux-x64 'in=/tmp/shaka-live-0xyurn9g/568c9820-33ed-4afd-a1c6-a998b03e169d,stream=video,init_segment=output_files/video_144p_108k_h264_init.mp4,segment_template=output_files/video_144p_108k_h264_$Number$.mp4' --quiet --segment_duration 4 --generate_static_live_mpd --mpd_output output_files/dash.mpd --hls_playlist_type VOD --hls_master_playlist_output output_files/hls.m3u8 --enable_widevine_encryption --key_server_url https://license.uat.widevine.com/cenc/getcontentkey/widevine_test --content_id EC71357493E0C07F58469229C8E31B38 --signer widevine_test --aes_signing_key 1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9 --aes_signing_iv d58ce954203b7c9a9a9d467f59839249 --protection_scheme cenc --clear_lead 0
[0904/092732:ERROR:proto_json_util.cc(34)] Failed to parse from JSON:  error: Unexpected end of string. Expected a value.

^
[0904/092732:ERROR:widevine_key_source.cc(409)] Failed to convert JSON to proto: 
[0904/092732:ERROR:packager_util.cc(80)] Widevine encryption key source failed to fetch keys: 13 (SERVER_ERROR): Failed to extract encryption key from ''.
Chrome 92.0.4515 (Linux 0.0.0) Shaka Streamer has widevine encryption enabled (dash) FAILED
        Error
            at <Jasmine>
            at UserContext.<anonymous> (tests.js:544:49)
        shaka.util.Error {
          "severity": 2,
          "category": 1,
          "code": 1001,
          "data": [
            "http://localhost:5000/output_files/dash.mpd",
            500,
            "Some processes exited with non-zero exit codes",
            {
              "content-length": "46",
              "content-type": "text/html; charset=utf-8, text/plain"
            },
            0
          ],
          "handled": false
        } thrown
        Error: Failed to close Shaka Streamer
            at stopStreamer (tests.js:57:11)
            at async UserContext.<anonymous> (tests.js:80:5)

I think it's a packager issue in the new static-build, it passes these tests with the old binaries i have in PATH.

mariocynicys commented 3 years ago

@joeyparrish Please don't merge this yet.

joeyparrish commented 3 years ago

I think it's a packager issue in the new static-build, it passes these tests with the old binaries i have in PATH.

I found the issue (in Packager) and have a fix in review. This will be followed by the official v2.6 release of Packager.

Thanks for catching this!

mariocynicys commented 3 years ago

@joeyparrish I think it'a all fine now. I have no more updates. Thanks.