Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change file extension for audio file and resizing parameters during… #1241

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/dancing_knights.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
# https://www.youtube.com/watch?v=lkY3Ek9VPtg => frontier.mp4

if not os.path.exists("knights.mp4"):
os.system("youtube-dl zvCvOC2VwDc -o knights.mp4")
os.system("youtube-dl lkY3Ek9VPtg -o frontier.mp4")
os.system("youtube-dl zvCvOC2VwDc -o knights")
os.system("youtube-dl lkY3Ek9VPtg -o frontier")
# ==========


# LOAD, EDIT, ANALYZE THE AUDIO


audio = (
AudioFileClip("frontier.mp4")
AudioFileClip("frontier.webm")
.subclip((4, 7), (4, 18))
.audio_fadein(1)
.audio_fadeout(1)
Expand All @@ -57,9 +57,9 @@


clip = (
VideoFileClip("./knights.mp4", audio=False)
VideoFileClip("./knights.webm", audio=False)
.subclip((1, 24.15), (1, 26))
.crop(x1=332, x2=910, y2=686)
.crop(x1=500, x2=1350)
)

video_period = find_video_period(clip, tmin=0.3)
Expand Down