【问题标题】:ffmpeg loosing quality videoffmpeg 失去质量的视频
【发布时间】: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


【解决方案1】:

使用libx264 代替旧的mpeg4

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" "23" "-acodec" "copy" "-movflags +faststart" "/storage/emulated/0/VEditor/VideoCroper/20210227_175547-0-13.mp4"

使用-crf 选项控制质量。更多信息请访问FFmpeg Wiki: H.264

【讨论】:

    猜你喜欢
    • 2016-12-23
    • 1970-01-01
    • 2016-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-24
    • 2021-01-08
    • 2011-04-03
    相关资源
    最近更新 更多