Video editing with Python
Fix #536 Fix youtube links
Mark Beacom13b51e5ba710
diff --git a/docs/examples/compo_from_image.rst b/docs/examples/compo_from_image.rstindex 45916416..c6f31fd0 100644--- a/docs/examples/compo_from_image.rst+++ b/docs/examples/compo_from_image.rst@@ -7,7 +7,7 @@ So how do you do some complex compositing like this ?.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/1hdgNxX-tas&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/1hdgNxX-tas" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>It takes a lot of bad taste, and a segmenting tool@@ -21,5 +21,3 @@ We will find the regions of this image and fit the different clips into these re(note that some pictures are distorted here as their size has been modified without care for their aspect ratio. This could be changed with a few more lines.)--diff --git a/docs/examples/dancing_knights.rst b/docs/examples/dancing_knights.rstindex e52e6572..d762a174 100644--- a/docs/examples/dancing_knights.rst+++ b/docs/examples/dancing_knights.rst@@ -8,11 +8,9 @@ And now for something very silly...<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;margin-left: 5%;">- <iframe type="text/html" src="https://youtube.com/embed/Qu7HJrsEYFg?rel=0" frameborder="0"- style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;">+ <iframe type="text/html" src="https://www.youtube.com/embed/Qu7HJrsEYFg" frameborder="0"+ style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>.. literalinclude:: ../../examples/dancing_knights.py--diff --git a/docs/examples/example_with_sound.rst b/docs/examples/example_with_sound.rstindex 6a54bb68..5dcb3b2c 100644--- a/docs/examples/example_with_sound.rst+++ b/docs/examples/example_with_sound.rst@@ -7,7 +7,7 @@ An example of using MoviePy to assemble movie clips with sounds. Here are two sc.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/gtyFuIoH7W0&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/gtyFuIoH7W0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>Here is the code:diff --git a/docs/examples/headblur.rst b/docs/examples/headblur.rstindex 11f9d22d..1330234c 100644--- a/docs/examples/headblur.rst+++ b/docs/examples/headblur.rst@@ -4,7 +4,7 @@ Tracking and blurring someone's face.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/FWCKYTRCrBI&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/FWCKYTRCrBI" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>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.rstindex 2adf1ee7..a961a546 100644--- a/docs/examples/logo.rst+++ b/docs/examples/logo.rst@@ -3,6 +3,6 @@ MoviePy logo with a moving shadow=================================.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/TG86KzL18NA&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/TG86KzL18NA" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>-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.\ No newline at end of file+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.diff --git a/docs/examples/masked_credits.rst b/docs/examples/masked_credits.rstindex 145ce3b9..92519d34 100644--- a/docs/examples/masked_credits.rst+++ b/docs/examples/masked_credits.rst@@ -5,13 +5,13 @@ Partially Hidden credits.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/NsTgBah6Ebk&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/NsTgBah6Ebk" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>Before seeing the code for this video, here is a tutorial video that explains the different steps (also made with MoviePy):.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/7tKABfc0Yzw&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/7tKABfc0Yzw" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>And here is the code:diff --git a/docs/examples/moving_letters.rst b/docs/examples/moving_letters.rstindex 1479aea2..4654a912 100644--- a/docs/examples/moving_letters.rst+++ b/docs/examples/moving_letters.rst@@ -6,7 +6,7 @@ I think this example illustrates well the interest of script-based editing (imag.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/jj5qrHl5ZS0&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/jj5qrHl5ZS0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>Here is the code:diff --git a/docs/examples/painting_effect.rst b/docs/examples/painting_effect.rstindex 127a22cd..638f2c2a 100644--- a/docs/examples/painting_effect.rst+++ b/docs/examples/painting_effect.rst@@ -6,7 +6,7 @@ That's an effect that we have seen a lot in westerns and such... raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/aC5CifkacSI&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/aC5CifkacSI" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>The recipe used to make a photo look like a painting:@@ -27,4 +27,3 @@ The part with the effect is obtained as follows:Here you are for the code:.. literalinclude:: ../../examples/painting_effect.py-diff --git a/docs/examples/several_characters.rst b/docs/examples/several_characters.rstindex 0f3509a7..3a383d45 100644--- a/docs/examples/several_characters.rst+++ b/docs/examples/several_characters.rst@@ -6,6 +6,6 @@ Character duplication in a video.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/sZMyzzGlsc0&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/sZMyzzGlsc0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>So blabladiff --git a/docs/examples/star_worms.rst b/docs/examples/star_worms.rstindex 5d1659e1..7a41e3a2 100644--- a/docs/examples/star_worms.rst+++ b/docs/examples/star_worms.rst@@ -9,7 +9,7 @@ Let us also have a look at this tutorial which shows the different steps:.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/5euLdo8L0o0&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/5euLdo8L0o0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>And here you are for the code, and for the code of the tutorial.diff --git a/docs/examples/the_end.rst b/docs/examples/the_end.rstindex e89fd4f7..e093b057 100644--- a/docs/examples/the_end.rst+++ b/docs/examples/the_end.rst@@ -4,7 +4,7 @@.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/sZMyzzGlsc0&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/sZMyzzGlsc0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>So let's explain this one: there is a clip with "The End" written in the middle, and *above* thisclip there is the actual movie. The actual movie has a mask which representsdiff --git a/docs/examples/ukulele_concerto.rst b/docs/examples/ukulele_concerto.rstindex 707493f7..d5ec1b90 100644--- a/docs/examples/ukulele_concerto.rst+++ b/docs/examples/ukulele_concerto.rst@@ -4,7 +4,7 @@ A simple music video.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://youtube.com/embed/AqGZ4JFkQTU&hl=en_US&fs=1&rel=0" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe></div>+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe type="text/html" src="https://www.youtube.com/embed/AqGZ4JFkQTU" frameborder="0" style="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;" allowfullscreen></iframe></div>This is an example, with no sound (lame for a music video), soon to bereplaced with a real music video example (the code will be 99% the same).