title: python cut portion of video "Fastest way"
body: <p>I'm trying to cut out portion of video file using python(3.7.1) and ffmpeg in my flask (1.0.2) application,
  this is solution 1</p>
  
  <pre><code>    # solution 1
      from moviepy.editor import *
      from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
  
      video = VideoFileClip('/app/videos/video.mkv'.subclip(10, 20)
      video.write_videofile('/app/videos/cutted_video.mp4')
  </code></pre>
  
  <p>and here is result in flower panel screenshot.
  as you can see cutting out two videos takes more than two seconds.
  <a href="https://i.stack.imgur.com/XRO0p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XRO0p.png" alt="enter image description here"></a>
  and this is solution 2 </p>
  
  <pre><code>    # solution 2
      from moviepy.editor import *
      from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
  
  
      ffmpeg_extract_subclip(
          '/app/videos/video.mkv',
          10,
          20,
          '/app/videos/cutted_video.mp4'
      )
  </code></pre>
  
  <p>first solution works pretty well, but It takes about 1-2 seconds to cut the video out.
  instead second solution works very fast ( less than 0.5 sec ) but the output video is just audio plus black screen.</p>
  
  <p>what is the fastest way to cut portion of video in python.
  If there is any other library which is faster please tell me that.</p>