Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

extract images #25

Open
jingwang97 opened this issue Sep 7, 2021 · 3 comments
Open

extract images #25

jingwang97 opened this issue Sep 7, 2021 · 3 comments

Comments

@jingwang97
Copy link

Hi,
when i use ffmpeg_video_read to extract the image,i specified a frame rate of 60,but i found the number of frames and the number of corresponding motions are unequal.
while if i don't specify fps,the number are equal.
i use gHO_sBM_c01/02...09_d19_mHO2_ch02 .mp4 and get 481 images,but smpl poses only have 480.so do i need to specify the frame rate?
Thanks!

@liruilong940607
Copy link
Contributor

Thanks for this great catch! I just fixed the small bug in the api.

The problem was from this line:

stream = ffmpeg.filter(stream, 'fps', fps=fps, round='up')

The round='up' argument causes one more frame in the end. I checked the timestamps data stored in the 2D keypoint pkl files and it turns out we were rounding down for the timestamps. So I just fixed this issue by updating the argument to round='down'.

@laubravo
Copy link

Hi,
I'm using the ffmpeg_video_to_images on the val set and for some videos (ex:gWA_sFM_c01_d26_mWA3_ch11) I get the correct number of frames when using round='down' and for others (ex: gBR_sBM_cAll_d05_mBR0_ch08) I need to use round='up'.
Do you know what is happening?

@liruilong940607
Copy link
Contributor

Hi thanks for reporting. I'm currently in a travel so will check it in a few days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants