0x00 problem description
Today we are compressing the video into different quality in the lab, so we need to use the
FFmpeg tool (we have to say that this tool is really powerful), but when we install it, we call out the following mistakes when we call it in Python script.
subprocess.CalledProcessError: Command 'ffmpeg -i /data/xiangtao/dataset/celeb-DF/0_Celeb-real/id0_0000.mp4 -vf select="eq(pict_type\,I)" -vsync vfr -qscale:v 2 -f image2 /data/xiangtao/dataset/tmp/VA-MLP/celeb-DF/11-12/id0_0000/%02d.jpg' returned non-zero exit status 127.
The reason is that
libx264 encoder is not installed,
Unknown encoder: "libx264"
Baidu has been trying several ways for a long time, most of the solutions have to be reinstalled
FFmpeg, then install the
libx264 Library in the process of installation, try it all wrong, and later discovered that there is a package in the python environment, then
ffmpeg will uninstall the python script, which calls for the use of this package. Based on this idea, I reinstalled the ffmpeg package and solved it perfectly!!!
0x02 specific steps
- if ffmpeg is available in the current Python environment, uninstall it first
pip uninstall ffmpeg or conda uninstall ffmpeg
pip install ffmpeg or conda install ffmpeg
0x03 some gossip
- [Solved] UserWarning: CUDA initialization: CUDA unknown error
- [Solved] RemoveError: ‘setuptools’ is a dependency of conda and cannot be removed from conda’s operating en
- [Solved] Vue3 Error: export ‘createRouter‘ was not found in ‘vue-router‘
- [Samtools] Run error: error while loading shared libraries: libcrypto.so.1.0.0 or libncurses.so.5 or libtinfow.so.5
- [Solved] removeerror: ‘requests’ is a dependency of CONDA and cannot be removed from
- How to Solve Pydicom Read Dicom File Error: OSError
- ffmpeg:error while loading shared libraries: libopenh264.so.5
- How to Solve jupyter notebook service error
- ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.23‘ not found
- Widgets are not available. Please install widgetsnbextension or ipywidgets 4.0
- [Solved] ‘pyopenssl’ is a dependency of conda and cannot be removed from requests’ is a dependency of conda
- Conda create New environment Error: An unexpected error has occurred. Conda has prepared the above report.
- Solution of adding H264 error in ffmpeg compilation
- RuntimeError: implement_array_function method already has a docstring(Pycharm install package error)
- [Solved] FFMPEG live encoding 2. session more error: [nvenc @ 0xa00480] OpenEncodeSessionEx failed: 0xa – invalid license key?
- [Solved] OpenCV Error: AttributeError: module ‘cv2‘ has no attribute ‘data‘
- 500 (International server error) server error in Flash + heroku
- The pip installation package under Windows reports an error: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
- Mac Error: sh: vue-cli-service: command not found
- M1 MacBook cannot use pip to install pandas [How to Solve]