Git Product home page Git Product logo

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 24+

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.8'
     }
    

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(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() {
            }
        })

In-build 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(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. โญ

Awesome Mobile Libraries

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

adfleshner avatar androiddev-auction avatar ashvinvavaliya avatar milapchokshi-simformsolutions avatar mobile-simformsolutions avatar msajidjuneja avatar profahad avatar shwetachauhan-simform avatar shwetachauhan18 avatar yashwantgowla-simform avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssffmpegvideooperation's Issues

App ui is not responding when the video convert

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Run multiple commands

I want to run multiple command with 1 execute command. Here is my code:

val queries = arrayListOf<String>()
        imagePaths.forEachIndexed { index, path ->
            val query: Array<String> = FFmpegQueryExtension().mergeImageAndAudio(
                path,
                audioPaths[index],
                outputs[index]
            )
            queries.addAll(query)
        }


        CallBackOfQuery().callQuery(queries.toTypedArray(), object : FFmpegCallBack {
            override fun statisticsProcess(statistics: Statistics) {}
            override fun process(logMessage: LogMessage) {}
            override fun success() {
                onSuccess(outputs)
            }

            override fun cancel() {}
            override fun failed() {
                onError()
            }
        })

And here is the queries output:

-y
-loop
1
-i
IMAGE#1PATH
-i
AUDIO#1PATH
-shortest
-c:a
copy
-preset
ultrafast
VIDEO#1PATH
-y
-loop
1
-i
IMAGE#2PATH
-i
AUDIO#2PATH
-shortest
-c:a
copy
-preset
ultrafast
VIDEO#2PATH
-y
-loop
1
-i
IMAGE#3PATH
-i
AUDIO#3PATH
-shortest
-c:a
copy
-preset
ultrafast
VIDEO#3PATH

I got 3 videos as output but they are the same as each other (all 3 videos got image#1 and audio#1 paths)

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_log_default_callback" referenced by "/data/app/~~_0g3In5IkN7BxbJnYqAviA==/com.jangletech.chatchilli-l3iCrTOj5_bnf2qw-wkaXw==/lib/arm/libmobileffmpeg.so"...

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

audiovideo merge issue

When I start audio video merger process it shows error:

Stream specifier ':a' in filtergraph description [1:a]volume=0.15,apad[A];[0:a][A]amerge[out] matches no streams.

it's urgent please guide me how to resolve it?

Add Multiple Text

I want to add 4 drawing texts to the video. How can I add 4 texts at the same time?

Compress Bad Quality

I followed the sample project for query compress video, but the video result is bad, I want to change the query setup so that the video can be better, but I don't understand the query setup, is there any documentation for the query or example of query setup so that the video is better

I used the query from the sample project in Class FFmpegQueryExtension

fun compressor(inputVideo: String, width: Int?, height: Int?, outputVideo: String): Array<String> {
        Common.getFrameRate(inputVideo)
        val inputs: ArrayList<String> = ArrayList()
        inputs.apply {
            add("-y")
            add("-i")
            add(inputVideo)
            add("-s")
            add("${width}x${height}")
            add("-r")
            add("${if (FRAME_RATE >= 10) FRAME_RATE - 5 else FRAME_RATE}")
            add("-vcodec")
            add("mpeg4")
            add("-b:v")
            add("150k")
            add("-b:a")
            add("48000")
            add("-ac")
            add("2")
            add("-ar")
            add("22050")
            add("-preset")
            add("ultrafast")
            add(outputVideo)
        }
        return inputs.toArray(arrayOfNulls<String>(inputs.size))
    }

Thanks

Could not find com.kovachcode:timePickerWithSeconds:1.0.1

Followed the instruction to add this library in my Android Studio project but I am getting this error :
Could not find com.kovachcode:timePickerWithSeconds:1.0.1

Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/kovachcode/timePickerWithSeconds/1.0.1/timePickerWithSeconds-1.0.1.pom
- https://repo.maven.apache.org/maven2/com/kovachcode/timePickerWithSeconds/1.0.1/timePickerWithSeconds-1.0.1.pom
- https://jitpack.io/com/kovachcode/timePickerWithSeconds/1.0.1/timePickerWithSeconds-1.0.1.pom

What is the solution?

Permission Denied issue callQuery method returns failed

2022-06-02 17:11:50.505 21178-22210/ E/sfsffdf: ffmpeg version v4.4-dev-416
2022-06-02 17:11:50.506 21178-22210/ E/sfsffdf: Copyright (c) 2000-2020 the FFmpeg developers
2022-06-02 17:11:50.506 21178-22210/ E/sfsffdf: built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
2022-06-02 17:11:50.506 21178-22210/ E/sfsffdf: configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android21-clang --cxx=aarch64-linux-android21-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
2022-06-02 17:11:50.521 21178-22210/ E/sfsffdf: libavutil 56. 55.100 / 56. 55.100
2022-06-02 17:11:50.521 21178-22210/ E/sfsffdf: libavcodec 58. 96.100 / 58. 96.100
2022-06-02 17:11:50.521 21178-22210/ E/sfsffdf: libavformat 58. 48.100 / 58. 48.100
2022-06-02 17:11:50.521 21178-22210/ E/sfsffdf: libavdevice 58. 11.101 / 58. 11.101
2022-06-02 17:11:50.522 21178-22210/ E/sfsffdf: libavfilter 7. 87.100 / 7. 87.100
2022-06-02 17:11:50.522 21178-22210/ E/sfsffdf: libswscale 5. 8.100 / 5. 8.100
2022-06-02 17:11:50.522 21178-22210/ E/sfsffdf: libswresample 3. 8.100 / 3. 8.100
2022-06-02 17:11:50.530 21178-22210/ E/sfsffdf: /storage/emulated/0/Movies/abc/ZQQBNHZCWAMPKMS.mp4: Permission denied
2022-06-02 17:11:50.532 21178-22209/ E/sfsffdf: FAILED

Large Size

Though FFMEG libraries are pretty huge and this one is considerably way better but is their way to have minimal api for ffmpeg

How to reduce size of apk ?

While using this lib app size becomes so huge like 117 MB
I just need audio compressor for my project
is there any solution to achieve this?

No such filter: 'boxblur'

I am trying to blur the entire video, I came across the
following.

however it doesn't work, I get Conversion failed.

No such filter: 'boxblur'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument

I did some research and came across this, so how can I use 'boxblur'.

If it can't, there is another way to blur the video.

NoSuchMethodError: no static method "Lcom/arthenica/mobileffmpeg/Config;.log(JI[B)V"

Describe the bug
Getting following error after enabling Proguard.
NoSuchMethodError: no static method "Lcom/arthenica/mobileffmpeg/Config;.log(JI[B)V"

To Reproduce
Steps to reproduce the behavior:
Enable Progourd and run any FFMEPG command.

Smartphone (please complete the following information):

  • Device: Google Pixel 3a
  • OS: Android 13

after using add text on video

Describe the bug
i added a button to add text on video in my activity.
after click button i called library funtion add text on video but i got error.

2021-12-09 22:22:02.872 4041-4342/com.bunty.viewanddatabinding I/mobile-ffmpeg: ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers
built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 96.100 / 58. 96.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
/storage/emulated/0/Movies/Instagram/VID_80830819_164815_003.mp4: Permission denied

please help me it's needed to me.

Add Text to Image

Describe the bug
I changed AddTextOnVideo feature to add text on Image.
Here are queries. but when I run this command, I can see error ffmpeg error initializing filter 'drawtext' with args
Please help me
Screenshot 2022-04-19 at 12 45 24 PM

This is my sample code.

private fun addTextProcess(imagePath: String) {
        val outputPath = Common.getFilePath(this, Common.IMAGE)
        val dateString = Date().dateToString("yyyy-MM-dd HH:mm:ss.SSS")
        val fontPath = Common.getFileFromAssets(this, "roboto_regular.ttf").absolutePath
        val query = ffmpegQueryExtension.addTextOnVideo(imagePath, dateString,
            0.0f,
            0.0f,
            fontPath = fontPath,
            isTextBackgroundDisplay = false,
            fontSize = 30,
            fontcolor = "red",
            output = outputPath
        )
        CallBackOfQuery().callQuery(query, object : FFmpegCallBack {
            override fun process(logMessage: LogMessage) {
                Log.d("Dalibor", logMessage.text)
            }

            override fun success() {
               Log.d("Dalibor", "Sucess")
            }

            override fun cancel() {
                addTimeStampToPhotos()
            }

            override fun failed() {
                addTimeStampToPhotos()
            }
        })
    }

Compress Video

show an Error invalid frame size for all video present in device.

Video Resolution after compress too bad

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Unknown encoder 'libx264'

Describe the bug
Getting this error message while applying complex filter "Unknown encoder 'libx264'"

To Reproduce
Use the following command:
"-i " + clipUri + " -i " + videoUri + " -t 0.1 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -filter_complex " +
"[0:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1,setsar=1,fps=30,format=yuv420p[v0];" +
"[1:v]scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1,setsar=1,fps=30,format=yuv420p[v1];" +
"[1:a]aformat=sample_rates=48000:channel_layouts=stereo[a1];" +
"[v0][2:a][v1][a1]concat=n=2:v=1:a=1[v][a]" +
" -map [v] -map [a] -c:v libx264 -c:a aac -movflags +faststart " + outputUri

Expected behavior
Merged video output file

Smartphone (please complete the following information):

  • Device: Redmi note 5 pro
  • OS: 9

this command not working only on android 11 and above.

val command = arrayOf(
"-i",
inputPath,
"-filter:v",
"crop=$width:$height:$x:$y",
"-threads",
"5",
"-preset",
"ultrafast",
"-strict",
"-2",
"-c:a",
"copy",
outputPath
)
his command not working only on android 11 and above
library version 1.0.8

Error: file name too long

Describe the bug
I am adding audio tracks in a MP4 video, but getting following error from ffmpeg, it seems like output file name length is more then expected length, but how long is too long? Is there ay specific character length specified for the output file name?

Error:
/storage/emulated/0/Android/data/com.myapp/files/MyApp/Guru_shishya_Relationship__For_full_video_click_on_the_YouTube_link___sadhgurudevdineshanand__swamydineshanand__kundalinijagran__sadhnatmakasafalta__sadhakkipariksha____sadhu__sadhguru__sadhana__spiritualjourney__spiritualawakening__spiritua__090223095355.mkv: File name too long

To Reproduce

  1. Just set the output file name same as above, and run any simple ffmpeg command.

Expected behavior
mkv output file

Smartphone (please complete the following information):

  • Device: Redmi note 9 pro
  • OS: Android 12

Additional context
Version used: 'com.github.SimformSolutionsPvtLtd:SSffmpegVideoOperation:1.0.8'

Combating videos not working.

Combine videos not working.

catalog output

[Parsed_scale_0 @ 0xe25f1b60] Invalid size '0x0' [AVFilterGraph @ 0xe25f5140] Error initializing filter 'scale'[AVFilterGraph @ 0xe25f5140] with args '0x0'[AVFilterGraph @ 0xe25f5140] Error initializing complex filters. Invalid argument

Smartphone (please complete the following information):

  • Device: Pixil 2
  • OS: Android
  • Version 10

Video Size

Compressed video size always larger than original file Please fix it

Image add to Video Failed

the add image to video activity starts but results in
"Conversion Failed" error.
could you see logs and provide hint what is wrong here are the logs.

2021-07-15 11:14:23.097 7073-7073/? I/SKBD: and isTosAccept false
2021-07-15 11:14:23.120 27165-27304/com.simform.videoimageeditor I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-arm64-v8a-4.4-20200725.
2021-07-15 11:14:23.123 27165-27305/com.simform.videoimageeditor D/mobile-ffmpeg: Callback thread started.
2021-07-15 11:14:23.297 7073-7073/? I/SKBD: and isTosAccept false
2021-07-15 11:14:23.432 5796-5914/? D/NetworkController.MobileSignalController(0/-2): onSignalStrengthsChanged signalStrength=SignalStrength: 3 99 -3 -200 -3 -200 -1 99 2147483647 2147483647 2147483647 2147483647 0 2147483647 3 13 -107 0x1 P gsm|lte use_rsrp_and_rssnr_for_lte_level [-128, -118, -108, -98] [-115, -105, -95, -85] level=1
2021-07-15 11:14:23.432 5796-5914/? D/NetworkController.MobileSignalController(0/-2): getMobileIconGroup(): 0
2021-07-15 11:14:23.477 27165-27304/com.simform.videoimageeditor I/mobile-ffmpeg: ffmpeg version v4.4-dev-416 Copyright (c) 2000-2020 the FFmpeg developers
built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 96.100 / 58. 96.100
libavformat 58. 48.100 / 58. 48.100
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
Input #0, image2, from '/storage/emulated/0/DCIM/Camera/20210713_154357.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 483957 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 4608x3456 [SAR 59:59 DAR 4:3], 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/MP4_20210715_093813.mp4':
Metadata:
major_brand : iso6
minor_version : 1
compatible_brands: mp42iso6avc1isom
creation_time : 2021-07-15T04:08:13.000000Z
Duration: 00:00:19.00, start: 0.000000, bitrate: 1681 kb/s
Stream #1:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 480x848, 1615 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
Stream #1:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 63 kb/s (default)
Input #2, lavfi, from 'anullsrc':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #2:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Codec AVOption preset (Configuration preset) specified for output file #0 (/storage/emulated/0/Android/data/com.simform.videoimageeditor/files/Output/Output1626327863.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 (mjpeg) -> scale
Stream #1:0 (h264) -> scale
Stream #1:1 (aac) -> concat:in1:a0
Stream #2:0 (pcm_u8) -> concat:in0:a0
concat:out:v0 -> Stream #0:0 (mpeg4)
concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
2021-07-15 11:14:23.477 27165-27304/com.simform.videoimageeditor I/mobile-ffmpeg: [graph 0 input from stream 0:0 @ 0x7affd0ac00] sws_param option is deprecated and ignored
[graph 0 input from stream 1:0 @ 0x7affd0ad80] sws_param option is deprecated and ignored
[swscaler @ 0x7addbf1000] deprecated pixel format used, make sure you did set range correctly
[mp4 @ 0x7af2941600] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[mpeg4 @ 0x7af239ad00] timebase 1/1000000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
2021-07-15 11:14:23.498 7073-7073/? I/SKBD: and isTosAccept false
2021-07-15 11:14:23.579 6727-6983/? D/SDHMS:s: SIOP:: AP:309(389,90) BAT:354(354,0) CHG:385(385,0) USB:0(0,0) WIFI:303(359,50) ATC:0(0,-999)
2021-07-15 11:14:23.672 5478-12965/? D/WifiPermissionsUtil: canAccessScanResults: pkgName = com.sec.android.sdhms, uid = 1000
2021-07-15 11:14:23.698 7073-7073/? I/SKBD: and isTosAccept false

How to use in Java

'CallBackOfQuery()' has private access in 'com.simform.videooperations.CallBackOfQuery' in Java

How to stop running command.

Hello
I am using this library and working very great.
I want to know how to stop the current running task?

I didn't find any method to stop the current task. Please advise.

I have checked it by finishing the activity but the problem is it is not stopped and continues running.
and when i m trying to execute the new command the new command is waiting for the previous till it was not stopped.

Thanks.

Output Video have less resolution

this is the best FFMPEG library i came through
Hi guys
How can we Encode video to custom resolution as the output video is less size but low resolution is big problem.
especially when text overlay over video is used.the drawn text is blurred

Compression removes Video

Describe the bug
First of all nice work with this Project I love it.
I am currently tinkering around with ffmpeg on mobile and added your Project to mine to use the easy queries.
I noticed that the compression fails some times and got outside filming a few videos to test with your App.
When you try to compress a self filmed video it removes the video while compression and only gives a a sound file.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Compress a Video
  2. Do a Compression
  3. It returns successfully
  4. In Android..data..app..Output is just a sound file

Expected behavior
A Video File.

Smartphone (please complete the following information):

  • Device: [Samsung Galaxy S7 Edge]
  • OS: [Android 8.0.0]

Additional context
no changes to the video just filmed, and a try to compress

Error with convert image to video

Please check combine Images to Video and Combine Images and Videos too

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Convert Image To Video'
  2. Select 1 image and input 1 to the edittext
  3. Create button click
  4. See error

Error : create file failed or not?

Screenshots
image

Desktop (please complete the following information):

  • OS: Android 10

Smartphone (please complete the following information):

  • Device xiaomi readmi note 9

No output?

Application looks like it's working alright, however there's no output file produced. I'm using a Google Pixel 7 with Android 14 (physical device)

Conflict with c++_shared

I believe library shall not add its own c++_shared lib.
When we have build arguments:

android {
    compileSdkVersion project.properties.sdk_version
    defaultConfig {
        minSdkVersion project.properties.min_sdk_version
        targetSdkVersion project.properties.sdk_version
        externalNativeBuild {
            cmake {
                cppFlags "-std=c++14 -fexceptions"
                arguments "-DANDROID_ARM_NEON=TRUE",'-DANDROID_STL=c++_shared'
            }
        }
    }

Build fails with:

2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:

  • /Users/renetik/Development/renetik-instruments-android/project/renetik-instruments-library-audio/build/intermediates/library_jni/debug/jni/arm64-v8a/libc++_shared.so
  • /Users/renetik/.gradle/caches/transforms-3/49930d1a19493a31fa0ff855b95c71e4/transformed/jetified-mobile-ffmpeg-full-4.4/jni/arm64-v8a/libc++_shared.so
    If you are using jniLibs and CMake IMPORTED targets, see
    https://developer.android.com/r/tools/jniLibs-vs-imported-targets

I can't use my query

I want to increase the pitch of the audio and am writing my request for this. Like this:

fun changePitchAudio(inputAudio: String, rate: Double, pitch: Double, output: String): Array {
val inputs: ArrayList = ArrayList()
inputs.apply {
add("-i")
add(inputAudio)
add("-filter:a")
add("asetrate=${rate * pitch}")
add("-filter:a")
add("aresample=$rate")
add("-filter:a")
add("atempo=${1 / pitch}")
add("-vn")
add("-preset")
add("ultrafast")
add(output)
}
return inputs.toArray(arrayOfNulls(inputs.size))
}

but it not working. Please point me where I am wrong

Add this app to f-droid

The title says it all. It would be really awesome to add this app to the fdroid repository.

App ui is not responing

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Could not Stream on Server

The video generated by using textonvideoactivity or watermarkonvideoactivity does stream on server(aws) only audio plays and through analysis i realises its codec error rather than frame rate.it is using mpeg4 but changing -vcodec to h264 or libx64 or mpeg2 does not work.
any idea how to change the codec to h264 to stream both video and audio

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.