{"id":33147008,"url":"https://github.com/cine-io/android-ffmpeg-with-rtmp","last_synced_at":"2025-12-17T13:54:48.110Z","repository":{"id":18039945,"uuid":"21083292","full_name":"cine-io/android-ffmpeg-with-rtmp","owner":"cine-io","description":"script(s) to build ffmpeg for android, including support for RTMP (and OpenSSL)","archived":false,"fork":false,"pushed_at":"2016-04-07T07:00:55.000Z","size":286,"stargazers_count":238,"open_issues_count":15,"forks_count":106,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-04-14T11:05:53.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cine-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-22T02:02:02.000Z","updated_at":"2024-04-13T03:59:24.000Z","dependencies_parsed_at":"2022-08-25T13:50:28.876Z","dependency_job_id":null,"html_url":"https://github.com/cine-io/android-ffmpeg-with-rtmp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cine-io/android-ffmpeg-with-rtmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cine-io%2Fandroid-ffmpeg-with-rtmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cine-io%2Fandroid-ffmpeg-with-rtmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cine-io%2Fandroid-ffmpeg-with-rtmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cine-io%2Fandroid-ffmpeg-with-rtmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cine-io","download_url":"https://codeload.github.com/cine-io/android-ffmpeg-with-rtmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cine-io%2Fandroid-ffmpeg-with-rtmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27783730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"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":[],"created_at":"2025-11-15T13:00:40.320Z","updated_at":"2025-12-17T13:54:48.104Z","avatar_url":"https://github.com/cine-io.png","language":"Shell","funding_links":[],"categories":["Libs","Media"],"sub_categories":["\u003cA NAME=\"Media\"\u003e\u003c/A\u003eMedia"],"readme":"# android-ffmpeg-with-rtmp\n\nThis repository contains script(s) to build ffmpeg for android with RTMP (and OpenSSL) support.\n\n## Instructions\n\n1. Install the [Android NDK][android-ndk] (tested with version r10).\n2. Ensure that [cURL][cURL] is installed.\n3. Ensure that [pkg-config][pkg-config] is installed.\n4. Clone this repository and `cd` into its directory.\n5. Run `build.sh`.\n6. Look in `build/dist` for the resulting libraries and executables.\n7. Look in `build/build.log` if something goes wrong.\n\nFor example:\n\n```bash\n$ git clone git@github.com:cine-io/android-ffmpeg-with-rtmp.git\n$ cd android-ffmpeg-with-rtmp\n$ ./build.sh\n```\n\n## Notes\n\nThe first time you run the script, it will try to find the location where\nyou've installed the NDK. It will also try to auto-detect your operating\nsystem and architecture. This process might take a minute or two, so the\ninformation will be saved into a configuration file called\n`.build-config.sh` which will be used on subsequent executions of\nthe script.\n\nThe script is meant to be idempotent. However, should you want to start over\nfrom scratch, it's a simple matter of:\n\n```bash\n$ rm -rf src build .build-config.sh\n$ ./build.sh\n```\n\n## Android\n\nTo use `ffmpeg` with an Android app you will need to deploy the binaries along \nwith the libraries.  Here's a listing of the `build/dist` directory.\n\n```\n.\n├── bin\n│   ├── ffmpeg\n│   ├── openssl\n│   └── ssltest\n└── lib\n    ├── libavcodec-56.so\n    ├── libavdevice-56.so\n    ├── libavfilter-5.so\n    ├── libavformat-56.so\n    ├── libavutil-54.so\n    ├── libcrypto.so\n    ├── librtmp-1.so\n    ├── libssl.so\n    ├── libswresample-1.so\n    └── libswscale-3.so\n```\n\nA simple way to deploy the binaries would be to archive (e.g. zip) these directories\nand copy the archive in a res/raw directory within the Android project.  Then at runtime, \nunpack the archive into a directory accessible to the app and set the appropriate permissions, \ne.g. chmod 750 -R directory-name.\n\nIn order for the Android app to use the libraries the LD_LIBRARY_PATH must be set to the location\nwhere the libraries reside.  For example:\n\n```java\n// Change the permissions\nRuntime.getRuntime().exec(\"chmod -R 0750 \"+ abspath).waitFor();\n\t\n//...\n    \nProcessBuilder processBuilder = new ProcessBuilder(cmd);\n\nfinal Map\u003cString, String\u003e environment = processBuilder.environment();\n\nenvironment.put(\"LD_LIBRARY_PATH\", context.getDir(\"lib\", 0).getAbsolutePath());\n\nProcess process = processBuilder.start();\n\n//...\n```\n\n\n## Acknowledgements\n\nInspired by: [openssl-android][openssl-android] and [FFmpeg-Android][FFmpeg-Android].\n\n\n\u003c!-- external links --\u003e\n[openssl-android]:https://github.com/guardianproject/openssl-android\n[FFmpeg-Android]:https://github.com/OnlyInAmerica/FFmpeg-Android\n[android-ndk]:https://developer.android.com/tools/sdk/ndk/index.html\n[cURL]:http://curl.haxx.se/\n[pkg-config]:http://www.freedesktop.org/wiki/Software/pkg-config/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcine-io%2Fandroid-ffmpeg-with-rtmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcine-io%2Fandroid-ffmpeg-with-rtmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcine-io%2Fandroid-ffmpeg-with-rtmp/lists"}