Hello,
when I'm concatenating lets say 15-20 clips together, i noticed that on each clip, there is a really low quality at the start (first 1-2 seconds) and end (last 1 second) of the clips.
the only arguments im using on write_videofile are:
codec='mpeg4',
bitrate="5000k",
threads=8,
temp_audiofile=final_video_file_name.replace("mp4", "mp3")
is this an known thing? I would love to know what i have to do in order to keep the quality always similar.
Many thanks
Sorry, I've never seen that problem before. Would it be possible to post the code, and the input and output media files?
here is an example https://www.youtube.com/watch?v=m63_8e2Cgfc
as you can see, every time the transition video at the end gets blurry and the new clip needs 1-2 seconds untill its really sharp. Im using the settings above for each clip.
I see what you mean. I imagine that the problem is to do with the compression used by FFmpeg. Perhaps try experimenting with a different codecs and file extensions. There's a few examples here: https://github.com/Zulko/moviepy/blob/a1df46d96b34bbdd7869854705ee9c18788c2838/moviepy/video/VideoClip.py#L186.
Other than that, I'm not really sure what to suggest...
yeah, you were right again and tbh i remember now having better quality before i started using mpeg4 codec. I just switched back to xlib264 (default) and the quality is much higher. Pretty strange since the documentation explicitly says mpeg4 has produces better quality for mp4.
Yeah, it is strange that the documentation says that.
Most helpful comment
yeah, you were right again and tbh i remember now having better quality before i started using mpeg4 codec. I just switched back to xlib264 (default) and the quality is much higher. Pretty strange since the documentation explicitly says mpeg4 has produces better quality for mp4.