mismatch frame rate (output & original)

Getting errors or found a bug when converting faces from a trained model? Post about them here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Convert process. If you want to get tips, or better understand the Convert process, then you should look in the Convert Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
damingxing
Posts: 23
Joined: Mon Jun 13, 2022 8:55 pm
Has thanked: 6 times

mismatch frame rate (output & original)

Post by damingxing »

I found the converted video has a different frame rate than the original video. The original video is 26 fps (don't ask me why) and the converted video is 29.997 fps.

I used FFmpeg to convert. Is there a place we can specify the output frame rate to match the original video's frame rate?

Thanks.

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: mismatch frame rate (output & original)

Post by torzdf »

No. This should happen automatically. The process reads the input's frame rate. If it is outputting at an incorrect framerate, then most likely it is misreporting.

I would suggest using "open-cv" writer to output converted frames, and then use ffmpeg (either the Effmpeg tool in Faceswap, or ffmpeg itself) to turn these frames back into a video.

My word is final

User avatar
damingxing
Posts: 23
Joined: Mon Jun 13, 2022 8:55 pm
Has thanked: 6 times

Re: mismatch frame rate (output & original)

Post by damingxing »

Thanks for the response. I changed the option to "opencv" now, but there are some duplicated frames after the convert. Do you happen to know what may cause that and how I can solve this? Thanks

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: mismatch frame rate (output & original)

Post by torzdf »

Duplicate frames usually happen because, at some point (probably before you even received it), the video has been converted from one frame rate to another. It is very common.

Read more here:
https://helpcenter.extremereach.com/hc/ ... ate-Frames

My word is final

User avatar
damingxing
Posts: 23
Joined: Mon Jun 13, 2022 8:55 pm
Has thanked: 6 times

Re: mismatch frame rate (output & original)

Post by damingxing »

Thank you for the information.

It seems that the duplicated frames are not exactly the same.

The background from video A is the same as the previous frame, but the face is a little different from the previous one.

If I want the output video to have the synced body movement with the original video but with a different face, is there any way I can accomplish that?

Thank you.

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: mismatch frame rate (output & original)

Post by torzdf »

I'm not entirely sure what you mean.

If you mean that the wrong face is being swapped on (i.e. the face being swapped on is from a previous/next frame) then this is not something I've heard of before, and would suggest an issue with your video file. The process basically goes through the video frame by frame swapping the faces. It shouldn't be possible for it to be out of sync.

The best I could suggest, at this point, is to re-encode the video with a known framerate and generate a new alignments file for your re-encoded video

My word is final

Locked