ORB-HD / deface

Video anonymization by face detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fps option not working

mysablehats opened this issue · comments

I've installed the latest version from the github, so I could use the fps option. I did something simplistic like:

deface plain01.2125294.20220419131915.avi --ffmpeg-config '{"codec": "libx264","fps": 100}'

Which did produce a video with 100fps, however it is sped up, instead of having all the frames from the original video.

What I think is happening, is that the reader is not reading all the 100fps and when playing and this is why.

So I put a print(meta) statement and it is in fact not read as the appropriate fps (in my case it was being read as 25fps, even though the video is 100fps).

I did a very quick fix which is available in my fork :

https://github.com/mysablehats/deface

It worked for me for 60, 100 and even 120 fps (it was running out of frames, but it still managed to produce a playable video with the same duration).

Hope this helps, cheers!

Thank you! Closing because #28 is now merged. I don't have test videos for these cases but the fix looks reasonable and it doesn't cause any problems with my test inputs.