Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Collaborator

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
Collaborator

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

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

No branches or pull requests

3 participants