【发布时间】:2020-08-25 10:01:23
【问题描述】:
由于某种原因,设置 ffmpeg 二进制文件的路径并不完全有效。
虽然它看起来像它应该的那样工作:
import skvideo.io
import skvideo.datasets
ffmpeg_path = "C:/Users/xyz/ffmpeg-4.3.1-win64-static/bin/"
skvideo.setFFmpegPath(ffmpeg_path)
print("FFmpeg path: {}".format(skvideo.getFFmpegPath()))
print("FFmpeg version: {}".format(skvideo.getFFmpegVersion()))
>>> FFmpeg path: C:/Users/xyz/ffmpeg-4.3.1-win64-static/bin/
>>> FFmpeg version: b'4'.b'3'.b'1'
在不直接运行这些行之后:
videodata = skvideo.io.vread(skvideo.datasets.bigbuckbunny())
print(videodata.shape)
[...]
>>> File "C:\Users\xyz\Anaconda3\envs\cv_env\lib\site-packages\skvideo\io\io.py", line 133, in vread
assert _HAS_FFMPEG, "Cannot find installation of real FFmpeg (which comes with ffprobe)."
>>> AssertionError: Cannot find installation of real FFmpeg (which comes with ffprobe).
想不通,为什么设置不正确……
【问题讨论】: