From a8c46da758c451e5710631f5869022908c7e67ff Mon Sep 17 00:00:00 2001 From: Kerstin Kollmann Date: Fri, 24 Feb 2017 00:43:49 +0100 Subject: [PATCH] fix YT embeds: replace AS3 objects w iframes, mixed content (http -> https) --- docs/examples/compo_from_image.rst | 10 +--------- docs/examples/dancing_knights.rst | 4 ++-- docs/examples/example_with_sound.rst | 10 +--------- docs/examples/headblur.rst | 10 +--------- docs/examples/logo.rst | 12 ++---------- docs/examples/masked_credits.rst | 25 +++---------------------- docs/examples/moving_letters.rst | 11 +---------- docs/examples/painting_effect.rst | 10 +--------- docs/examples/severalCharacters.rst | 11 +---------- docs/examples/star_worms.rst | 24 +++--------------------- docs/examples/the_end.rst | 14 +++----------- docs/examples/ukulele_concerto.rst | 11 +---------- docs/gallery.rst | 22 +++++++++++----------- docs/getting_started/compositing.rst | 28 ++++++++++++++-------------- docs/index.rst | 8 ++++---- 15 files changed, 49 insertions(+), 161 deletions(-) diff --git a/docs/examples/compo_from_image.rst b/docs/examples/compo_from_image.rst index 8d3cd24c9..45916416d 100644 --- a/docs/examples/compo_from_image.rst +++ b/docs/examples/compo_from_image.rst @@ -7,15 +7,7 @@ So how do you do some complex compositing like this ? .. raw:: html -
- - -
+
It takes a lot of bad taste, and a segmenting tool diff --git a/docs/examples/dancing_knights.rst b/docs/examples/dancing_knights.rst index f18c6ec2c..e52e6572a 100644 --- a/docs/examples/dancing_knights.rst +++ b/docs/examples/dancing_knights.rst @@ -6,9 +6,9 @@ And now for something very silly... .. raw:: html -
-
diff --git a/docs/examples/example_with_sound.rst b/docs/examples/example_with_sound.rst index fe0a2a1f5..6a54bb68d 100644 --- a/docs/examples/example_with_sound.rst +++ b/docs/examples/example_with_sound.rst @@ -7,15 +7,7 @@ An example of using MoviePy to assemble movie clips with sounds. Here are two sc .. raw:: html -
- - -
+
Here is the code: diff --git a/docs/examples/headblur.rst b/docs/examples/headblur.rst index 5c4285520..11f9d22df 100644 --- a/docs/examples/headblur.rst +++ b/docs/examples/headblur.rst @@ -4,15 +4,7 @@ Tracking and blurring someone's face .. raw:: html -
- - -
+
First we will need to track the face, i.e. to get two functions ``fx`` and ``fy`` such that ``(fx(t),fy(t))`` gives the position of the center of the head at time ``t``. This will be easily done with `manual_tracking`. Then we will need to blur the area of the video around the center of the head. diff --git a/docs/examples/logo.rst b/docs/examples/logo.rst index 1ee4c5fe0..a47f40026 100644 --- a/docs/examples/logo.rst +++ b/docs/examples/logo.rst @@ -3,16 +3,8 @@ MoviePy logo with a moving shadow ================================= .. raw:: html -
- - -
+
Here the logo is a picture, while the shadow is actually a black rectangle taking the whole screen, overlaid over the logo, but with a moving mask composed of a bi-gradient, such that only one (moving) part of the rectangle is visible. See :ref:`gradients` for the code of the function `biGradient`: :: - + diff --git a/docs/examples/masked_credits.rst b/docs/examples/masked_credits.rst index d2649c593..838c7319a 100644 --- a/docs/examples/masked_credits.rst +++ b/docs/examples/masked_credits.rst @@ -5,32 +5,13 @@ Partially Hidden credits .. raw:: html -
- - -
+
First, see in :ref:`autocredits` how to make credits automatically with MoviePy. Before seeing the code for this video, here is a tutorial video that explains the different steps (also made with MoviePy): - -.. raw:: html - -
- - -
- +.. raw:: html +
And here is the code: diff --git a/docs/examples/moving_letters.rst b/docs/examples/moving_letters.rst index 0b4f910f9..1479aea22 100644 --- a/docs/examples/moving_letters.rst +++ b/docs/examples/moving_letters.rst @@ -6,16 +6,7 @@ I think this example illustrates well the interest of script-based editing (imag .. raw:: html -
- - -
- +
Here is the code: diff --git a/docs/examples/painting_effect.rst b/docs/examples/painting_effect.rst index a27737a20..127a22cdb 100644 --- a/docs/examples/painting_effect.rst +++ b/docs/examples/painting_effect.rst @@ -6,15 +6,7 @@ That's an effect that we have seen a lot in westerns and such. .. raw:: html -
- - -
+
The recipe used to make a photo look like a painting: diff --git a/docs/examples/severalCharacters.rst b/docs/examples/severalCharacters.rst index 290443459..48f9e1975 100644 --- a/docs/examples/severalCharacters.rst +++ b/docs/examples/severalCharacters.rst @@ -6,15 +6,6 @@ Character duplication in a video .. raw:: html -
- - -
- +
So blabla diff --git a/docs/examples/star_worms.rst b/docs/examples/star_worms.rst index 71f7b4c91..68a2d4c7e 100644 --- a/docs/examples/star_worms.rst +++ b/docs/examples/star_worms.rst @@ -1,36 +1,18 @@ A Star-Wars like opening title ------------------------------- -This is an approximate effect (the perspective would require some more complex transformations) but it is a nice exercise. +This is an approximate effect (the perspective would require some more complex transformations) but it is a nice exercise. Warning: clip with sound. .. raw:: html -
- - -
- Let us also have a look at this tutorial which shows the different steps: .. raw:: html -
- - -
- +
+ And here you are for the code, and for the code of the tutorial. .. literalinclude:: ../../examples/star_worms.py diff --git a/docs/examples/the_end.rst b/docs/examples/the_end.rst index ef129b202..e89fd4f79 100644 --- a/docs/examples/the_end.rst +++ b/docs/examples/the_end.rst @@ -4,21 +4,13 @@ .. raw:: html -
- - -
- +
+ So let's explain this one: there is a clip with "The End" written in the middle, and *above* this clip there is the actual movie. The actual movie has a mask which represents a white (=opaque) circle on a black (=transparent) background. At the begining, that circle is so large that you see all the actual movie and you don't see the "The End" clip. Then the circle becomes progressively smaller and as a consequence you see less of the actual movie and more of the "The End" clip. - + .. literalinclude:: ../../examples/the_end.py diff --git a/docs/examples/ukulele_concerto.rst b/docs/examples/ukulele_concerto.rst index 25c270416..707493f75 100644 --- a/docs/examples/ukulele_concerto.rst +++ b/docs/examples/ukulele_concerto.rst @@ -4,16 +4,7 @@ A simple music video .. raw:: html -
- - -
- +
This is an example, with no sound (lame for a music video), soon to be replaced with a real music video example (the code will be 99% the same). diff --git a/docs/gallery.rst b/docs/gallery.rst index 786924ff6..6bdf83068 100644 --- a/docs/gallery.rst +++ b/docs/gallery.rst @@ -17,9 +17,9 @@ This mix of 60 covers of the Cup Song demonstrates the non-linear video editing .. raw:: html -
-
@@ -33,7 +33,7 @@ in the :ref:`examples`. .. raw:: html
-
@@ -86,7 +86,7 @@ With Vapory and MoviePy you can for instance embed a movie in a 3D scene: .. raw:: html
-
@@ -106,7 +106,7 @@ Or use `this script `_ to ma .. raw:: html
-
@@ -129,7 +129,7 @@ This `blog post - @@ -142,7 +142,7 @@ Misc. Programs and Scripts using MoviePy Rinconcam ---------- -`Rincomcam `_ is a camera which films surfers on the Californian beach of Point Rincon. At the end of each day it cuts together a video, puts it online, and tweets it. Everything is entirely automatized with Python. +`Rincomcam `_ is a camera which films surfers on the Californian beach of Point Rincon. At the end of each day it cuts together a video, puts it online, and tweets it. Everything is entirely automatized with Python. MoviePy is used to add transitions, titles and music to the videos. @@ -160,7 +160,7 @@ Videogrep is a python script written by Sam Lavigne, that goes through the subti .. raw:: html
-
@@ -171,7 +171,7 @@ Here are `Videogrep's introductory blog post If you liked it, also have a look at these Videogrep-inspired projects: This `blog post `_ attempts to cut a video precisely at the beginning and end of sentences or words: :: - + words = ["Americans", "must", "develop", "open ", "source", " software", "for the", " rest ", "of the world", "instead of", " soldiers"] @@ -183,7 +183,7 @@ This `blog post - @@ -194,7 +194,7 @@ This `other post - diff --git a/docs/getting_started/compositing.rst b/docs/getting_started/compositing.rst index feb2c3198..f064527f8 100644 --- a/docs/getting_started/compositing.rst +++ b/docs/getting_started/compositing.rst @@ -8,7 +8,7 @@ Video composition, also known as non-linear editing, is the fact of playing seve .. raw:: html
-
@@ -21,7 +21,7 @@ Stacking and concatenating clips Two simple ways of putting clips together is to concatenate them (to play them one after the other in a single long clip) or to stack them (to them side by side in a single larger clip). Concatenation is done with the function ``concatenate_videoclips``: :: - + from moviepy.editor import VideoFileClip, concatenate_videoclips clip1 = VideoFileClip("myvideo.mp4") clip2 = VideoFileClip("myvideo2.mp4").subclip(50,60) @@ -33,7 +33,7 @@ Concatenation is done with the function ``concatenate_videoclips``: :: The ``final_clip`` is a clip that plays the clips 1, 2, and 3 one after the other. Note that the clips do not need to be the same size. If they arent's they will all appear centered in a clip large enough to contain the biggest of them, with optionnally a color of your choosing to fill the borders. You have many other options there (see the doc of the function). You can for instance play a transition clip between the clips with the option ``transition=my_clip``. Stacking is done with ``clip_array``: :: - + from moviepy.editor import VideoFileClip, clips_array, vfx clip1 = VideoFileClip("myvideo.mp4").margin(10) # add 10px contour clip2 = clip1.fx( vfx.mirror_x) @@ -53,9 +53,9 @@ CompositeVideoClips ~~~~~~~~~~~~~~~~~~~~~ The `CompositeVideoClip` class provides a very flexible way to compose clips, but is more complex than ``concatenate_videoclips`` and ``clips_array`` :: - + video = CompositeVideoClip([clip1,clip2,clip3]) - + Now ``video`` plays ``clip1``, and ``clip2`` *on top of* ``clip1``, and ``clip3`` on top of ``clip1``, and ``clip2``. For instance, if ``clip2`` and ``clip3`` have the same size as ``clip1``, then only ``clip3``, which is on top, will be visible in the video... unless ``clip3`` and ``clip2`` have masks which hide parts of them. Note that by default the composition has the size of its first clip (as it is generally a *background*). But sometimes you will want to make your clips *float* in a bigger composition, so you will specify the size of the final composition as follows :: video = CompositeVideoClip([clip1,clip2,clip3], size=(720,460)) @@ -64,8 +64,8 @@ Starting and stopping times """""""""""""""""""""""""""" In a CompositionClip, all the clips start to play at a time that is specified by the ``clip.start`` attribute. You can set this starting time as follows: :: - - clip1 = clip1.set_start(5) # start after 5 seconds + + clip1 = clip1.set_start(5) # start after 5 seconds So for instance your composition will look like :: @@ -74,7 +74,7 @@ So for instance your composition will look like :: clip3.set_start(9)]) # start at t=9s In the example above, maybe ``clip2`` will start before ``clip1`` is over. In this case you can make ``clip2`` appear with a *fade-in* effect of one second: :: - + video = CompositeVideoClip([clip1, # starts at t=0 clip2.set_start(5).crossfadein(1), clip3.set_start(9).crossfadein(1.5)]) @@ -83,15 +83,15 @@ Positioning clips """""""""""""""""" If ``clip2`` and ``clip3`` are smaller than ``clip1``, you can decide where they will appear in the composition by setting their position. Here we indicate the coordinates of the top-left pixel of the clips: :: - + video = CompositeVideoClip([clip1, clip2.set_pos((45,150)), clip3.set_pos((90,100))]) There are many ways to specify the position: :: - + clip2.set_pos((45,150)) # x=45, y=150 , in pixels - + clip2.set_pos("center") # automatically centered # clip2 is horizontally centered, and at the top of the picture @@ -99,10 +99,10 @@ There are many ways to specify the position: :: # clip2 is vertically centered, at the left of the picture clip2.set_pos(("left","center")) - + # clip2 is at 40% of the width, 70% of the height of the screen: clip2.set_pos((0.4,0.7), relative=True) - + # clip2's position is horizontally centered, and moving down ! clip2.set_pos(lambda t: ('center', 50+t) ) @@ -113,7 +113,7 @@ When indicating the position keep in mind that the ``y`` coordinate has its zero .. Transitions .. ------------ -.. Everyone loves transitions between clips: fade-ins, fade-out, clips that slide in front of the previous one... everything is good to impress your grandparents. +.. Everyone loves transitions between clips: fade-ins, fade-out, clips that slide in front of the previous one... everything is good to impress your grandparents. .. In MoviePy, transitions are effects (see :ref:`effects`_) from the module moviepy.video.compositing. diff --git a/docs/index.rst b/docs/index.rst index eb889aca3..cbfd9203d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,14 +21,14 @@ User Guide .. toctree:: :maxdepth: 1 - + install getting_started/getting_started gallery examples/examples FAQ ref/ref - + Contribute ! -------------- @@ -43,8 +43,8 @@ MoviePy is an open source software originally written by Zulko_ and released und if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js'; fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs'); - - .. ..