ffmpeg-python
ffmpeg-python copied to clipboard
How do I concat without re-encoding?
I went through the process of converting all of my clips to a similar format already. I tried to add the c='copy' arg to ffmpeg.output and it re-encodes. It is using the concat filter under the hood so this makes sense, but stream copy can make this soooo much faster for me.
clip_streams = get_streams_from_dir(f'{clips_out_dir}/{width}x{height}')
joined = ffmpeg.concat(*clip_streams)
ffmpeg.output(joined, 'out.mp4', c='copy')
I looked into ffmpeg.run, but I am not quite sure how to use it to accomplish what I am looking for. So, back to the original question in the title...
How do I concat without re-encoding with this module?
Thank you so much! I am stuck.
Ya, I too am facing the same issue. Does anyone know how to concatenate using python library, without re-encoding?
This is the script that I used for remux
v = ffmpeg.input(video_path)
a = ffmpeg.input(audio_path)
ffmpeg.output(v, a, f'{parent}/merged.mp4', codec='copy').run(cmd="./ffmpeg")