Skip to content

Commit

Permalink
Merge pull request #31 from krazykira/release/version_1.1.0
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
krazykira committed Apr 8, 2020
2 parents 1927979 + 4b190c1 commit fefe876
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -2,7 +2,7 @@
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

**/.DS_Store
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
Expand Down
23 changes: 15 additions & 8 deletions README.md
Expand Up @@ -2,7 +2,12 @@
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-VidEffects-green.svg?style=true)](https://android-arsenal.com/details/1/4029)

This is an Android library which can be used to apply different Filters/Effects on videos. It uses vertexShaders and fragmentShaders to apply effects on `GLSurfaceView`. It uses `MediaPlayer` instance for playing videos on `GlSurfaceView`. See the sample app in order to see a working demo.
![Img](https://github.com/krazykira/VidEffects/blob/master/videffects/screenshot/library_demo.gif)

### Change Log
```
1.1.0 - Now using this library, you can also save video once you apply a Filter (not EFFECT), Updated Sample app,
```
## Supported Effects

The following list of effects are currently avaialble and can be applied using VidEffects
Expand Down Expand Up @@ -30,12 +35,13 @@ The following list of effects are currently avaialble and can be applied using V




## Limitations
- The effects applied using this library are temporary. What that means is that the original video doesn't change. Effects are only applied during video playback and once the video ends the effects end with it.
- Minimum Supported Android version is 21 (Lollipop)
- Saving video available only for Filters and requires Android 23 min api version.For more information check the file [VideoController](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/controller/VideoController.kt).
- Other ways to save video once effect/filter is applied [FFmpeg](https://ffmpeg.org/) to apply effects on videos. Details about how to do that can be seen on this [wiki page](https://github.com/krazykira/VidEffects/wiki/Permanent-video-effects)
- Some emulators have problems during video playback so try on real device when that happens e.g: Android Lollipop emulators don't show video.

The effects applied using this library are temporary. What that means is that the orignal video doesn't change. Effects are only applied during video playback and once the video ends the effects end with it. In the future, i am aiming to apply permanant effect to videos. You guys are welcome to help out using PRs.
<br>For now, if you are really desperate and want to apply effects then you can use [FFmpeg](https://ffmpeg.org/) to apply effects on videos. Details about how to do that can be seen on this [wiki page](https://github.com/krazykira/VidEffects/wiki/Permanent-video-effects)
Saving video available only for Filters and requires Android 23 min api version.

## How to use it
- Add the following code to your project's `build.gradle` file
Expand All @@ -50,7 +56,7 @@ Saving video available only for Filters and requires Android 23 min api version.
```sh
dependencies {
// Gradle path for VidEffects
compile 'com.sherazkhilji.videffects:videffects:1.0.2'
implementation "com.sherazkhilji.videffects:videffects:1.1.0"
}
```

Expand Down Expand Up @@ -105,7 +111,8 @@ dependencies {
```
- Incase of any confusion, checkout the [SamplePlayerActivity](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/SamplePlayerActivity.java) for a complete example on how to apply different `Effects` on your videos.
- Incase of any confusion, check the file [SamplePlayerActivity](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/view/SamplePlayerActivity.java) for a complete example on how to apply different `Effects` on your videos.
- For Advance implementation and saving Filters, check the file [VideoActivity](https://github.com/krazykira/VidEffects/blob/master/app/src/main/java/com/videffects/sample/view/VideoActivity.kt)
## See it in working
Expand Down Expand Up @@ -141,13 +148,13 @@ Want to contribute or add some new Effects? Great! Fork it and send me a pull re
Developed by
============
* Sheraz Ahmad Khilji - <sherazkhilji@gmail.com>
* Sheraz Ahmed Khilji - <sherazkhilji@gmail.com>
License
=======
Copyright 2016 Sheraz Ahmad Khilji
Copyright 2020 Sheraz Ahmed Khilji
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Binary file removed app/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions app/build.gradle
Expand Up @@ -26,6 +26,7 @@ android {

dependencies {
implementation project(":videffects")
// implementation "com.sherazkhilji.videffects:videffects:1.1.0"
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'com.google.android.material:material:1.1.0'
Expand Down
Binary file removed app/src/.DS_Store
Binary file not shown.
Binary file removed app/src/main/.DS_Store
Binary file not shown.
7 changes: 1 addition & 6 deletions app/src/main/AndroidManifest.xml
Expand Up @@ -21,12 +21,7 @@
android:name="com.videffects.sample.view.SamplePlayerActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
android:label="@string/app_name"
android:screenOrientation="landscape">
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN"/>-->
<!-- <category android:name="android.intent.category.LAUNCHER"/>-->
<!-- </intent-filter>-->
</activity>
android:screenOrientation="landscape" />

<activity
android:name="com.videffects.sample.view.AssetsGalleryActivity"
Expand Down
Binary file removed app/src/main/assets/.DS_Store
Binary file not shown.
Expand Up @@ -2,12 +2,10 @@ package com.videffects.sample.controller

import android.content.res.AssetFileDescriptor
import android.media.MediaPlayer
import android.media.MediaPlayer.MEDIA_ERROR_UNKNOWN
import android.os.Build
import android.os.Environment
import android.util.Log
import android.widget.SeekBar
import android.widget.Toast
import androidx.annotation.RequiresApi
import com.sherazkhilji.videffects.filter.AutoFixFilter
import com.sherazkhilji.videffects.filter.GrainFilter
Expand Down
@@ -1,6 +1,7 @@
package com.videffects.sample.view

import android.app.Activity
import android.content.Intent
import android.graphics.Rect
import android.graphics.drawable.Drawable
import android.os.Bundle
Expand All @@ -11,24 +12,26 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ItemDecoration
import com.sherazkhilji.sample.R
import com.videffects.sample.model.AssetsGalleryModel
import com.videffects.sample.model.screenHeight
import com.videffects.sample.model.screenWidth
import com.videffects.sample.model.toPx
import kotlinx.android.synthetic.main.activity_gallery.*


class AssetsGalleryActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val recyclerView = RecyclerView(this)
recyclerView.layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT)
setContentView(R.layout.activity_gallery)
recyclerView.layoutManager = GridLayoutManager(this, SPAN_COUNT)
recyclerView.adapter = PreviewAdapter(AssetsGalleryModel(this))
recyclerView.addItemDecoration(SpacesItemDecoration())
setContentView(recyclerView)

buttonSamplePlayer.setOnClickListener {
startActivity(Intent(this, SamplePlayerActivity::class.java))
}
}

private class PreviewAdapter(private val model: AssetsGalleryModel) : RecyclerView.Adapter<PreviewHolder>() {
Expand Down
20 changes: 20 additions & 0 deletions app/src/main/res/layout/activity_gallery.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="9" />

<Button
android:id="@+id/buttonSamplePlayer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:text="Open Sample Player Activity" />

</LinearLayout>
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
@@ -0,0 +1 @@
android.useAndroidX=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Fri Jan 24 21:08:22 CET 2020
#Wed Apr 08 10:45:53 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
Binary file added screenshot/library_demo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion videffects/build.gradle
Expand Up @@ -23,7 +23,7 @@ ext {
gitUrl = 'https://github.com/krazykira/VidEffects.git'

versionCode = 3
libraryVersion = '1.0.3'
libraryVersion = '1.1.0'

developerId = 'krazykira'
developerName = 'Sheraz Ahmed Khilji'
Expand Down

0 comments on commit fefe876

Please sign in to comment.