dvershinin / green-recorder

A simple screen recorder for Linux desktop. Supports Wayland & Xorg
GNU General Public License v3.0
57 stars 3 forks source link

When recording using mp4 format, there is a shift between video and audio. #11

Closed FredBezies closed 3 years ago

FredBezies commented 3 years ago

Hello.

I noticed this behavior while recording a video for some tests.

Audio seems to start two or three seconds before related video is rendered.

I attached two videos of a game in Vice. You can hear the title music two or three seconds before the title screen is shown.

I'm facing this behaviour in both Wayland and X11. I compressed the file using zip, mp4 file were marked as corrcupted :( wayland.zip x11.zip

dvershinin commented 3 years ago

@FredBezies I couldn't actually reproduce this, but what I did see were sporadic invalid moov atom errors...

I believe this is due to FFmpeg being killed not gracefully and so I tried to add some code to do it in a better fashion.

See if there's an improvement with the latest commit.

FredBezies commented 3 years ago

@FredBezies I couldn't actually reproduce this, but what I did see were sporadic invalid moov atom errors...

I believe this is due to FFmpeg being killed not gracefully and so I tried to add some code to do it in a better fashion.

See if there's an improvement with the latest commit.

Looks like it is fixed. No more shift between sound and picture. Thanks.