jumpcutter
jumpcutter copied to clipboard
audio & video become out-of-sync
Hi,
It seems the audio and video get compressed in different rate somehow such that the end the final output, the video and audio became out-of-sync:
try for example , --url=https://www.youtube.com/watch?v=EYEHUOpwNvE
This project doesn't have an automatic frame rate detection (despite carykh claiming so in the video) Your input video had 24 fps, while jumpcutter guessed it was 30 fps. You could try a fork which automatically detects framerate. Otherwise just call jumpcutter like this:
python3 jumpcutter.py --url=https://www.youtube.com/watch?v=EYEHUOpwNvE --frame_rate 24
As the bells in your video are very loud and probably the only thing you want to hear, you also need quite an extreme value for the silent threshold. (The default value is 0.03 which means 3 % of the max audio amplitude) I would recommend something like --silent_threshold 0.4 for your video.
Thanks @Lamaun this fixed my issue as well.
i guess the problem lies in line:
https://github.com/carykh/jumpcutter/blob/136df102fe9f94a83abf6825f798adf313ce4178/jumpcutter.py#L102
because he uses the static input.mp4
to read the parameters, i think this should be the variable INPUT_FILE
or something else. Then the framerate detection may work.