android-ffmpeg

Creating video from images produces black screen video for certain image formats [duplicate]

落花浮王杯 提交于 2020-01-30 08:19:36
问题 This question already has answers here : FFMPEG x264 MP4 Encoding all grey (1 answer) FFmpeg converting image sequence to video results in blank video [closed] (1 answer) Closed 2 years ago . I am using below command to create video from images.The command works fine for most images but for png images the video created cannot be played and I just get a black screen. String[] command = new String[]{"-y", "-f", "concat", "-safe", "0", "-i", src.getAbsolutePath(), "-vsync", "vfr", "-vf", "scale

Cant rotate video Android FFMPEG

六眼飞鱼酱① 提交于 2020-01-06 19:49:09
问题 I am using https://github.com/WritingMinds/ffmpeg-android-java. Can trim, join mp4 files but not able to rotate and speed up/down. Tried almost all SO answers but no luck. I am using latest Android Studio. D/ffmpeg_work: [-noautorotate, -i, /storage/emulated/0/Pictures/VideoApp/v_1479895157.mp4, -vf, transpose=1, /storage/emulated/0/Pictures/VideoApp/v_1480001945.mp4] D/FFmpeg: Running publishing updates method D/ffmpeg_work: onProgress: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the

FFMPEG set -ss and -to with string

删除回忆录丶 提交于 2019-12-25 09:26:17
问题 I know I can set the start with -ss and end with -to but can someone please help me to format the following so that I can enter the -ss and -to with a string? I want -ss to come from String start = editStart.getText().toString(); and -to to come from String end = editEnd.getText().toString(); Here is my ffmpeg string I want to edit, I have entered -ss and -to to show where I want the above strings to be. String s = "-i" + " " + mVideoUri.toString().replace("file:///", "") + " -filter_complex

getting fatal exception when trying to play decoded audio using audioTrack

送分小仙女□ 提交于 2019-12-25 03:16:39
问题 I'm using MediaCodec for video decoding and playing it on surface texture. It all works fine, but when I am decoding audio, it's getting decoded successfully, but when I am trying to play it using AudioTrack I am getting following error: com.**** I/OMXClient: Using client-side OMX mux. com.**** I/OMXClient: Using client-side OMX mux. com.**** E/ACodec: [OMX.Intel.VideoDecoder.AVC] storeMetaDataInBuffers failed w/ err -2147483648 com.**** A/libc: Fatal signal 11 (SIGSEGV) at 0x0029004c (code=1

getting fatal exception when trying to play decoded audio using audioTrack

眉间皱痕 提交于 2019-12-25 03:16:16
问题 I'm using MediaCodec for video decoding and playing it on surface texture. It all works fine, but when I am decoding audio, it's getting decoded successfully, but when I am trying to play it using AudioTrack I am getting following error: com.**** I/OMXClient: Using client-side OMX mux. com.**** I/OMXClient: Using client-side OMX mux. com.**** E/ACodec: [OMX.Intel.VideoDecoder.AVC] storeMetaDataInBuffers failed w/ err -2147483648 com.**** A/libc: Fatal signal 11 (SIGSEGV) at 0x0029004c (code=1

get path of video file selected from gallery getting NULL. How to get path of video file?

本小妞迷上赌 提交于 2019-12-24 02:14:05
问题 get path of video file selected from gallery getting NULL . How to get path of video file ? Get URi in Activity Result also give null. converting Uri to String also getting Null . Intent intent; String selectedVideo1Path, selectedVideo2Path; EditText e1,e2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.videos_activity); Button button1 = (Button) findViewById(R.id.video1_btn); Button button2 = (Button) findViewById(R

How to crop video with ffmpeg library in Android?

拟墨画扇 提交于 2019-12-23 01:35:17
问题 To crop video in Android app I use ffmpeg library In SO example I found for cropping the video the following command: ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4 I created a String array: String[] cmd = {"ffmpeg", "-i", originalVideoPath, "-vf", "\"crop=" + imageWidth + ":" + imageHeight + ":" + xCoordinate + ":" + yCoordinate + "\"", "-c:a", "copy", croppedVideoPath}; And I pass this array to execute() method: try { ffmpeg = FFmpeg.getInstance(getContext()); ffmpeg.execute(cmd,

Android, split gif to frames with ffmpeg

徘徊边缘 提交于 2019-12-21 20:27:38
问题 I need to split my gif file to separate frames of any format (gif, png, doesnt matter). ffmpeg -i path/to/gif -c:v gif -f image2 path/to/output$03d.gif this command really splits gif to frames, but only first frame have a normal quality. All other frames looks like some damaged images library I use is com.writingminds:FFmpegAndroid:0.3.2 What should Ido to get all frames with normal quality 回答1: Use ffmpeg -i path/to/gif -vsync 0 path/to/output$03d.png 来源: https://stackoverflow.com/questions

FFMPEG - Overlay multipe videos over video at specified interval of time

喜夏-厌秋 提交于 2019-12-18 08:49:30
问题 I want to overlay multiple videos over a single video at specified interval of time. have tried with different solution but it will not work as i aspect i am use below command to overlay video over video String[] cmdWorking3 = new String[]{"-i",yourRealPath,"-i",gifVideoFile1,"-i",gifVideoFile2,"-i",gifVideoFile3, "-filter_complex", "[0][1]overlay=100:100:enable='between(t,0,2)'[v1];" + "[v1][2]overlay=130:130:enable='between(t,0,2)'[v2];" + "[v2][3]overlay=150:150:enable='between(t,5,6)'[v3]

ffmpeg for android, out of memory on encoding h264

与世无争的帅哥 提交于 2019-12-14 03:59:44
问题 I'm getting an weird error when enconding a video with ffmpeg on android Failed to inject frame into filter network: Out of memory Althoug is a pretty objective error, I do believe this is some "generic message" for another problem, because the video I used for testing is 17MB and less than 11 seconds length and I've sucessfully tested with videos bigger than 200MB and longer than 5min This problem happens to any video vertical videos recorded on my phone (the videos were recorded and play