Giter Site home page Giter Site logo

msoftware / ssffmpegvideooperation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simformsolutionspvtltd/ssffmpegvideooperation

0.0 1.0 2.0 125.14 MB

This is a library of FFmpeg for android... ๐Ÿ“ธ ๐ŸŽž ๐Ÿš‘

License: Apache License 2.0

Kotlin 100.00%

ssffmpegvideooperation's Introduction

FFMPEG video operations

Kotlin Version Platform API Android Arsenal

FFmpeg compiled for Android. Execute FFmpeg commands with ease in your Android app.

Getting Started

This project is provide in-build FFmpeg operation queries:

Video operation ffmpeg queries like

  • Cut video using time
  • Convert image to video
  • Add water mark on video
  • Add text on video
  • Combine image image and video
  • Combine images
  • Combine videos
  • Compress a video
  • Extract frames from video
  • Fast/Slow motion video
  • Reverse video
  • video fade in / fade out
  • Compress video to GIF
  • Rotate and Flip video (Mirroring)
  • Remove audio from video
  • Update aspect ratio of video

Other extra operation FFmpeg queries like

  • Merge GIFs
  • Merge Audios
  • Update audio volume
  • Fast/Slow audio
  • Crop audio using time
  • Compress Audio

Architectures

FFmpeg Android runs on the following architectures:

  • arm-v7a, arm-v7a-neon, arm64-v8a, x86 and x86_64

Features

  • Enabled network capabilities
  • Multi-threading
  • Supports zlib and Media-codec system libraries
  • Camera access on supported devices
  • Supports API Level 21+

Support target sdk

  • 30

Dependency

Gradle Dependency

  • Add it in your root build.gradle at the end of repositories:

     allprojects {
         repositories {
     	...
     	maven { url 'https://jitpack.io' }
         }
     }
    
  • Add the dependency in your app's build.gradle file

     dependencies {
     	implementation 'com.github.SimformSolutionsPvtLtd:SSffmpegVideoOperation:1.0.5'
     }
    

This is all you have to do to load the FFmpeg library.

Run FFmpeg command

In this sample code we will run the FFmpeg -version command in background call.

  val query:Array<String> = "-i, input,....,...., outout"
        CallBackOfQuery.callQuery(this, query, object : FFmpegCallBack {
            override fun statisticsProcess(statistics: Statistics) {
                Log.i("FFMPEG LOG : ", statistics.videoFrameNumber)
            }

            override fun process(logMessage: LogMessage) {
                Log.i("FFMPEG LOG : ", logMessage.text)
            }

            override fun success() {
            }

            override fun cancel() {
            }

            override fun failed() {
            }
        })

Inbuild query example

val startTimeString = "00:01:00" (HH:MM:SS)
val endTimeString = "00:02:00" (HH:MM:SS)
val query:Array<String> = FFmpegQueryExtension.cutVideo(inputPath, startTimeString, endTimeString, outputPath)
CallBackOfQuery.callQuery(this, query, object : FFmpegCallBack {
            override fun statisticsProcess(statistics: Statistics) {
                Log.i("FFMPEG LOG : ", statistics.videoFrameNumber)
            }

            override fun process(logMessage: LogMessage) {
                Log.i("FFMPEG LOG : ", logMessage.text)
            }

            override fun success() {
                //Output = outputPath
            }

            override fun cancel() {
            }

            override fun failed() {
            }
        })

same for other queries. And you can apply your query also

Medium Blog

For more info go to Multimedia Operations for Android using FFmpeg

Find this library useful? โค๏ธ

Support it by joining stargazers for this repository. โญ

License

Copyright 2021 Simform Solutions

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

ssffmpegvideooperation's People

Contributors

mobile-simformsolutions avatar shwetachauhan-simform avatar androiddev-auction avatar ashvinvavaliya avatar shwetachauhan18 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.