android-ffmpeg

FFmpeg adding image watermark to video process is very slow

ぐ巨炮叔叔 提交于 2019-12-13 08:45:16
问题 I am adding image watermark to video with help of FFmpeg but FFmpeg takes an inordinate amount of time with the below command- String[] cmd = {"-i",videoPath, "-i", waterMark.toString(),"-filter_complex","overlay=5:5","-codec:a", "copy", outputPath}; so i tried another command which was little bit faster but increase output file size(which i do not want) String[] cmd = {"-y","-i", videoPath, "-i", waterMark.toString(), "-filter_complex", "overlay=5:5", "-c:v","libx264","-preset", "ultrafast",

FFMpeg Error initializing filter 'drawtext' on Android project

此生再无相见时 提交于 2019-12-13 03:23:57
问题 I try to draw a text on a video using FFMpeg but I have the error: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (GCC) configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype -

Android FFmpeg Log showing “ File:// protocol not found”

≡放荡痞女 提交于 2019-12-13 03:08:43
问题 I'm trying to overlay Image on video but FFmpeg log showing File://storage/emulated/0/whatsappCamera/wc1529921459336.jpg: Protocol not found I have also looked in below thread but it's not helped me I'm stuck Please help me!! Android FFmpeg reports “file protocol not found” Here is command String[] commandImage = new String[]{"-ss", "00:00:30.0", "-t", "00:00:10.0", "-i",path, "i","File://storage/emulated/0/whatsappCamera/wc1529921459336.jpg", "-filter_complex", "[0]crop=400:400:0:0[a];[a][1

How to pass byte buffer to FFmpeg?

南楼画角 提交于 2019-12-13 02:58:26
问题 I am looking for option to pass byte buffer to FFmpeg to decoding... There is a way to pass path to .mp4 file, but if I need to pass byte buffer for decoding there is no way... despite the fact that under the hood this lib FFmpeg make exactly the same, it extract byte buffer from .mp4 file and decode it... So, why there is no way to pass directly byte buffer? Feel free to ask. Any suggestions are welcome. 来源: https://stackoverflow.com/questions/57644078/how-to-pass-byte-buffer-to-ffmpeg

Wowza.GoCoder not working with org.bytedeco.javacv.FFmpegFrameRecorder

北战南征 提交于 2019-12-13 02:55:59
问题 I am working with code from https://github.com/bytedeco/sample-projects/blob/master/JavaCV-android-example/app/src/main/java/org/bytedeco/javacv_android_example/record/RecordActivity.java. Demo working fine I want to use wowza.gocoder with FFmpeg so by only add wowza dependancy in app.gradle then demo application crash at run time as screenshot here is my app.gradle file apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.1" defaultConfig {

Add Filters to Video like Instagram or Snapchat via FFmpeg

梦想与她 提交于 2019-12-12 04:36:14
问题 I am using FFmpeg in my android app. I have implemented following filters/effects successfully on video- Invert Color Black and white Sepia Vignette Gamma effect I followed FFmpeg Video Filter docs. There are similar questions asked but without any proper answer. I want to apply some Good Filters like on Instagram or Snapchat via FFmpeg . Below are few example filters taken from this link. Can these filters be achieved via ffmpeg ? 回答1: Here is a tutorial that might be helpful it shows how to

FFmpeg low trim accuracy

牧云@^-^@ 提交于 2019-12-12 01:17:25
问题 So, I'm trying to cut a 1 minute 29 seconds video into clips of 30 seconds each. The expected output is 30sec,30sec,29sec. The result is 35sec,29sec,23sec. This is my code - ArrayList<String> commandList = new ArrayList<>(); commandList.add("-ss"); commandList.add("00:00:00"); commandList.add("-i"); commandList.add(videoPath); commandList.add("-c"); commandList.add("copy"); commandList.add("-f"); commandList.add("segment"); commandList.add("-segment_time"); commandList.add("00:00:30");

ffmpeg watermark

不羁岁月 提交于 2019-12-11 14:49:39
问题 I am using a static compiled lib of FFMPEG gotten from BAMBUSER for android. The problem I am facing now is that FFMPEG version gotten from BAMBUSER does not support watermarking. ffmpeg -sameq -i mirror_watermark.mp4 -vf "movie=mirror_watermark.png [logo]; [in][logo] overlay=main_w-overlay_w:main_h-overlay_h [out]" output.mp4 No such filter: 'movie' ./configure --list-filters | grep movie returns nothing So I guess I have to use a newer version of FFMPEG but I do not know how to get started

Overlay image on video using ffmpeg in android

房东的猫 提交于 2019-12-11 14:43:23
问题 I am trying to overlay an image on video and save it. I saved the image in drawable, and use ffmpeg to do this. According to https://www.factorialcomplexity.com/blog/2016/12/11/adding-animated-overlays-to-videos-on-android.html I used below code to handle the video. String strFilter = "[1:v]scale=h=-1:w=" + 100 + "[overlay_scaled]," + "[0:v][overlay_scaled]overlay=eval=init:x=W*" + 0.2 + ":y=H*" + 0.2; String[] сmd = new String[]{ "-i", videoPath, "-itsoffset", "0", "-i", "drawable://" + R

Adding transparency to a video from black and white (and gray) alpha information video images

坚强是说给别人听的谎言 提交于 2019-12-11 07:27:44
问题 I'd like to create a video with transparency (and semi transparency) in android. The images of the source video are split into two images, the top one with color information (looks like the normal video image), the bottom one with alpha information (the same shapes but only in black and white and gray, black means transparent). This is the solution for iOS: https://medium.com/@quentinfasquel/ios-transparent-video-with-coreimage-52cfb2544d54 What would be the best way to to this in android?