{"id":13612538,"url":"https://github.com/a914-gowtham/android-video-trimmer","last_synced_at":"2026-01-21T07:37:21.683Z","repository":{"id":41174709,"uuid":"280947656","full_name":"a914-gowtham/android-video-trimmer","owner":"a914-gowtham","description":"Helps to trim local videos with compress option on Android applications using Exoplayer and media3 libraries","archived":false,"fork":false,"pushed_at":"2026-01-02T10:17:42.000Z","size":198182,"stargazers_count":412,"open_issues_count":44,"forks_count":127,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-08T03:11:20.600Z","etag":null,"topics":["android-video-editor","android-video-trimmer","ffmpeg","ffmpeg-android","ffmpeg-libraries","ffmpeg-wrapper","ffmpegcommand","trim-local-videos","trimmer","video-crop","video-cropping","video-cutter","video-edit","video-editing","video-trim","video-trimmer","video-trimming","videocompressor"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a914-gowtham.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-07-19T20:46:44.000Z","updated_at":"2026-01-02T10:16:56.000Z","dependencies_parsed_at":"2025-07-29T18:26:47.046Z","dependency_job_id":"e7745c32-5b4b-4ab1-ba78-ae7f0e25f6c5","html_url":"https://github.com/a914-gowtham/android-video-trimmer","commit_stats":null,"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/a914-gowtham/android-video-trimmer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Fandroid-video-trimmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Fandroid-video-trimmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Fandroid-video-trimmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Fandroid-video-trimmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a914-gowtham","download_url":"https://codeload.github.com/a914-gowtham/android-video-trimmer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Fandroid-video-trimmer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android-video-editor","android-video-trimmer","ffmpeg","ffmpeg-android","ffmpeg-libraries","ffmpeg-wrapper","ffmpegcommand","trim-local-videos","trimmer","video-crop","video-cropping","video-cutter","video-edit","video-editing","video-trim","video-trimmer","video-trimming","videocompressor"],"created_at":"2024-08-01T20:00:31.337Z","updated_at":"2026-01-21T07:37:21.677Z","avatar_url":"https://github.com/a914-gowtham.png","language":"Java","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"[![](https://jitpack.io/v/jZAIKO/android-video-trimmer.svg)](https://jitpack.io/#jZAIKO/android-video-trimmer)\n[![](https://jitpack.io/v/a914-gowtham/android-video-trimmer.svg)](https://jitpack.io/#a914-gowtham/android-video-trimmer)\n\n### Starting from 1.8.0 this library is using [media3](https://developer.android.com/media/media3/transformer/transformations) for media transcoding. Previously it was using [ffmpeg](https://github.com/arthenica/ffmpeg-kit?tab=readme-ov-file) which is deprecated now.\n\n\n# Android-video-trimmer\n\n##### Helps to trim local videos with many customizations on Android applications using exoplayer2 and FFmpeg [Demo app](https://github.com/a914-gowtham/android-video-trimmer/releases/1.8.1) \n\n![](https://github.com/a914-gowtham/Android-video-trimmer/blob/master/demo.gif)\n\n## How to use\n*For a working implementation, please have a look at the Sample Project*\n\n1. Include the library as local library project.\n\n+ Add the dependency to your app `build.gradle` file\n ```gradle\n // replace x.y.z with latest available jitpack version\n dependencies {\n    implementation 'com.github.a914-gowtham:android-video-trimmer:x.y.z'\n }\n ```\n + Add to project's root `build.gradle` file:\n```gradle\nallprojects {\n\trepositories {\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\n2. Create a global variable for ActivityResultLauncher\n\n```java\n    //Java\n    ActivityResultLauncher\u003cIntent\u003e startForResult = registerForActivityResult(\n            new ActivityResultContracts.StartActivityForResult(),\n            result -\u003e {\n                if (result.getResultCode() == Activity.RESULT_OK \u0026\u0026\n                        result.getData() != null) {\n                    Uri uri = Uri.parse(TrimVideo.getTrimmedVideoPath(result.getData()));\n                    Log.d(TAG, \"Trimmed path:: \" + uri);\n                   \n                } else\n                    LogMessage.v(\"videoTrimResultLauncher data is null\");\n            });\n```\n\n```kotlin\n    //Kotlin\n    val startForResult = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { \n    result: ActivityResult -\u003e\n        if (result.resultCode == Activity.RESULT_OK \u0026\u0026\n                        result.getData() != null) {\n                Uri uri = Uri.parse(TrimVideo.getTrimmedVideoPath(result.getData()))\n                Log.d(TAG, \"Trimmed path:: \" + uri)\n         }else \n          \tLogMessage.v(\"videoTrimResultLauncher data is null\");\n    }   \n```\n\n3. Add the code for opening Trim Activity.\n```java\nTrimVideo.activity(String.valueOf(videoUri))\n          .setHideSeekBar(true)\n          .disableCompression()   // to disable compression ui. enabled by default\n          .start(this,startForResult);\n```\n\n### Custom TrimTypes\n\n#### TrimType Default:\n```java\nTrimVideo.activity(videoUri)\n          .start(this,startForResult);\n```\n\n#### TrimType Fixed Duration:\n```java\nTrimVideo.activity(videoUri)\n          .setTrimType(TrimType.FIXED_DURATION)\n          .setFixedDuration(30) //seconds\n          .start(this,startForResult);\n```\n\n#### TrimType Minimum Duration:\n```java\nTrimVideo.activity(videoUri)\n          .setTrimType(TrimType.MIN_DURATION)\n          .setMinDuration(30) //seconds\n          .start(this,startForResult);\n```\n\n#### TrimType Min-Max Duration:\n```java\nTrimVideo.activity(videoUri)\n          .setTrimType(TrimType.MIN_MAX_DURATION)\n          .setMinToMax(10, 30)  //seconds\n          .start(this,startForResult);\n```\n\n## Proguard Rules\n```pro\n-dontwarn com.gowtham.library**\n-keep class com.gowtham.library** { *; }\n-keep interface com.gowtham.library** { *; }\n```\n\n## Development roadmap:\n\n1. Currently, compression only reduces the bitRate to reduce the file size. converting video to the selected resolution is in under development.\n\n## Compatibility\n  \n  * Library - Android Nougat 7.0+ (API 24)\n  * Sample - Android Kitkat 4.4+ (API 19)\n\n## License\n\nThis library is licensed under the MIT License.\n  \n## Support \nShow your support by giving a star to this repository. \n  \n## Collaboration\nThere are many ways of improving and adding more features, so feel free to collaborate with ideas, issues and/or pull requests. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa914-gowtham%2Fandroid-video-trimmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa914-gowtham%2Fandroid-video-trimmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa914-gowtham%2Fandroid-video-trimmer/lists"}