“Windows服务器上的FFMPEG”;未知编码器';libfaac'&引用;
我是在Windows服务器上做这项工作的,并且还没有根据Linux服务器上的其他问题得到回答 我在一个处理视频上传的项目中使用FFMPEG,我一直遇到AAC音频编码的视频问题 我尝试使用aac和其他aac编码器,但windows版本的FFMPEG显示未知编码器。我没有设置音频代码,所以它可能会转换为本机。但还是一样 请参见下面的日志输出:“Windows服务器上的FFMPEG”;未知编码器';libfaac'&引用;,ffmpeg,Ffmpeg,我是在Windows服务器上做这项工作的,并且还没有根据Linux服务器上的其他问题得到回答 我在一个处理视频上传的项目中使用FFMPEG,我一直遇到AAC音频编码的视频问题 我尝试使用aac和其他aac编码器,但windows版本的FFMPEG显示未知编码器。我没有设置音频代码,所以它可能会转换为本机。但还是一样 请参见下面的日志输出: <pre>object(FFMpeg\Exception\RuntimeException)#35 (7) { ["message&
<pre>object(FFMpeg\Exception\RuntimeException)#35 (7) {
["message":protected]=>
string(15) "Encoding failed"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(108) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php"
["line":protected]=>
int(106)
["trace":"Exception":private]=>
array(1) {
[0]=>
array(5) {
["file"]=>
string(45) "C:\inetpub\wwwroot\dev\ffmpeg-lib\process.php"
["line"]=>
int(35)
["function"]=>
string(4) "save"
["class"]=>
string(26) "FFMpeg\Media\AbstractVideo"
["type"]=>
string(2) "->"
}
}
["previous":"Exception":private]=>
object(Alchemy\BinaryDriver\Exception\ExecutionFailureException)#43 (9) {
["command":protected]=>
string(397) "C:\ffmpeg\bin\ffmpeg.exe -y -ss 00:00:17.00 -i "temp/temp_20201110-100656_1080p-220mb.mp4" -t 00:00:52.00 -threads 12 -vcodec libx264 -acodec libfaac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile "W:/TempIIS\ffmpeg-passes5fabd88bb6b0912dmm/pass-5fabd88bb6c3b" "temp/20201111-122651.mp4""
["errorOutput":protected]=>
string(2301) "ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.1 (GCC) 20200805
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 58.100 / 56. 58.100
libavcodec 58.101.101 / 58.101.101
libavformat 58. 51.101 / 58. 51.101
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp/temp_20201110-100656_1080p-220mb.mp4':
Metadata:
major_brand : mp42
minor_version : 19529854
compatible_brands: mp42isom
creation_time : 2016-04-11T06:32:53.000000Z
Duration: 00:02:25.98, start: 0.000000, bitrate: 13772 kb/s
Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2016-04-11T06:32:53.000000Z
handler_name : Sound Media Handler
Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 13639 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2016-04-11T06:32:53.000000Z
handler_name : Video Media Handler
encoder : AVC Coding
Unknown encoder 'libfaac'
"
["message":protected]=>
string(2750) "ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -ss 00:00:17.00 -i "temp/temp_20201110-100656_1080p-220mb.mp4" -t 00:00:52.00 -threads 12 -vcodec libx264 -acodec libfaac -b:v 1000k -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -pass 1 -passlogfile "W:/TempIIS\ffmpeg-passes5fabd88bb6b0912dmm/pass-5fabd88bb6c3b" "temp/20201111-122651.mp4":
Error Output:
ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.1 (GCC) 20200805
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 58.100 / 56. 58.100
libavcodec 58.101.101 / 58.101.101
libavformat 58. 51.101 / 58. 51.101
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'temp/temp_20201110-100656_1080p-220mb.mp4':
Metadata:
major_brand : mp42
minor_version : 19529854
compatible_brands: mp42isom
creation_time : 2016-04-11T06:32:53.000000Z
Duration: 00:02:25.98, start: 0.000000, bitrate: 13772 kb/s
Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2016-04-11T06:32:53.000000Z
handler_name : Sound Media Handler
Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 13639 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2016-04-11T06:32:53.000000Z
handler_name : Video Media Handler
encoder : AVC Coding
Unknown encoder 'libfaac'
"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(116) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php"
["line":protected]=>
int(95)
["trace":"Exception":private]=>
array(5) {
[0]=>
array(5) {
["file"]=>
string(116) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php"
["line"]=>
int(73)
["function"]=>
string(18) "doExecutionFailure"
["class"]=>
string(34) "Alchemy\BinaryDriver\ProcessRunner"
["type"]=>
string(2) "->"
}
[1]=>
array(5) {
["file"]=>
string(117) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php"
["line"]=>
int(207)
["function"]=>
string(3) "run"
["class"]=>
string(34) "Alchemy\BinaryDriver\ProcessRunner"
["type"]=>
string(2) "->"
}
[2]=>
array(5) {
["file"]=>
string(117) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php"
["line"]=>
int(136)
["function"]=>
string(3) "run"
["class"]=>
string(35) "Alchemy\BinaryDriver\AbstractBinary"
["type"]=>
string(2) "->"
}
[3]=>
array(5) {
["file"]=>
string(108) "C:\inetpub\wwwroot\dev\ffmpeg-lib\ffmpeg-php\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Media\AbstractVideo.php"
["line"]=>
int(96)
["function"]=>
string(7) "command"
["class"]=>
string(35) "Alchemy\BinaryDriver\AbstractBinary"
["type"]=>
string(2) "->"
}
[4]=>
array(5) {
["file"]=>
string(45) "C:\inetpub\wwwroot\dev\ffmpeg-lib\process.php"
["line"]=>
int(35)
["function"]=>
string(4) "save"
["class"]=>
string(26) "FFMpeg\Media\AbstractVideo"
["type"]=>
string(2) "->"
}
}
["previous":"Exception":private]=>
NULL
}
}
可能是以下内容的副本:
您可以运行
ffmpeg-encoders
来查看安装了什么…我确实先尝试了这个,但是Windows版本(链接中提供的版本是Linux上的)我只得到了“未知编码器”,我运行了您提到的命令并添加了上面的输出。libfaac从2016年起就消失了。将-acodec libfaac
更改为-acodec aac
或省略-acodec
并使用默认值。与libfaac问题无关,但您的命令看起来像是2008年发布的。您可以从-refs
到-grillis
删除所有内容,并使用-preset
。看见
V..... a64multi Multicolor charset for Commodore 64 (codec a64_multi)
V..... a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)
V..... alias_pix Alias/Wavefront PIX image
V..... amv AMV Video
V..... apng APNG (Animated Portable Network Graphics) image
V..... asv1 ASUS V1
V..... asv2 ASUS V2
V..... libaom-av1 libaom AV1 (codec av1)
V..... librav1e librav1e AV1 (codec av1)
V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1)
V..... avrp Avid 1:1 10-bit RGB Packer
V..X.. avui Avid Meridien Uncompressed
V..... ayuv Uncompressed packed MS 4:4:4:4
V..... bmp BMP (Windows and OS/2 bitmap)
VF.... cfhd GoPro CineForm HD
V..... cinepak Cinepak
V..... cljr Cirrus Logic AccuPak
V.S... vc2 SMPTE VC-2 (codec dirac)
VFS... dnxhd VC3/DNxHD
V..... dpx DPX (Digital Picture Exchange) image
VFS... dvvideo DV (Digital Video)
V.S... ffv1 FFmpeg video codec #1
VF.... ffvhuff Huffyuv FFmpeg variant
V..... fits Flexible Image Transport System
V..... flashsv Flash Screen Video
V..... flashsv2 Flash Screen Video Version 2
V..... flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)
V..... gif GIF (Graphics Interchange Format)
V..... h261 H.261
V..... h263 H.263 / H.263-1996
V.S... h263p H.263+ / H.263-1998 / H.263 version 2
V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
V..... h264_amf AMD AMF H.264 Encoder (codec h264)
V..... h264_mf H264 via MediaFoundation (codec h264)
V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
V..... hap Vidvox Hap
V..... libx265 libx265 H.265 / HEVC (codec hevc)
V..... nvenc_hevc NVIDIA NVENC hevc encoder (codec hevc)
V..... hevc_amf AMD AMF HEVC encoder (codec hevc)
V..... hevc_mf HEVC via MediaFoundation (codec hevc)
V..... hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)
V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc)
VF.... huffyuv Huffyuv / HuffYUV
V..... jpeg2000 JPEG 2000
VF.... libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)
VF.... jpegls JPEG-LS
VF.... ljpeg Lossless JPEG
VF.... magicyuv MagicYUV video
VFS... mjpeg MJPEG (Motion JPEG)
V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)
V.S... mpeg1video MPEG-1 video
V.S... mpeg2video MPEG-2 video
V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)
V.S... mpeg4 MPEG-4 part 2
V..... libxvid libxvidcore MPEG-4 part 2 (codec mpeg4)
V..... msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
V..... msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)
V..... msvideo1 Microsoft Video-1
V..... pam PAM (Portable AnyMap) image
V..... pbm PBM (Portable BitMap) image
V..... pcx PC Paintbrush PCX image
V..... pgm PGM (Portable GrayMap) image
V..... pgmyuv PGMYUV (Portable GrayMap YUV) image
VF.... png PNG (Portable Network Graphics) image
V..... ppm PPM (Portable PixelMap) image
VF.... prores Apple ProRes
VF.... prores_aw Apple ProRes (codec prores)
VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores)
V..... qtrle QuickTime Animation (RLE) video
V..... r10k AJA Kona 10-bit RGB Codec
V..... r210 Uncompressed RGB 10-bit
V..... rawvideo raw video
V..... roqvideo id RoQ video (codec roq)
V..... rpza QuickTime video (RPZA)
V..... rv10 RealVideo 1.0
V..... rv20 RealVideo 2.0
V..... sgi SGI image
V..... snow Snow
V..... sunrast Sun Rasterfile image
V..... svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
V..... targa Truevision Targa image
V..... libtheora libtheora Theora (codec theora)
VF.... tiff TIFF image
VF.... utvideo Ut Video
V..... v210 Uncompressed 4:2:2 10-bit
V..... v308 Uncompressed packed 4:4:4
V..... v408 Uncompressed packed QT 4:4:4:4
V..... v410 Uncompressed 4:4:4 10-bit
V..... libvpx libvpx VP8 (codec vp8)
V..... libvpx-vp9 libvpx VP9 (codec vp9)
V..... vp9_qsv VP9 video (Intel Quick Sync Video acceleration) (codec vp9)
V..... libwebp_anim libwebp WebP image (codec webp)
V..... libwebp libwebp WebP image (codec webp)
V..... wmv1 Windows Media Video 7
V..... wmv2 Windows Media Video 8
V..... wrapped_avframe AVFrame to AVPacket passthrough
V..... xbm XBM (X BitMap) image
V..... xface X-face image
V..... xwd XWD (X Window Dump) image
V..... y41p Uncompressed YUV 4:1:1 12-bit
V..... yuv4 Uncompressed packed 4:2:0
VF.... zlib LCL (LossLess Codec Library) ZLIB
V..... zmbv Zip Motion Blocks Video
A..... aac AAC (Advanced Audio Coding)
A..... aac_mf AAC via MediaFoundation (codec aac)
A..... ac3 ATSC A/52A (AC-3)
A..... ac3_fixed ATSC A/52A (AC-3) (codec ac3)
A..... ac3_mf AC3 via MediaFoundation (codec ac3)
A..... adpcm_adx SEGA CRI ADX ADPCM
A..... adpcm_argo ADPCM Argonaut Games
A..... g722 G.722 ADPCM (codec adpcm_g722)
A..... g726 G.726 ADPCM (codec adpcm_g726)
A..... g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le)
A..... adpcm_ima_apm ADPCM IMA Ubisoft APM
A..... adpcm_ima_qt ADPCM IMA QuickTime
A..... adpcm_ima_ssi ADPCM IMA Simon & Schuster Interactive
A..... adpcm_ima_wav ADPCM IMA WAV
A..... adpcm_ms ADPCM Microsoft
A..... adpcm_swf ADPCM Shockwave Flash
A..... adpcm_yamaha ADPCM Yamaha
A..... alac ALAC (Apple Lossless Audio Codec)
A..... libopencore_amrnb OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band) (codec amr_nb)
A..... libvo_amrwbenc Android VisualOn AMR-WB (Adaptive Multi-Rate Wide-Band) (codec amr_wb)
A..... aptx aptX (Audio Processing Technology for Bluetooth)
A..... aptx_hd aptX HD (Audio Processing Technology for Bluetooth)
A..... comfortnoise RFC 3389 comfort noise generator
A..X.. dca DCA (DTS Coherent Acoustics) (codec dts)
A..... eac3 ATSC A/52 E-AC-3
A..... flac FLAC (Free Lossless Audio Codec)
A..... g723_1 G.723.1
A..... libgsm libgsm GSM (codec gsm)
A..... libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)
A..X.. mlp MLP (Meridian Lossless Packing)
A..... mp2 MP2 (MPEG audio layer 2)
A..... mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2)
A..... libtwolame libtwolame MP2 (MPEG audio layer 2) (codec mp2)
A..... libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3)
A..... libshine libshine MP3 (MPEG audio layer 3) (codec mp3)
A..... mp3_mf MP3 via MediaFoundation (codec mp3)
A..... nellymoser Nellymoser Asao
A..X.. opus Opus
A..... libopus libopus Opus (codec opus)
A..... pcm_alaw PCM A-law / G.711 A-law
A..... pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media
A..... pcm_f32be PCM 32-bit floating point big-endian
A..... pcm_f32le PCM 32-bit floating point little-endian
A..... pcm_f64be PCM 64-bit floating point big-endian
A..... pcm_f64le PCM 64-bit floating point little-endian
A..... pcm_mulaw PCM mu-law / G.711 mu-law
A..... pcm_s16be PCM signed 16-bit big-endian
A..... pcm_s16be_planar PCM signed 16-bit big-endian planar
A..... pcm_s16le PCM signed 16-bit little-endian
A..... pcm_s16le_planar PCM signed 16-bit little-endian planar
A..... pcm_s24be PCM signed 24-bit big-endian
A..... pcm_s24daud PCM D-Cinema audio signed 24-bit
A..... pcm_s24le PCM signed 24-bit little-endian
A..... pcm_s24le_planar PCM signed 24-bit little-endian planar
A..... pcm_s32be PCM signed 32-bit big-endian
A..... pcm_s32le PCM signed 32-bit little-endian
A..... pcm_s32le_planar PCM signed 32-bit little-endian planar
A..... pcm_s64be PCM signed 64-bit big-endian
A..... pcm_s64le PCM signed 64-bit little-endian
A..... pcm_s8 PCM signed 8-bit
A..... pcm_s8_planar PCM signed 8-bit planar
A..... pcm_u16be PCM unsigned 16-bit big-endian
A..... pcm_u16le PCM unsigned 16-bit little-endian
A..... pcm_u24be PCM unsigned 24-bit big-endian
A..... pcm_u24le PCM unsigned 24-bit little-endian
A..... pcm_u32be PCM unsigned 32-bit big-endian
A..... pcm_u32le PCM unsigned 32-bit little-endian
A..... pcm_u8 PCM unsigned 8-bit
A..... pcm_vidc PCM Archimedes VIDC
A..... real_144 RealAudio 1.0 (14.4K) (codec ra_144)
A..... roq_dpcm id RoQ DPCM
A..X.. s302m SMPTE 302M
A..... sbc SBC (low-complexity subband codec)
A..X.. sonic Sonic
A..X.. sonicls Sonic lossless
A..... libspeex libspeex Speex (codec speex)
A..X.. truehd TrueHD
A..... tta TTA (True Audio)
A..X.. vorbis Vorbis
A..... libvorbis libvorbis (codec vorbis)
A..... wavpack WavPack
A..... libwavpack (codec wavpack)
A..... wmav1 Windows Media Audio 1
A..... wmav2 Windows Media Audio 2
S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)
S..... ass ASS (Advanced SubStation Alpha) subtitle
S..... dvbsub DVB subtitles (codec dvb_subtitle)
S..... dvdsub DVD subtitles (codec dvd_subtitle)
S..... mov_text 3GPP Timed Text subtitle
S..... srt SubRip subtitle (codec subrip)
S..... subrip SubRip subtitle
S..... text Raw text subtitle
S..... webvtt WebVTT subtitle
S..... xsub DivX subtitles (XSUB)