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"
0x01 solution
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
Reinstall
pip install ffmpeg
or
conda install ffmpeg
0x03 some gossip
Read More:
- [Solved] Ubuntu uses gym to save the video error: “unknown encoder ‘libx264′”
- QT calls the API of ffmpeg error [How to Solve]
- ffmpeg:error while loading shared libraries: libopenh264.so.5
- Solution of adding H264 error in ffmpeg compilation
- [Solved] FFMPEG live encoding 2. session more error: [nvenc @ 0xa00480] OpenEncodeSessionEx failed: 0xa – invalid license key?
- [Solved] ffmpeg Enable https Error: “ERROR: openssl not found”
- [Solved] MacOS Compile ffmpeg Error: ERROR: openssl not found
- [Solved] OpenCV VideoWriter Error: FFMPEG: tag ‘MP4V‘ is not supported with codec id 12 and format mp4
- [Solved] Brew Install ffmpeg Error: tar: Error opening archive: Failed to open
- [Solved] redis.exceptions.ResponseError: unknown command `KEYS`
- [Solved] appium Error: An unknown server-side error occurred while processing the command
- SpringBoot Error running ‘Application’: Command line is too long.Shorten command line for
- [Solved] Latex&VScode Error: I found no bibdata command//command//citation—while reading file*.aux
- [Solved] UserWarning: CUDA initialization: CUDA unknown error
- [Solved] Error running XxlJobExecutorHiveApplication. Command line is too long. Shorten the command line via
- The problem of error reporting caused by fluent swift
- Error running ‘PigSellCabinetApplication’: Command line is too long. Shorten command line for PigSellCabinetApplication or also for Spring Boot default configuration
- [Solved] C# Access Mongodb Database Error: command find failed: Command find requires authentication
- [Solved] Error running ‘WebApplication‘: Command line is too long. Shorten command line for WebApplication or
- Solutions to error reporting after adding comments to XML files