You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently encountered a significant difference in processing time when extracting a 70-second clip from a video using different methods. Utilizing MoviePy's subclip and write_videofile functions took over 20 seconds to complete the task. In stark contrast, invoking FFmpeg through subprocess with the -c copy command on the same file and clip took merely milliseconds.
How can I achieve similar efficiency using MoviePy? Currently, I observe that writing at the original speed is approximately 90 iterations per second (it/s), but when I introduce final_duration to expedite the process, the speed drops drastically to just a few it/s, which is considerably slower.
If there is no way to enhance the speed, I would appreciate an explanation of the design philosophy and benefits behind MoviePy's chosen architecture. Specifically, what are the intended advantages of this approach?
here is the python code demo clip = VideoFileClip(video_paths[0]).subclip(0, 70) clip.write_videofile("my_new_video.mp4")
here is the subprocess params for FFmpeg cmd=[ ffmpeg_path, '-i', input_video_path, '-c', 'copy', '-map', '0','-ss',str(start_time) , '-t', str(duration), '-q:v', '0', output_video_path,'-y', ]
The text was updated successfully, but these errors were encountered:
I recently encountered a significant difference in processing time when extracting a 70-second clip from a video using different methods. Utilizing MoviePy's subclip and write_videofile functions took over 20 seconds to complete the task. In stark contrast, invoking FFmpeg through subprocess with the -c copy command on the same file and clip took merely milliseconds.
How can I achieve similar efficiency using MoviePy? Currently, I observe that writing at the original speed is approximately 90 iterations per second (it/s), but when I introduce final_duration to expedite the process, the speed drops drastically to just a few it/s, which is considerably slower.
If there is no way to enhance the speed, I would appreciate an explanation of the design philosophy and benefits behind MoviePy's chosen architecture. Specifically, what are the intended advantages of this approach?
here is the python code demo
clip = VideoFileClip(video_paths[0]).subclip(0, 70) clip.write_videofile("my_new_video.mp4")
here is the subprocess params for FFmpeg
cmd=[ ffmpeg_path, '-i', input_video_path, '-c', 'copy', '-map', '0','-ss',str(start_time) , '-t', str(duration), '-q:v', '0', output_video_path,'-y', ]
The text was updated successfully, but these errors were encountered: