在moviepy中使用fl_time進行諸如快播、慢播、倒序播放等時間特效處理時報錯:
OSError: MoviePy error: failed to read the first frame of video file F:\video\WinBasedWorkHard_src.mp4. That might mean that the file is corrupted. That may also mean that you are using a deprecated version of FFMPEG. On Ubuntu/Debian for instance the version in the repos is deprecated. Please update to a recent version from the website.
之所以出現這個報錯,估計是因為使用fl_time對時間變換時,從原剪輯的0-end時間段讀取幀時,原剪輯end這個時間位置已經到視頻結尾,可能沒有有效的幀,導致讀取視頻時報錯。解決方案就是將end位置稍微往后退一點,退一個幀就夠了。
更多時間特效的處理請參考《moviepy音視頻剪輯:使用fl_time進行諸如快播、慢播、倒序播放等時間特效處理的原理和可能遇到的坑》