Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster video and audio join #2

Open
mwullink opened this issue Jul 24, 2020 · 1 comment
Open

faster video and audio join #2

mwullink opened this issue Jul 24, 2020 · 1 comment

Comments

@mwullink
Copy link

hi great tool, thx.

only dowsnside is that the joining of the audio and video files with ffmpeg takes too long and is very cpu heavy.

the easier and faster way is to use mkvmerge, with this it will only take a few secs to join the files.

install mkvmerge on mac with brew: https://formulae.brew.sh/cask/mkvtoolnix

print('Combining video and audio...')
cmd = 'mkvmerge -o ' + output_file
cmd += ' '
cmd += filenameAudio
cmd += ' '
cmd += filenameVideo

@tskir
Copy link
Contributor

tskir commented Aug 1, 2020

Hi @mwullink! Originally this script did indeed use simple concatenation of segments (using ffmpeg -c:v copy -c:a aac, which I believe is equivalent to what mkvmerge is doing, and which also takes a couple of seconds). Unfortunately, what I discovered is that with this approach, about one out of every 5-10 downloaded videos becomes broken, especially if they are long ones. This probably has to do with how Vimeo splits files into chunks in the first place, maybe it does not always correctly handle key frames or some other features.

Because of this, the script was changed to always recode the input files. See https://github.com/AbCthings/vimeo-audio-video/pull/1/files.

Could you verify that with mkvmerge, downloading a few dozen long(ish) videos does not result in them being broken? By not broken I mean that if you start downloaded video playback and then skip almost to the very end, both video & audio should still play and be in sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants