Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized option 'c:v' ffmpeg error for converting videos to H264

Tags:

ffmpeg

x264

I told my server to upgrade to latest version of ffmpeg and they told me they did and I have the latest version that is 2.2.1 . I test several codes to convert a video to x264 , here is the one ;

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

the result

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'

the last line says "Unrecognized option 'c:v'"

What should I do ? Thanks

like image 773
user3528346 Avatar asked Nov 28 '22 07:11

user3528346


2 Answers

For newer versions like mine 0.8.12 use -vcodec instead of -c:v

like image 196
jmarceli Avatar answered Nov 30 '22 20:11

jmarceli


The ffmpeg version looks wrong (0.6.5). Perhaps that is the issue?

like image 25
av501 Avatar answered Nov 30 '22 21:11

av501