Hello Zulko and other contributors of this awesome package,
I want to know if it's possible to detect if the mov-atom of a mp4 video is placed at the beginning and if not it should be moved to the beginning with this package?
I need to optimize my mp4 videos and I came across this post. https://rigor.com/blog/2016/01/optimizing-mp4-video-for-fast-streaming
The author said moving mov-atom to the front is the best. Any idea if it will be possible with moviepy?
Hello @bobozar!
As the article you linked to above states, in order to ensure the atom data is positioned at the beginning of your mp4 files, you'll want to use the faststart flag.
You can make use of custom ffmpeg parameters like faststart by providing the ffmpeg_parameters list to .write_videofile:
.write_videofile(
file,
ffmpeg_params=['-movflags', 'faststart'])
Thanks
Thanks @mbeacom mbeacom. Will look into it. And report back.
When I need to convert a video to other formats like webm, should I convert before or after optimization? does it matter?
@prionkor Please always open a separate issue instead of commenting on an existing one if you are not experiencing the same problem as OP. There's also usually little point to commenting on already closed issues.
Most helpful comment
Hello @bobozar!
As the article you linked to above states, in order to ensure the atom data is positioned at the beginning of your mp4 files, you'll want to use the
faststartflag.You can make use of custom ffmpeg parameters like
faststartby providing theffmpeg_parameterslist to.write_videofile:Thanks