![如何在conda環境下使用libx264 ffmpeg?](https://rvso.com/image/1586922/%E5%A6%82%E4%BD%95%E5%9C%A8conda%E7%92%B0%E5%A2%83%E4%B8%8B%E4%BD%BF%E7%94%A8libx264%20ffmpeg%EF%BC%9F.png)
我嘗試將 avi 視訊文件轉換為 h264 處理的 mp4 文件,但遇到以下錯誤:
$ ffmpeg -i sa1-video-fram1.avi -c:v libx264 -crf 19 -c:a libfdk_aac -b:a 192k -ac 2 out.mp4
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.2.0 (crosstool-NG fa8859cb)
configuration: --prefix=/home/anaconda2_new/envs/faceswap-GAN --cc=/opt/conda/conda-bld/ffmpeg_1531088893642/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-shared --enable-static --enable-zlib --enable-pic --enable-gpl --enable-version3 --disable-nonfree --enable-hardcoded-tables --enable-avresample --enable-libfreetype --disable-openssl --disable-gnutls --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --disable-libx264
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, avi, from 'sa1-video-fram1.avi':
Metadata:
encoder : Lavf57.83.100
Duration: 00:00:04.93, start: 0.000000, bitrate: 359 kb/s
Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 512x384, 280 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 16000 Hz, mono, fltp, 69 kb/s
Unknown encoder 'libx264'
因此,我透過執行以下命令安裝了 libx264:
conda install -c conda-forge x264
但它並不能解決上面的錯誤。
問題:
如何在conda環境下使用libx264 ffmpeg?