cropsly / ffmpeg-android-java

Android java library for FFmpeg binary compiled using https://github.com/writingminds/ffmpeg-android
http://writingminds.github.io/ffmpeg-android-java
GNU General Public License v3.0
3.32k stars 831 forks source link

Can i use "copy" in the slow motion command? Currently getting error "Filtering and streamcopy cannot be used together" #359

Open passenger-earth opened 4 years ago

passenger-earth commented 4 years ago

Hi, First of all thank you so much for this great library.

While using the slow motion command , in some cases either the video is getting corrupted or giving a black screen in the output file. I faced the same issue while using the cut video command. I fixed the issue by using the copy command , which instead of re-encoding the video , copies the attributes for the original input video. So, i tried using the same approach for the slow motion command , but in this case i am getting this error "Filtering and streamcopy cannot be used together" . Is there any suggesstion on how i can solve the problem? Can i use the copy command while using "filter_complex" command ?

This is the command which is giving me the error.. Thank You

String[] complexCommand = {"-y", "-i", yourRealPath, "-filter_complex", "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]", "-map", "[v]", "-map", "[a]", "-c","copy","-r", "60", filePath};