KwaiVGI / LivePortrait

Bring portraits to life!
https://liveportrait.github.io
Other
11.94k stars 1.25k forks source link

The output video FPS is different in Windows and IOS #252

Open westNeighbor opened 1 month ago

westNeighbor commented 1 month ago

It may not be related to live portrait, but I want to point out this cause it's so weird. I noticed this cause the audio and mouse looks not sync very well when I transfer the output video to my iPad and iPhone from windows, after I checked the info, I found the FPS becomes a little smaller, 29.81 fps in iPad and iPhone instead of 30 fps in windows, you can see in the picture. But it shows encoded in 30 fps in MacOS, same as in windows and sync pretty well.

IMG_7065

I also did some tests by reframe it to 30 fps through video editing software, 剪映 and DaVinci Resolve, output from 剪映 shows 29.9 fps in iPad and iPhone, while output from DaVinci Resolve does show 30 fps.

It may be just the iOS or iPadOS encoding side cause the macOS does show 30 fps.

The below video is the original output from live portrait (without any editing).

https://github.com/user-attachments/assets/f62e92a3-05ff-4eb7-925a-447fe87923cd

cleardusk commented 1 month ago

Thanks for your feedback @westNeighbor . I’m experiencing the same issue. It’s weird, the core code is shown below. imageio uses ffmpeg by default.

https://github.com/KwaiVGI/LivePortrait/blob/3f394785fba66e9ab99b32cd72e53b6d89062340/src/utils/video.py#L25-L47