Closed harrodjordan closed 3 years ago
Might be an issue with your OpenCV library. Did you try installing it from source like in the installation guide?
Yep, same issue. Also tried installing the contrib and headless versions from source with the same error - was never able to resolve the issue and ended up switching to a different faceswap method.
In running the following code:
python ~/data/projects/fsgan/inference/reenact.py ~/data/datasets/tom_noaudio.mp4 -t ~/data/datasets/ts_noaudio.mp4 -o ~/data/outputs/out1.mp4 --encoder_codec mp4v
I consistently get the following error message during the pre-process videos step: "AssertionError: Failed to read frame from video in index: 53" It seems to be an error with opencv, and has persisted when opencv was installed using pip as well as when building it from source. I am using Ubuntu 16.04
I've tried re-encoding the video using
ffmpeg -i <input> -r 25 <output>
, as well as using--encoder_codec mp4v
, and neither have worked. The videos were originally exported as h.264, 25fps, with the video encoded as avc1 and the audio as mp4, so I also tried stripping the audio using ffmpeg and using only the avc1 video, which also didn't work. I've tried those listed in #3 as well, with no success.I plan to try exporting them as mpeg4 files tomorrow, but I wanted to see whether there was another known workaround for this issue.
I've included a truncated version of the full output below, only removing some of the "h.264 @" warnings for brevity: