{"id":37019737,"url":"https://github.com/nopol10/alpha-movie","last_synced_at":"2026-01-14T02:12:21.592Z","repository":{"id":52089776,"uuid":"365219692","full_name":"nopol10/alpha-movie","owner":"nopol10","description":"Android video player with alpha channel (chroma key \u0026 alpha-packing) support. Plays alpha-packed webm videos","archived":false,"fork":true,"pushed_at":"2021-05-31T11:01:10.000Z","size":8141,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-09T09:45:47.965Z","etag":null,"topics":["alpha","alpha-packing","android","native","shader","transparent","video","video-player","webm"],"latest_commit_sha":null,"homepage":"https://github.com/nopol10/alpha-movie","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"pavelsiamak/alpha-movie","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nopol10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-07T12:02:07.000Z","updated_at":"2024-01-18T02:12:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nopol10/alpha-movie","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nopol10/alpha-movie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopol10%2Falpha-movie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopol10%2Falpha-movie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopol10%2Falpha-movie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopol10%2Falpha-movie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nopol10","download_url":"https://codeload.github.com/nopol10/alpha-movie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopol10%2Falpha-movie/sbom","scorecard":{"id":694077,"data":{"date":"2025-08-11","repo":{"name":"github.com/nopol10/alpha-movie","commit":"528f2b1d40aef114ed2271c00f82e5e1b63ee520"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T03:08:36.857Z","repository_id":52089776,"created_at":"2025-08-22T03:08:36.857Z","updated_at":"2025-08-22T03:08:36.857Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpha","alpha-packing","android","native","shader","transparent","video","video-player","webm"],"created_at":"2026-01-14T02:12:20.998Z","updated_at":"2026-01-14T02:12:21.577Z","avatar_url":"https://github.com/nopol10.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Alpha Movie\n\nAlpha Movie is an Android video player library with alpha channel support.\n\nVideo Player uses `OpenGL` to render video and apply a *shader* that makes alpha compositing possible. The player encapsulates `MediaPlayer` and has its base functionality. Video stream is displayed by `TextureView`.\n\nThis fork comes with the added feature of being able to display \"alpha-packed\" videos such as the one shown below.\n![image](https://user-images.githubusercontent.com/314281/117477004-0b9e3080-af90-11eb-8f2e-a69ecb1353e9.png)\n\nWith this, you can convert webm videos with transparency into \"alpha-packed\" mp4 videos in order to use them in your Android app. Refer [here](#alpha-packed-videos) for more details.\n(Footballer demo video taken from [https://simpl.info/videoalpha/](https://simpl.info/videoalpha/))\n\n---\n\n## Gradle Dependency\n\n[ ![jCenter](https://api.bintray.com/packages/pavelsemak/alpha-movie/alpha-movie/images/download.svg) ](https://bintray.com/pavelsemak/alpha-movie/alpha-movie/_latestVersion)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\nThe easiest way to start using Alpha Movie is to add it as a *Gradle Dependency*. The Gradle dependency is available via [jCenter](https://bintray.com/pavelsemak/alpha-movie/alpha-movie/view). Please make sure that you have the jcenter repository included in the project's `build.gradle` file (*jCenter* is the default Maven repository used by Android Studio):\n\n```gradle\nrepositories {\n    mavenCentral()\n}\n```\n\nThen add this dependency to your module's `build.gradle` file:\n\n```gradle\ndependencies {\n    // ... other dependencies\n    implementation 'io.github.nopol10:alpha-movie:1.3.7'\n}\n```\n\n## Getting Started\n\nAdd `AlphaMovieView` into you activity layout:\n\n```xml\n\u003ccom.alphamovie.lib.AlphaMovieView\n    android:id=\"@+id/video_player\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"/\u003e\n```\n\nNext you need to initialize the player. In your `Activity` class add:\n\n```java\npublic class MainActivity extends AppCompatActivity {\n\n    private AlphaMovieView alphaMovieView;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        alphaMovieView = (AlphaMovieView) findViewById(R.id.video_player);\n        alphaMovieView.setVideoFromAssets(\"video.mp4\");\n    }\n\n    @Override\n    public void onResume() {\n        super.onResume();\n        alphaMovieView.onResume();\n    }\n\n    @Override\n    public void onPause() {\n        super.onPause();\n        alphaMovieView.onPause();\n    }\n}\n```\n\nIn this code snippet we load video from *assets* specifying filename `video.mp4`:\n\n```java\nalphaMovieView.setVideoFromAssets(\"video.mp4\");\n```\n\nVideo can also be set by *Url, FileDescriptor, MediaSource* and other sources.\n\nYou need to add `alphaMovieView.onPause()` and `alphaMovieView.onResume()` in activity's `onPause()` and `onResume()` callbacks. Calling these methods will pause and resume `OpenGL` rendering thread.\n\nVideo playback can be paused and resumed using `alphaMovieView.pause()` and `alphaMovieView.start()` methods.\n\n## Alpha Packed Videos\n\nwebm videos containing alpha data can be converted into an \"alpha packed\" video that contains the color frames on the left, and alpha frames on the right of the video.\nThis results in a video that can now be processed by the alpha packed video shader bundled in this package.\n\nTo generate and play such a video from an existing transparent webm video, do the following:\n\n1. Download [ffmpeg](https://ffmpeg.org/download.html). The most recent version is recommended but anything after 20th July 2016 should work.\n1. Run `ffmpeg -vcodec libvpx -i input_video.webm -vf \"split [a], pad=iw*2:ih [b], [a] alphaextract, [b] overlay=w\" -x264opts keyint=30 -y output_video.mp4`\n    This will generate the `output_video.mp4` file in the directory containing `input_video.webm`\n1. Put `output_video.mp4` in your assets and follow the steps above to load the video into the AlphaMovieView.\n1. Change the xml to the following\n```xml\n\u003ccom.alphamovie.lib.AlphaMovieView\n    android:id=\"@+id/video_player\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    custom:packed=\"true\"\n/\u003e\n```\n\nThe result will look like the following. You can view this in the example app in this project.\n![image](https://user-images.githubusercontent.com/314281/117478937-57ea7000-af92-11eb-9ade-757eb1bda991.png)\n\n---\n\n## How it works?\n\nAlpha Movie player uses `OpenGL` to render video with a *shader* attached to gl renderer. This *shader* modifies each pixel of video frame. By default it converts *green* color to transparent.\n\nSo default alpha channel color is *green*. This color can be changed to any *rgb* color by adding xml attribute `alphaColor`:\n\n```xml\n\u003cFrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:custom=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003ccom.alphamovie.lib.AlphaMovieView\n        android:id=\"@+id/video_player\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        custom:alphaColor=\"#ff0000\"\n        custom:accuracy=\"0.7\"/\u003e\n\u003c/FrameLayout\u003e\n```\nIn the code snippet above we set `custom:alphaColor=\"#ff0000\"`. It means that alpha channel color is set to red.\n\nAlso we specify *accuracy* attr to be *0.7*. Accuracy is the value between **0** and **1**. It should be lower if you wish more shades of specified color be transparent and vice versa. By default `accuracy=\"0.95\"`. \n\n#### Custom shader\n\nThere is a possibility to apply your own *custom shader*. Add `shader` attr:\n\n```xml\n\u003cFrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:custom=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003ccom.alphamovie.lib.AlphaMovieView\n        android:id=\"@+id/video_player\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        custom:shader=\"@string/shader_custom\"/\u003e\n\u003c/FrameLayout\u003e\n```\n\nAnd define your custom shader in *string* values, for example:\n\n```xml\n\u003cresources\u003e\n    \u003c!-- ... other string resources --\u003e\n    \u003cstring name=\"shader_custom\"\u003e#extension GL_OES_EGL_image_external : require\\n\n            precision mediump float;\n            varying vec2 vTextureCoord;\n            uniform samplerExternalOES sTexture;\n            varying mediump float text_alpha_out;\n            void main() {\n              vec4 color = texture2D(sTexture, vTextureCoord);\n              if (color.g - color.r \u003e= 0.1 \u0026amp;\u0026amp; color.g - color.b \u003e= 0.1) {\n                  gl_FragColor = vec4(color.r, (color.r + color.b) / 2.0, color.b, 1.0 - color.g);\n              } else {\n                  gl_FragColor = vec4(color.r, color.g, color.b, color.a);\n              }\n            }\n    \u003c/string\u003e\n\u003c/resources\u003e\n```\n\nIn this case accuracy and alphaColor attrs are not affecting anything because they are used only when custom shader is not defined.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopol10%2Falpha-movie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnopol10%2Falpha-movie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopol10%2Falpha-movie/lists"}