Closed pbogut closed 11 months ago
Ah that makes sense, thank you for the report. Should be an easy fix
Should be fixed, pleas reopen if not
There was some issues with my previous fix, but should be good now
well, think it's still broken. will need to look closer another time
welp i keep thinking i'm going to stop working on it but keep having an idea. think it's fixed now--sorry for email spam :)
Thank you very much for this fix, looks like the audio is in sync with video now, that is great. I'v noticed however one issue (sorry). It looks like audio length is still of the original length and end of the clip is filled with silence (kind of).
I'm using this command to test it:
(sleep 15s; kill -USR1 wl-screenrec; sleep 10s; kill -INT wl-screenrec) &; cargo run -- -o DP-1 --audio --history 5 --audio-device "$(pactl get-default-sink).monitor"
What it does it starts recording with 5s buffer. After 15s sends USR1 (at this point clip should be 5 sec long). Sends INT after another 10 seconds. Should result with 15sec recording. What we get is 25s clip with first 15s of what we really want.
Then in mpv
it just jumps from 15s to 25s, so ends correctly just displays wrong duration.
When I import it to kdenlive
I have 25s clip with 10s of silence and one still frame at the end.
I can easly trim video after with
ffmpeg -ss 0 -t 15 -i screenrecord.mp4 -c:a copy -c:v copy screenrecord_trimed.mp4
So I'm not too much bothered with that.
Once again thanks for the desync fix. I can create separate issue for this if you think that's better to have it separated.
When using
--history
flag audio and video is loosing synchronisation.The problem seams to be that video is trimmed but audio is not, so if I start with
--history 30
and then will start recording 60 seconds later I will end up with 30second video clip and 60s audio clip. So video hangs on last frame 30 second into recording and then audio still plays.Hope that explanation maks sense, I can draw it or do some screenshots from kdenlive if its not clear enough.