megvii-research / megactor

Apache License 2.0
581 stars 78 forks source link

Output video length doesn't sync driving video #21

Closed linthmwan closed 2 days ago

linthmwan commented 2 days ago

Hi, I use your sample code and run on test_data. However, I found that the output video is only one second, but the driving video length is 6 seconds.

https://github.com/megvii-research/megactor/assets/114485232/ae3b2ee7-a41a-4561-b199-18351ab5471b

Is there any fps or frame rounding setting in the code that cause this issue?

lhd777 commented 2 days ago

This is due to the limitation we placed on the length of the input driven in the online demo, owing to various constraints associated with it. You could simply remove the length limit, thereby enabling the generation of longer videos: https://github.com/megvii-research/megactor/blob/main/eval.py#L77

BTW, another reason might be we save the output video at fps=25 setting. And if the fps of your input driven video lower than 25, the generated video might be shorter. https://github.com/megvii-research/megactor/blob/main/eval.py#L220

linthmwan commented 2 days ago

Nice~ Thank you for finding the root cause.