master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.51k stars 155 forks source link

Vpxenc video desync issues. #772

Closed jkkma closed 1 year ago

jkkma commented 1 year ago

If you try to use vpxenc with av1an and the video is longer than two minutes the video will start synced but slowly desync with the audio. Using latest av1an on Windows 11.

silverbacknet commented 1 year ago

Would you be able to use the program MediaInfo to check the exact framerates of the original and encoded files? https://mediaarea.net/en/MediaInfo

jkkma commented 1 year ago

Hello @silverbacknet, thank you for replying. Ive checked with mediainfo and both videos show 50 fps as the target framerate, yet the desync on the encode remains. Ive possibly identified the issue though as the metadata of the encode somehow messing up FPS info, so i was recommended to remux the encode using mkvtoolnix and specifying the FPS there. And yes, this seems to fix the encode. So this might be a bug with libvpx itself and not av1an, but i dont know how to notify google devs of this, they dont seem to keep a standard github repo. Screenshot 2023-07-10 181036 Screenshot 2023-07-10 175921

master-of-zen commented 1 year ago

Make sure that you use -m lsmash chunking method

jkkma commented 1 year ago

Chunk generation method was set to lsmash and chunk merging method to mkvmerge.

Simulping commented 1 year ago

try using the "select" chunk method

jkkma commented 1 year ago

Tried it, still desynced. So far only remuxing and specifing FPS in mkvtoolnix worked.