FFmpeg не удалось перекодировать dsmall.mp4. Сообщения об ошибках
PHPVideoToolkit error: Execute error. It was not possible to encode "/var/www/vhosts/imodb.ir/cinemagram.ir/sites/default/files/videos/original/dsmall_5.mp4" as FFmpeg returned an error. The error is with the video codec of the input file. FFmpeg reports the error to be "Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height".
Выполненные команды и вывод
/usr/local/bin/ffmpeg -i '/var/www/vhosts/imodb.ir/cinemagram.ir/sites/default/files/videos/original/dsmall_5.mp4' -vf 'scale=498:360' -strict experimental -vcodec 'libx264' -acodec 'alac' -ac '2' -pass '1' -passlogfile '/tmp/1408770806-53f822f6bbf29-multipass' -y /tmp/1408770806-53f822f6bbe41.mp4
FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Aug 14 2014 22:54:14 with gcc 4.4.7 20120313 (Red Hat 4.4.7-4)
configuration: --enable-libfaac --enable-shared --enable-memalign-hack --enable-gpl --enable-libtheora --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-avfilter --enable-swscale
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 1 / 0.16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.93. 0 / 52.93. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.74. 0 / 1.74. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/vhosts/imodb.ir/cinemagram.ir/sites/default/files/videos/original/dsmall_5.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2010-03-20 21:29:11
encoder : HandBrake 0.9.4 2009112300
Duration: 00:00:05.56, start: 0.000000, bitrate: 551 kb/s
Stream #0.0(und): Video: h264, yuv420p, 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc
Metadata:
creation_time : 2010-03-20 21:29:11
Stream #0.1(eng): Audio: aac, 48000 Hz, mono, s16, 83 kb/s
Metadata:
creation_time : 2010-03-20 21:29:11
[buffer @ 0xb13d80] w:560 h:320 pixfmt:yuv420p
[scale @ 0xb142f0] w:560 h:320 fmt:yuv420p -> w:498 h:360 fmt:yuv420p flags:0xa0000004
[libx264 @ 0xa62cd0] broken ffmpeg default settings detected
[libx264 @ 0xa62cd0] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0xa62cd0] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0xa62cd0] speed presets are listed in x264 --help
[libx264 @ 0xa62cd0] profile is optional; x264 defaults to high
Output #0, mp4, to '/tmp/1408770806-53f822f6bbe41.mp4':
Stream #0.0(und): Video: libx264, yuv420p, 498x360, q=2-31, pass 1, 200 kb/s, 90k tbn, 30 tbc
Metadata:
creation_time : 2010-03-20 21:29:11
Stream #0.1(eng): Audio: alac, 48000 Hz, 2 channels, s16, 64 kb/s
Metadata:
creation_time : 2010-03-20 21:29:11
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
обновить мы устанавливаем новую версию ffmpeg
с нижеуказанными свойствами
ffmpeg version 2.2.1 Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 13 2014 13:00:18 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandi
r=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enabl
e-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11gra
b --enable-vdpau --disable-avisynth --enable-frei0r --enable-libopencv --enable-
libdc1394 --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenco
re-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enab
le-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx2
64 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_F
ORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -m
tune=generic -fPIC' --disable-stripping
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
Я хочу конвертировать каждое видео в mp4
, что является хорошим пресетом для моей цели?