【发布时间】:2021-10-27 20:28:38
【问题描述】:
一切都很好,但是我的视频质量太低了,这是我第一次使用 ffmpeg
这是我的命令
I/System.out: "-y" "-noautorotate" "-ss" "0" "-t" "31" "-i" "/storage/emulated/0/Download/20210227_175547.mp4" "-vf" "crop=w=3837:h=2160:x=1:y=-2070" "-r" "15" "-vcodec" "mpeg4" "-acodec" "copy" "-b:v" "2500k" "/storage/emulated/0/VEditor/VideoCroper/20210227_175547-0-13.mp4"
【问题讨论】:
-
在输出路径前添加“-vb”“20M”。这将为您提供更好的质量。
-
为什么要使用旧的 mpeg4 而不是更现代的编码器,例如 libx264、libx265、libvpx-vp9?
-
@llogan 这是我第一次使用 ffmpeg 。我将尝试更多地探索并尝试使用现代编码器
-
@cropperteam 使用
I/System.out: "-y" "-noautorotate" "-ss" "0" "-t" "31" "-i" "/storage/emulated/0/Download/20210227_175547.mp4" "-vf" "crop=w=3837:h=2160:x=1:y=-2070" "-r" "15" "-vcodec" "libx264" "-crf" "18" "-acodec" "copy" "/storage/emulated/0/VEditor/VideoCroper/20210227_175547-0-13.mp4"并阅读FFmpeg Wiki: H.264。这假设 ffmpeg 配置了--enable-libx264。 -
@llogan 的质量仍然很低这是我的完整命令
"-y","-noautorotate", "-ss", Start, "-t", Duration, "-i",file_name, "-strict", "experimental", "-vf",sb.toString(), "-r", "15", "-ab", "128k", "-vcodec", "mpeg4", "-acodec", "copy", "-b:v", "2500k", "-sample_fmt", "s16", "-ss", "0", "-t", this.Duration, Output}, Output);
标签: android ffmpeg android-ffmpeg