【问题标题】:FFMPEG convert and codecFFMPEG 转换和编解码器
【发布时间】:2018-03-11 12:06:35
【问题描述】:

我有一个 CENTOS,我安装了 ffmpeg,使用:yum install ffmpeg 命令

我正在尝试使用以下命令转换视频:

ffmpeg -y -i "C:\home\app\cedoc\convert\TREINO_PSC_ACD_PR_02_09_14_IMAGEM_GOROTO_PRESO.MXF" -crf 18.0 -vcodec libx264 -filter:v scale=1920:1080 -preset veryslow -acodec libvo_aacenc -ar 48000 -b:a 192k -coder 1 -flags +loop -cmp chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0 "C:\Users\lanhellas\Documents\TREINO_PSC_ACD_PR_02_09_14_IMAGEM_GOROTO_PRESO.mp4"

但我得到了以下信息:

Unknown encoder 'libvo_aacenc'

这是我的 ffmpeg 配置:

ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

【问题讨论】:

  • 看看你的 -acodec 值。它不在您构建的 ffmpeg 中。在您的构建中找到一个差异音频编解码器(您可以使用 cli 命令列出所有编解码器)。尝试另一个与您从 'ffmpeg -i $your-audio-input 获得的输出相匹配的值
  • 我是 ffmpeg 的新手,有没有办法启用这个编解码器?

标签: ffmpeg


【解决方案1】:

libvo_aacenc 产生了低质量的音频,最终是removed from FFmpeg

可用的 AAC 编码器有:

  • aac 原生 FFmpeg AAC 编码器。大多数用户都可以正常工作,但您的版本太旧,无法包含此编码器的主要改进。一个简单的更新方法是到download an already compiled ffmpeg,然后可以选择将其移动到/usr/local/bin

  • libfdk_aac FFmpeg 支持的最高质量 AAC 编码器,但需要您 compile

FFmpeg Wiki: AAC


您的命令还有一些问题:

  • 该命令看起来适用于 Windows (C:\),但您的 ffmpeg 信息看起来适用于 Linux,因此您可能需要修复文件的路径。

  • 您有许多不应该使用的选项。 -preset 处理所有额外的东西,所以一旦你更新 ffmpeg 你的命令可以简单地类似于:

    ffmpeg -i input.mxf -c:v libx264 -vf scale=1920:1080 -preset veryslow -c:a aac -b:a 192k output.mp4
    

【讨论】:

  • 完美答案我更新了我的 ffmpeg 并且你的命令有效,但我有一个问题:转换非常非常慢,转换 1GB 文件大约需要 30 分钟。反正有禁食吗?
  • @RonaldoLanhellas 使用更快的-preset。请参阅FFmpeg Wiki: H.264 了解更多信息。我需要查看您的命令和控制台输出以提出任何其他建议。您可以使用 pastebin 网站并在评论中提供链接。
猜你喜欢
  • 2019-07-30
  • 1970-01-01
  • 1970-01-01
  • 2023-03-04
  • 2023-03-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-24
相关资源
最近更新 更多