jumpcutter icon indicating copy to clipboard operation
jumpcutter copied to clipboard

audio & video become out-of-sync

Open jpdeleon opened this issue 5 years ago • 3 comments

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

jpdeleon avatar Nov 23 '19 00:11 jpdeleon

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.

Lamaun avatar Nov 23 '19 09:11 Lamaun

Thanks @Lamaun this fixed my issue as well.

WaylonWalker avatar Dec 05 '19 17:12 WaylonWalker

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.

mrbesen avatar Dec 12 '19 11:12 mrbesen