ffmpeg - 将视频转换为 H264 时出现无法识别的选项 'c:v' ffmpeg 错误

标签 ffmpeg x264

我告诉我的服务器升级到最新版本的 ffmpeg ,他们告诉我他们升级了,我有最新版本 2.2.1 。 我测试了几个将视频转换为 x264 的代码,这是一个;

passthru("$ffmpegpath -i aatest/a.AVI -c:v libx264 -c:a libfaac -preset veryslow -qp 0 aatest/output.mp4 2>&1");

结果

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 [mpeg4 @ 0x1111960]Invalid and inefficient vfw-avi packed B frames detected [mpeg4 @ 0x1111960]frame skip 8 Input #0, avi, from 'aatest/a.AVI': Duration: 00:02:04.04, start: 0.000000, bitrate: 885 kb/s Stream #0.0: Video: mpeg4, yuv420p, 480x360 [PAR 4:3 DAR 16:9], 25 tbr, 25 tbn, 25 tbc Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s Unrecognized option 'c:v'

最后一行显示“无法识别的选项'c:v'”

我该怎么办? 谢谢

最佳答案

对于像我的 0.8.12 这样的较新版本,请使用 -vcodec 而不是 -c:v

关于ffmpeg - 将视频转换为 H264 时出现无法识别的选项 'c:v' ffmpeg 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23039501/

相关文章:

android - Android 上的 GStreamer x264enc 和 SIGSEGV

video - 将 .ass (ssa, aegisub) SubStationAlpha subs 添加到 mp4 的最快方法?

ubuntu - 每 1 分钟在 Ubuntu 上运行 ffmpeg

Powershell 作业内存消耗问题

c - 如何避免不支持的帧速率错误?

FFMPEG 输入区域失败

c++ - 如何在 C++ 中使用 libav 设置 x264 基线配置文件

ffmpeg - 如何使用 FFMPEG 减小水印的大小

ffmpeg - 使用 x264 生成所有 P 帧帧内刷新 H264

video - MPEG4 X264 与 NVENC H264 编码在旧设备上播放兼容性