diff --git a/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java b/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java index 0592a6c..844bc41 100644 --- a/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java +++ b/app/src/main/java/com/frank/ffmpeg/util/FFmpegUtil.java @@ -321,9 +321,9 @@ public class FFmpegUtil { * @return 视频反序的命令行 */ public static String[] reverseVideo(String inputFile, String targetFile) { - //FIXME 音频也反序 -// String reverseVideo = "ffmpeg -i %s -filter_complex [0:v]reverse[v];[0:a]areverse[a] -map [v] -map [a] %s"; - String reverseVideo = "ffmpeg -i %s -filter_complex [0:v]reverse[v] -map [v] %s";//单纯视频反序 + //-vf reverse视频反序, -an去掉音频 + //视频反序比较耗时, 建议用来处理1分钟以内的短视频 + String reverseVideo = "ffmpeg -i %s -vf reverse -an %s"; reverseVideo = String.format(reverseVideo, inputFile, targetFile); return reverseVideo.split(" "); } diff --git a/app/src/main/res/layout/activity_video_handle.xml b/app/src/main/res/layout/activity_video_handle.xml index fb36e97..54a6702 100644 --- a/app/src/main/res/layout/activity_video_handle.xml +++ b/app/src/main/res/layout/activity_video_handle.xml @@ -93,7 +93,7 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:text="@string/video_reverse" - android:visibility="gone"/> + android:visibility="visible"/>