File: preview.py

package info (click to toggle)
moviepy 2.1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 96,920 kB
  • sloc: python: 10,566; makefile: 150; sh: 6
file content (13 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from moviepy import *

myclip = VideoFileClip("./example.mp4").subclipped(0, 1)  # Keep only 0 to 1 sec

# We preview our clip as a video, inheriting FPS and audio of the original clip
myclip.preview()

# We preview our clip as video, but with a custom FPS for video and audio
# making it less consuming for our computer
myclip.preview(fps=5, audio_fps=11000)

# Now we preview without audio
myclip.preview(audio=False)