[0:00] Hello everyone. Welcome to this course [0:02] dedicated to learning the movie PI [0:04] library for Python in order to automate [0:07] the editing of your videos. The goal of [0:10] this course is to teach you how to [0:11] develop Python scripts capable of mass [0:14] processing your videos. You will learn [0:17] how to write Python scripts to process [0:19] hundreds of videos at once. Whether [0:22] resizing, cropping, converting formats, [0:25] adding text, music or transitions, Movie [0:29] Pie greatly simplifies mass video [0:31] editing while producing a professional [0:34] quality videos ready for publishing on [0:36] online platforms. In this course, we [0:39] will work on a real world video editing [0:41] automation project. It will involve [0:44] automatically compiling the best moments [0:46] of a video game with a series of edits, [0:49] which is a representative real world [0:51] case that can be easily automated to [0:54] handle large amounts of video. The [0:56] Python script can then be reused for any [0:59] other type of compilation such as [1:01] compilations of sports highlights, [1:03] compilations of funny animal videos, [1:06] etc. And you don't need any prior [1:09] knowledge as the course explains [1:11] everything you need to know and provides [1:13] all the necessary resources. You can [1:15] complete the course at your own pace. So [1:18] without further ado, let's start this [1:21] course together to learn how to automate [1:23] your video editing with the Python and [1:26] Movie Pie. [1:28] During this training, I will be using [1:31] the code editor Visual Studio Code. It [1:33] is a widely used code editor that offers [1:36] many advantages. So if you also want to [1:39] work with it, I will show you in the [1:41] next video how to install it on your [1:43] computer and how to install Python with [1:45] it if it's not already done. However, if [1:49] you already have a code editor installed [1:51] on your computer that you prefer to use, [1:53] you can certainly continue using it [1:55] during this course. You can use any code [1:58] editor you prefer. And for those who [2:00] want to install Visual Studio Code as [2:02] well as Python if it's not already done, [2:05] we will see how to do all that in the [2:08] next video. In this video, we will see [2:11] how to easily install Python and Visual [2:13] Studio Code. You will see it only takes [2:16] a few steps and a few minutes, allowing [2:18] us to access to this very widely used [2:21] development environment. It is currently [2:23] the most popular development environment [2:25] in the world used for many languages [2:28] including Python. So to begin, we will [2:31] first install Python because we need the [2:33] programming language installed before we [2:35] can use it in Visual Studio Code. So [2:39] let's go to the official Python page. [2:41] Click on downloads. And here you should [2:44] see a yellow button offering to download [2:46] the latest version of Python for your [2:49] operating system. Since I'm on Windows, [2:52] it suggests downloading Python for [2:54] Windows. I can see that they are [2:56] proposing me the version 3.11 of Python, [2:59] but by the time you watch this video, [3:01] there may be a newer version like 3.12, [3:05] 3.13. You can just download the version [3:08] displayed on your screen without any [3:10] issues. So, let's click on download [3:12] Python. Theex file starts downloading. [3:15] Let's wait for it to download. All [3:17] right, so it's done on my side. And once [3:20] it's downloaded, we can launch the [3:22] executable file. So we have this window [3:26] that is appearing here. It's very [3:28] important check the box add the [3:30] python.exit to path. So this is a small [3:33] option related to what we call [3:35] environment variables. I highly [3:38] recommend checking this box as it might [3:40] not work properly if you don't. Then [3:43] let's click on install now. Click yes [3:46] and wait for the installation. Once the [3:48] installation is complete, we get the [3:50] message setup was successful. So the [3:53] installation went correctly. We can [3:55] click on this option disable path length [3:58] limit because on some operating systems [4:01] particularly Windows there is a limit on [4:03] the length of path for accessing a file. [4:07] If your path exceeds 260 characters, it [4:11] might be impossible to navigate through [4:13] such a long path and retrieve a file at [4:16] the end. This situation rarely occurs [4:18] but to be safe we can click here then [4:21] click yes and it's done. We can click on [4:24] close and now Python is installed on [4:27] your computer. Next we will install [4:29] Visual Studio Code. Now that we have the [4:32] Python programming language on your [4:33] computer, we need a development [4:35] environment. Basically a software that [4:37] will allow us to easily write and [4:39] execute Python code. And for that we're [4:42] going to use Visual Studio Code. So [4:44] let's search for Visual Studio Code. [4:49] Click on the first link and then click [4:51] on download. You can select your [4:53] operating system. Again, since I'm on [4:56] Windows, I choose Windows. And then we [4:58] can see that it starts downloading. [5:00] Let's wait for it to download. All [5:02] right, it's done on my side for the [5:04] download of VS Code. Once it's done, [5:07] similarly, click on the X file. It will [5:11] launch. Then here we can click on I [5:14] accept the agreement then next. You can [5:17] change the installation folder if you [5:19] wish but I'll continue clicking next. [5:21] Leave it as default. Click next again [5:23] and it's installing. [5:27] Perfect. So the installation was very [5:29] quick. [5:31] It will launch and we land on this [5:33] window. [5:36] So you can close the welcome window if [5:39] you want. [5:41] You can change the theme to either a [5:44] white background with different colors [5:46] or a black background with higher [5:48] contrast. I recommend keeping the [5:51] default theme which is dark and modern [5:54] to avoid the eye strain. You can now [5:56] close this window. [6:00] Now before we start coding, let's [6:03] install two extensions to facilitate [6:05] programming in VS Code. [6:08] So click on the extension button here. [6:11] Then install the Python extension which [6:13] is the first one. [6:16] Click on install. It's very quick. [6:21] And once it's installed, we can install [6:23] another extension called code runner [6:27] which will add a button to easily [6:29] execute Python code. So click on [6:31] install. Again, it's very quick. [6:36] Once done, you can close these two [6:39] windows. [6:41] I recommend closing and reopening VS [6:43] Code to ensure all extensions load [6:45] correctly. Do this just once after [6:47] installing the extensions. [6:50] Now, let's test a Python code to see if [6:53] everything works correctly. So, we can [6:55] create a new Python file by going to the [6:57] top left. Let's click on new file and [7:00] select Python file. You can write here [7:02] anything. I will type print hello world. [7:05] the typical first code when learning a [7:07] new programming language. [7:10] Let's save the file by pressing Ctrl S. [7:14] Save it on the desktop. For example, [7:16] name it test and click save. Now the [7:21] file appears on the desktop as a test. [7:24] py. Now execute it by clicking on the [7:27] run code button and you should see the [7:30] text hello world in the console. [7:32] Perfect. So that was all for this video. [7:35] We saw how to install Python, Visual [7:38] Studio Code, and some extensions to make [7:40] writing Python code easier. During this [7:43] training, we will use the Movie Pi [7:45] library, which was developed for Python. [7:47] This library will allow us to do video [7:50] editing in Python and more importantly, [7:53] it will allow us to automate the editing [7:55] of videos massively. Note that this [7:58] library does not come with Python when [8:00] we install Python for the first time. So [8:03] you will need to install it separately. [8:05] To do this, it's very simple. Open your [8:08] terminal and then simply type pimp [8:10] install pie like this. [8:14] You can do this in a virtual environment [8:16] if you prefer. Once done, press enter. [8:19] The Movie Pi library will then be [8:21] installed. So I've already installed the [8:24] library on my side, so I don't need to [8:26] do it again. But you will see it will [8:29] install quickly and then we can start [8:31] developing. So that was all for this [8:33] video. Thank you everyone. [8:36] All right. So you will find in the [8:38] description of this video the resources [8:40] that we will use during this training. [8:43] It is a zip file that you can download [8:45] and it is approximately 160 mgabytes. So [8:49] it might seem a bit large but that's [8:51] normal because it contains videos that [8:54] we will use for the training. So these [8:57] are the videos that we will assemble [9:00] using movie pie and where we will do [9:02] editing. So I invite you to download the [9:05] zip file. You can place it somewhere on [9:07] your computer. You can create a brand [9:09] new folder that will contain the entire [9:12] project that we will do during this [9:14] training. So that's what I did. I [9:16] created a new folder called the Movie Pi [9:19] course. And in this folder, I placed the [9:21] zip file that you can download from the [9:24] description. So let's extract this file [9:26] to retrieve the files inside. I click on [9:30] extract all and then I click on the [9:33] extract button. Now we have this folder [9:36] that appears. Let's go inside right [9:38] away. Inside this folder we can see that [9:40] we have three other folders and a file [9:42] in in the Python format. We will go [9:45] through each of these elements one by [9:47] one. So we can see that we have a first [9:49] folder called the clips. If we go [9:51] inside, we can see that we have 10 [9:54] videos in MP4 format. So these are [9:57] videos that are about 30 seconds long [9:59] and our clips from the video game [10:01] Valerant. So during this training, these [10:04] are the clips that we will use and we [10:07] will see how to assemble them, edit them [10:09] using Python and Movie Pie, add music, [10:12] transitions, an introduction, etc. The [10:16] idea is that we can then use this script [10:18] for many other clips to generate [10:20] automated videos whenever we have clips [10:23] like this. So in this video, we'll make [10:25] a compilation of the best moments from [10:27] the game Valerant. But you understand [10:29] that the script can work with any other [10:32] of video game clips or it can also be [10:34] clips for anything really. It could be [10:37] clips of the best moments in sports, in [10:39] football for example, etc. So that will [10:42] be our goal during this training. [10:44] assemble all these clips automatically, [10:47] edit them and finally obtain a full HD [10:50] video that we can then publish on the [10:52] video platforms. So here I have just [10:55] taken 10 clips. We could have added more [10:58] but it is sufficient for this training. [11:00] You can then go back to your folder. We [11:02] will see another folder called the [11:04] output which is empty for now. And this [11:07] is the folder we will use to store the [11:09] final videos generated by our Python [11:12] program. For now, it is empty because we [11:15] have not yet created the program and we [11:18] have not yet executed it to have the [11:20] final video created by the program. [11:22] Let's go back to our folder. And [11:24] finally, we have the resources folder [11:27] where inside we have a number of [11:30] resources that we will use for the [11:32] editing. We have a font that we will [11:34] use, an introductory video that we will [11:37] place at the very beginning of the video [11:40] before the clips play, a music track [11:43] that will play in the background, an [11:45] outro video. So, this one is the very [11:48] last video that will be shown at the end [11:50] of the video, and finally a transition [11:53] video file between each clip. You will [11:55] see we will integrate each of these [11:58] elements as the course progresses. Next, [12:01] we can return to the folder we have [12:03] created. And here we finally have a [12:05] Python file that is currently empty. So [12:08] I open it and we can see that inside [12:11] there is no code, nothing. I just [12:14] created it and placed it in this folder [12:17] to save some time for you. And it is in [12:19] this Python file that we will write all [12:21] of our code. All right. Also, if we [12:25] click on this little button here, the [12:27] explorer button, we can see that there [12:29] is no folder attached to Visual Studio [12:31] Code currently. So, what we will do is [12:34] click on the open folder button here. [12:36] You can also do it by clicking on the [12:38] file button, then open folder. So, I [12:41] click on it and then I have to find the [12:44] folder where the Python script is [12:47] located. So we have the movie pi course [12:50] resources folder and as soon as we enter [12:53] in this folder we arrive here where we [12:56] have our three folders clips outputs and [12:59] resources and this is the folder that we [13:02] will open. So I click on the select a [13:05] folder button my visual studio code [13:07] window refreshes and then we can see on [13:10] the left that I have the three folders [13:12] of my directory. So again we have the [13:15] clips folder which contains the 10 clips [13:18] we will work on, the output folder which [13:21] will contain the videos we will create [13:24] and the resources folder which contains [13:27] the various resources we will integrate [13:29] into the video. And of course we have [13:31] the Python file that I have just showed [13:33] you which is currently empty and on [13:36] which we will write all of our code. So [13:38] when you want to execute the code or [13:40] modify it, always remember to open the [13:43] folder where all these elements are [13:46] located. So they will be displayed here. [13:48] And this way the Python script will not [13:50] have any problems finding the different [13:52] resources because the Python code here [13:56] will need these resources to create the [13:58] video which you will see later in this [14:00] course. Again, the zip file to access [14:03] these resources is available in the [14:05] video description. So feel free to [14:07] download it and once that is done we [14:10] will meet in the next video to start the [14:13] development. [14:15] Now that you have put in place all the [14:17] necessary resources for automatic video [14:19] editing. We can start the development. [14:22] First if we open the clips folder [14:24] contained in the zip file we downloaded. [14:27] We can see the different videos we will [14:29] be looking to assemble and edit during [14:32] this course. Here we have taken the [14:35] example of 10 clips from the video game [14:37] Valerant. But of course they can be [14:40] clips of anything. You just need to have [14:42] a series of videos to assemble and the [14:45] code that we will write will work. So [14:48] let's open one of the clips together to [14:50] see what the video contains. [14:57] >> Nice. [15:01] Got him. [15:04] Spike down. [15:06] >> One enemy remaining. [15:14] >> So, as you can see, these are best [15:16] moments clips from Valerant featuring [15:19] some great actions on the video game. [15:22] So, we have 10 of them. And uh in this [15:25] first video of the course, we will [15:27] develop a method to assemble these 10 [15:30] clips into a single MP4 video that [15:33] combines all of them. For that, we can [15:36] go back to Visual Studio Code and let's [15:39] create a video in MP4 format that [15:41] combines all of them. So here I'm in the [15:44] folder that we've obtained with the zip [15:46] file. You can just open the automatic [15:49] video editing Python file which is the [15:52] Python file we will use throughout this [15:54] training for our development. It is [15:57] currently empty and let's start writing [15:59] our code. So the first thing we will do [16:02] is retrieve all the clips in the clips [16:05] folder using the Python file. So here in [16:08] the directory we have our 10 clips and [16:12] we need to fetch them with the Python. [16:14] To do this, let's use a library called [16:16] the globe. So, this library is used to [16:19] search for files on your computer. Next, [16:22] we will create a variable containing the [16:24] path to access each of these clips. [16:27] Let's type a comment first. It's a [16:30] convention I recommend you to follow. [16:32] You should really add comments in your [16:34] code to explain what we do at each step. [16:36] So, here let's type collect all clips [16:39] and then let's create a new variable [16:42] called the clips. We can use the globe [16:44] function from the globe library. So we [16:47] need to type globe twice here. globe.g [16:50] globe. Let's open parenthesis and [16:52] specify the path to access the clips. So [16:56] we open parenthesis with quotes and type [16:59] the clips folder name. So if you wanted [17:02] to access the output folder, we will [17:04] type output. Let's type a slash and then [17:07] specify that we want to fetch all files. [17:10] So there are 10 of them. There are [17:12] several ways to do this. We can manually [17:15] specify the name of each clip or we can [17:18] use more efficient methods to specify [17:20] all files with the same extension. Here [17:23] we can see that each of our files is in [17:25] MP4 format. So we can put an [17:28] asterisk.mpp4 [17:30] to retrieve all the MP4 files in this [17:33] folder allowing us to get all our clips. [17:36] We can see if Python correctly fetches [17:38] our different clips. To do this, you [17:41] just have to type print open parenthesis [17:44] clips. Remember to save your code by [17:46] pressing Ctrl S and then run the code. [17:50] So I executed the code and we can see in [17:53] the console the path to all our clips [17:55] appearing. Note that for the clip names, [17:58] we have the clip numbering first and the [18:01] player's name. So the player who [18:03] performed the action on the right. So at [18:06] this stage we have just retrieved the [18:08] path to treat them. Let's delete the [18:11] print statement. It's unnecessary right [18:14] now. And let's create a list to contain [18:17] all these clips. Right now the clips are [18:20] all separated. And our goal is to group [18:23] them into a single MP4 video. So let's [18:26] start by creating an empty list. Let's [18:28] type uh initialize a list to store all [18:31] processed clips. So this list will be [18:34] called all clips. I advise you to use a [18:37] clear variable names to understand their [18:39] purposes. So this list will store all [18:41] the videos. And to list the clips, uh [18:45] let's create a loop to fetch all these [18:47] clips, transform them into movie pie [18:50] objects for their processing. So here [18:53] let's type a comment process each game [18:55] clip and uh let's create a loop. We can [18:58] type for clip path in clips. So for each [19:02] clip you have fetched we will process [19:04] it. The first point that we have to do [19:07] is that each MP4 file that we have is in [19:10] a format that cannot be manipulated by [19:13] movie pie. When the movie pie library [19:15] edits the different videos we provide. [19:18] It cannot work directly with the MP4 [19:20] files. It's a file format that we have [19:23] to adapt for movie pie to perform [19:25] operations on it. So to do this we first [19:28] need to import a function from the movie [19:30] pie library. So let's type from movie [19:32] pi.editor [19:34] import video file clip. Video file clip [19:37] is the function that will allow us to [19:39] convert these MP4 videos into a format [19:42] that movie pie can process. Let's type a [19:45] comment create a video file clip object [19:48] and resize it. [19:52] I will explain the resize port later. So [19:55] let's create a new variable called the [19:57] video_clipip and call the function we [20:00] just imported video file clip with clip [20:03] path. So this little piece of code will [20:06] convert the MP4 video into a format that [20:09] MoviePie can use for editing. But the [20:12] final video will be in MP4 format to [20:14] publish on any platform. So don't worry [20:17] about it. By the way, it can also be [20:19] under format. It's not limited to MP4. [20:22] It can be for example. [20:24] So next, an interesting feature that [20:27] comes with the function video file clip [20:29] is that we can also resize each clip. [20:32] Generally, we want our final videos in [20:35] full HD format. So in 1,920x [20:39] 1,080 pixels, but some clips can come in [20:43] different formats, such as 1,280x [20:48] 720 pixels or smaller or larger formats. [20:52] And if all the videos don't have the [20:54] same dimensions, the final video will [20:57] have some clips appearing too small or [21:00] too large, which won't look good. So, we [21:03] add a bit of code to ensure all clips [21:05] have the same dimensions. So, here we [21:08] will choose 1,920x [21:11] 1,080 pixels, which is a full HD format [21:15] used by all video platforms. So here [21:18] let's type a comma and type [21:20] target_resolution [21:22] equals we can open parenthesis here and [21:25] then we type 1,80 [21:28] comma 1,920. [21:31] So we put the height first and then the [21:34] width. And this code will ensure that [21:36] all the MP4 files will be in 1,920x [21:41] 1080 format avoiding dimension issues. [21:45] If you want, you can test this by taking [21:47] some clips with different formats. By [21:50] the way, to know the video format, go to [21:53] the clips folder, pick a video, right [21:55] click, then click on properties, and in [21:59] the details tab, you'll see the video [22:01] dimensions. So, here we have 1,920x,80 [22:06] pixels. So, this video doesn't need [22:09] modification since it's already in full [22:11] HD format. But if it were, for example, [22:14] in 1,280 [22:17] by 720 pixel, which is a common format, [22:21] the program will then resize it to [22:23] 1,920x [22:26] 1,080 pixels. Perfect. So next, we will [22:31] add each processed video to the list we [22:33] created earlier to have all the videos [22:36] in one list to concatenate them later. [22:39] So let's type a comment add the [22:41] processed clips to the list and then we [22:44] can type the code all clipsapped [22:48] within parenthesis video clip. So this [22:51] line adds each video clip to the all [22:53] clips list. To summarize, in this loop, [22:56] we have fetched each clip from the clips [22:58] folder, convert it to the video file [23:01] clip format used by Movie Pie, resized [23:03] it, and add it to the all clips list to [23:06] have all videos in just one list. [23:09] Finally, we have to concatenate these [23:12] clips. So here, let's type a comment [23:14] concatenate all processed clips. We can [23:17] create a new variable called the final [23:19] video and import a new function called [23:22] uh concatenate video clips. This [23:25] function will allow us to combine all [23:27] the clips into one video. And here we [23:30] specify the list containing our clips [23:33] which is the um the variable all clips. [23:38] So now the last step is generating our [23:41] MP4 video. Let's type a comment. write [23:44] the final video to an MP4 file. [23:48] We can retype our variable final video [23:51] and then use the function write video [23:54] file. So this code will convert our [23:57] edited video back to MP4 format. We open [24:00] parenthesis and specify the folder to [24:03] save the video. So let's save it in the [24:06] output folder which has been created to [24:08] store our edited videos. So I'm typing [24:11] here output/ video.mpp4. [24:14] By the way, the video.mpp4 [24:17] will be basically the name of your video [24:20] inside your computer. So you can replace [24:23] the video port with any name you want [24:25] actually. But here I'm keeping it [24:28] simple. I'm just typing video. It's [24:30] sufficient for the moment. And uh don't [24:32] forget to specify the format. So here I [24:35] have typed MP4. Lastly, we must specify [24:39] the number of FPS's we want in the [24:42] video. Usually, we use 60 FPSs for [24:45] smooth videos. So, I type FPS equals to [24:49] 60. Basically, FPS's are the number of [24:52] frames per second in your video. The [24:55] more you have, the more your video will [24:57] be better. It will be more smooth, more [24:59] fluid. Next, uh let's save the script [25:03] here. I'm pressing the Ctrl S. And we [25:06] can run it to see if we got our final [25:08] edited video with all the clips [25:10] combined. But just before running the [25:13] code, remember that the more clips are [25:15] in the folder, the longer will be the [25:18] execution of the code. Here we work with [25:20] the MP4 videos, each about something [25:23] like 30 seconds long. So the execution [25:26] may take a while, but keep in mind that [25:29] this is normal. If you have used editing [25:31] software like Adob Premiere Pro or Final [25:34] Cut Pro, you know that rendering videos [25:37] takes time. Here we basically do the [25:40] same but with the Python. So save your [25:43] code and run it. And keep in mind that [25:46] it's normal if it takes time. So to run [25:48] the code in Visual Studio Code, click on [25:50] run a Python file rather than run code [25:53] to execute the code directly in the [25:56] terminal. This avoids display issues in [25:59] the output window. So here I clicked on [26:02] run Python file. We see a message from [26:05] movie pile confirming the video is being [26:07] edited with the audio editing first and [26:10] then video editing. Uh progress [26:13] percentage appears and at 100% our video [26:16] will be ready. And by the way, this [26:19] display in the terminal is why I [26:22] recommend clicking on run Python file as [26:24] the percentage display might be [26:26] incorrect in the terminal if we have [26:29] clicked on run code. [26:38] Perfect. So here we are at 100%. We see [26:42] a message from movie pie saying the [26:44] video is ready in the indicated path. So [26:48] let's check the output folder and here [26:50] we can find the video. I double click on [26:53] it. So the video last 3 minutes [26:56] containing all our clips. We can quickly [26:58] view it. So the first clip is displayed. [27:07] One enemy remaining. [27:15] >> Advancing, we see the second clip that [27:18] follows automatically. [27:31] >> Head shot. [27:39] One enemy remaining. [27:43] >> And this continues until the last clip. [27:46] Perfect. So now we have our video with [27:50] all the clips assembled. So to [27:53] summarize, in this video we saw how to [27:55] combine multiple MP4 files into one. We [27:58] concatenated all the clips and resized [28:01] them to 1,920 [28:03] by 1,080 pixels to ensure uniform [28:07] dimensions. Without resizing, some clips [28:10] will appear smaller with black bars on [28:13] the sides, which will not look good. [28:15] With this code, we can assemble many [28:18] clips into a final HD video with the 60 [28:21] fps. You can verify this by right [28:24] clicking on the output video, selecting [28:26] properties and checking the details tab. [28:29] So here we can see that the video is in [28:31] the full HD dimensions and with the [28:34] 60fps. So at this stage we have a video [28:38] base for further editing. And during [28:40] this course, we will modify this video [28:43] to add an intro, an outro video, a [28:46] background music, some transitions [28:48] between clips, and text to credit the [28:52] authors of the clips. So, keep your code [28:55] as well. We will improve it in the [28:57] future videos. And I'll see you in the [28:59] next video. [29:01] Now that we have seen how to concatenate [29:03] a set of videos to generate a single [29:05] video in MP4 format, we will look to [29:07] improve this video a bit. So if I go [29:10] back to my directory in the outputs [29:12] folder, I have the video that we [29:14] generated in the previous tutorial. So [29:17] I'm opening it. And as a result, it's [29:21] simply the 10 clips that we have [29:22] assembled. But the editing of this video [29:25] is very basic. We only group the videos [29:28] together, resize them, and export them [29:31] with the 60fps. But for this type of [29:34] video, for this kind of compilation, [29:37] it's good to add other elements on top, [29:39] such as a background music. It is very [29:42] common to see a little background music [29:44] in this type of video, and that's what [29:46] we're going to do in this video. We will [29:48] ensure to add a background music that [29:50] lasts the entire duration of the video. [29:53] So, this video currently last 3 minutes [29:56] and 4 seconds, and we will make sure to [29:58] add a music that also stops at 3 minutes [30:01] and 4 seconds. And we will even modify [30:04] the code to ensure that if our music [30:06] only lasts two minutes, for example, and [30:08] the video with the assembled clips last [30:10] three minutes, we will make the music [30:13] loop so that it restarts and ends [30:16] precisely at 3 minutes and 4 seconds. [30:19] Perfect. So, let's close this window and [30:22] we can go in the resources folder. So in [30:26] the resources folder, there are several [30:28] elements that we will use during this [30:30] training, including the music element, [30:33] which is the music we will play in the [30:35] background. You can open this file to [30:37] listen to the music if you wish. So it [30:40] is an MP3 file. I open it. I let you [30:43] listen to the music if you wish. [30:53] So, it's a music that has a bit of a [30:55] video game feel and it is, by the way, a [30:58] royalty-free. It is a music by the [31:00] artist Kevin Mle, which is a [31:02] royalty-free and can be used as long as [31:05] you mention the author. So, thanks to [31:07] him. And it's also a music that fits [31:09] well with the theme of the video we are [31:11] editing. So, a compilation of best [31:14] moments in video games. Perfect. Let's [31:16] move to our Python code. Here I'm on my [31:19] Python code and the first thing we will [31:21] do is to retrieve the music as we did [31:24] for the clips. So if I go to resources, [31:28] we will retrieve the music.mpp3 file. [31:31] For that, let's modify the code a bit. [31:34] So let's keep a line here and type [31:36] define path for resources like this. And [31:40] let's create a variable called the music [31:43] path. So the path to access the music, [31:46] let's use a quotation marks as we did [31:48] for the clips. And this time we will not [31:51] use the globe function with an asterisk [31:54] MP4 since we are looking for only one [31:57] MP3 file and not all elements in the [32:00] resources folder. So I will type the [32:02] name of the folder first resources. So [32:06] this folder slash and here I will type [32:09] the name of my file. So music.mpp3 MP3 [32:13] like this. So we have retrieved the path [32:15] to access our music and we will be able [32:18] to integrate it into our video. For that [32:21] we will need to import a new function [32:24] which is the audio file clip function. [32:27] So this function works exactly like the [32:29] video file clip function. So video file [32:32] clip allows us to convert a video to the [32:35] movie by format so that we can edit it. [32:38] And audio file clip is exactly the same [32:41] but for audio files. So we convert audio [32:44] files maybe MP3 files for example to a [32:48] format that can be edited by Movie Pie. [32:50] Very well. So let's modify our code. We [32:53] can skip a line here. And after using [32:56] the concatenate video clips function, we [33:00] will type a comment. It will be a bit [33:02] long because we will perform certain [33:04] operations. Let's type load a background [33:07] music and loop it to match the duration [33:11] of the clips. So first we will load the [33:14] background music and then we will loop [33:16] it to match the duration of the clips. [33:18] So if our music lasts only 2 minutes but [33:22] the total duration of our clips is 6 [33:24] minutes then we will loop the music so [33:28] that it ends at the end of the 6 [33:30] minutes. We will basically repeat the [33:33] music until the clips end. Very well. So [33:37] let's create a new variable called the [33:39] background music abbreviated as a bg [33:42] music. Let's type equal and here we use [33:45] the function we imported. So audio file [33:48] clip like this. I open parenthesis and [33:52] here I simply put the path to the music [33:54] we defined here. There. So we have [33:57] loaded the music and converted it to the [33:59] format used by Movie Pie. Then we need [34:02] to modify the duration of the music to [34:04] match the total duration of the clips. [34:07] For that we will create a new variable [34:09] called the loop to music and we will use [34:12] a new function that we will also import. [34:14] This time let's type from movie audio fx [34:19] all import audio loop. So it's a new [34:22] function that we import and we'll use [34:24] directly. So we type audio loop like [34:28] this. We open parenthesis and we specify [34:31] the music we want to shorten or [34:33] lengthen. So let's type the variable we [34:36] just created here background music. And [34:38] then we must specify the duration this [34:40] music should have. For that we type the [34:43] parameter duration like this. And to get [34:46] the duration it's very simple. We type [34:49] our concatenated video just here. So [34:52] final video I remind you that this line [34:54] of code allows us to concatenate all our [34:57] videos and so it contains our final [34:59] video and if I call this variable in the [35:01] duration parameter and then type the [35:04] method duration I will be able to [35:07] retrieve the total duration of the video [35:09] with all the clips grouped together and [35:12] that's what we want with this line of [35:14] code we have modified the duration of [35:16] the music to match the duration of all [35:18] the grouped clips. So, for example, if [35:21] all the grouped clips last 4 minutes and [35:24] 15 seconds in total, then the music here [35:27] will also last 4 minutes and 15 seconds. [35:31] How does this work? Basically, the music [35:33] is replayed to match the duration of the [35:36] video. Now that we have modified the [35:38] duration of the music, we need to [35:40] integrate it into the video because [35:42] currently in the code we wrote, we have [35:45] only converted to music to the format [35:47] used by Movie Pie and modified its [35:50] duration. But we have not yet integrated [35:53] it into the video. For this, let's type [35:56] a new line of code here. First, I will [35:58] type a comment combine the audio of the [36:00] clips with the background music. And so [36:03] to do this, we must import again a new [36:06] function which is the composite audio [36:09] clip function. This function will allow [36:11] us to combine the background music with [36:13] the audio from the clips. So we will [36:16] basically merge the two audio tracks [36:18] into a single track. I will create a new [36:21] variable here called final video with [36:23] the music. In this variable I will call [36:26] the final video variable. So this is the [36:29] video that does not contain the music [36:31] only the assembled clips and I will use [36:34] the set audio method to define the audio [36:37] that will play in this video. Next let's [36:40] open parenthesis and use the function we [36:43] just imported composite audio file clip [36:46] and then open again some parentheses and [36:49] some brackets. Let's type firstly final [36:52] video.audio to define that we will have [36:55] the sound of the clips first. So this [36:58] sound from the clips of Valerant. And [37:01] then we must specify the background [37:03] music which we defined here as looped [37:06] music. And we also need to specify the [37:08] duration that must match the duration of [37:11] the clips. So I typed here set [37:15] duration open parenthesis and type final [37:19] video dot duration. Perfect. Then we [37:22] just need to modify the last line of [37:24] code because the video we will write at [37:27] the end is no longer the final video [37:29] variable but final video with the music. [37:32] And now we should be good. If I execute [37:36] this code, I should have the video we [37:38] obtained previously, the exact same [37:40] video but with added background music. [37:43] And by the way, we should pay attention [37:45] to the file name. Currently we have kept [37:48] the same name as the video that we [37:50] previously generated. If you leave the [37:53] same name, it will simply replace the [37:55] old video file. But if you want to keep [37:58] both versions for comparison, for [38:00] example, you can simply put a new name [38:02] here. For example, the video with music [38:05] and thus we will not replace the [38:07] previous video. You do as you wish. In [38:10] any case, it will not impact the result [38:13] of this video. So we can now execute the [38:16] script again. Let's go to run and click [38:18] on run Python file. You can also click [38:21] on run code directly but the display in [38:24] the terminal will not be the same. But [38:26] keep in mind that in any cases it will [38:28] not impact the video. So let's click on [38:31] run Python file. And now the script will [38:34] begin to execute. Perfect. So here the [38:37] music has been added and the video is [38:39] currently being processed. Again, the [38:42] more clips there are, and the longer [38:44] they are, the longer the editing will [38:46] take. If you want for your tests, you [38:49] can limit the number of clips. I have a [38:51] powerful enough computer, so I can [38:53] afford to include all the clips. That's [38:56] not a problem. But you, if your computer [38:58] is struggling a little bit, you can only [39:00] keep five or six clips and remove the [39:03] rest. And when we will finish this [39:06] project, you can use all the clips you [39:08] want. Perfect. So, let's wait for the [39:11] editing to finish. We wait to reach [39:13] 100%. By the way, we can already see in [39:16] the output folder that we have the MP4 [39:19] file of the video, but it is still being [39:21] processed. We also have a temporary file [39:24] that contains the music here, but this [39:27] temporary file will be automatically [39:29] deleted. And there we go. We have a [39:31] message that says the processing is [39:33] finished and that the video is ready in [39:36] the output folder. So we have our video [39:38] with the music.mpp4 file and we can also [39:42] see that the MP3 file that appeared here [39:45] for the editing has disappeared [39:47] automatically. Very well. So let's open [39:50] our folder. Let's go to the outputs [39:52] folder. And here we can see our few [39:54] videos with the new one that was created [39:57] and contains the music. So let's open it [40:00] and we will be able to hear the music. [40:15] Spike down. One enemy remaining. [40:27] >> Good. [40:36] I'll run through you every [40:43] >> very well. So of course if you wish to [40:46] use another music you can do so you [40:48] simply need to modify the music file [40:50] that is here and rename it to music.mpp3 [40:54] or you can rename directly the name of [40:56] the variable here and it will work very [40:58] well. The script is adapted to work with [41:00] any music. And if you plan to publish [41:02] this video on video platforms and [41:04] monetize the videos, make sure to check [41:07] if you have the rights to use this [41:09] music. So for the music we use in this [41:12] training from the artistic Kevin Mle, [41:14] this music is royaltyree. We can use it [41:17] as long as we credit the author. Very [41:20] well. So that was all for this video. We [41:22] have seen how to put a background music [41:24] that loops during a video. So this is [41:27] something we see very regularly in [41:29] compilations whether it is a video game [41:31] compilations or sports games lot of [41:34] things there's very often a little music [41:36] that plays in the background and that [41:38] makes the video more pleasant to watch. [41:41] Perfect. So in the next videos we will [41:44] continue to improve this video. See you [41:47] everyone. [41:48] Before moving on to the next lesson [41:51] please take a moment to rate this course [41:53] and share your feedback. I will be [41:55] delighted to hear your thoughts on the [41:57] content and your overall experience. [42:00] So at this stage of the course, we have [42:03] seen how to retrieve all our clips in [42:05] the clips folder as well as the music. [42:07] And then we have seen how to transform [42:09] each clip into a format usable by Movie [42:12] Pie. We then modify the resolution of [42:15] each clip to be in 1,920x [42:19] 1080 format, which is the full HD [42:22] format. We then combined all these clips [42:24] together to form a single video. We [42:27] added music that we modified to match [42:29] exactly the duration of the video with [42:31] the combined clips. And finally, we [42:34] exported everything in the MP4 format to [42:37] have a video ready to be published on [42:39] video platforms. Now, we will continue [42:42] to make modifications to this video. We [42:44] will see how to add an introduction [42:46] video and an outro video to the final [42:49] video that we edit. So, in this kind of [42:51] compilation that you can see on the [42:53] internet, there is often a little [42:55] introduction with the creator's name and [42:58] an outro video at the end where people [43:00] are usually asked to subscribe to the [43:03] channel. You have surely seen content [43:05] like this before. So, in this video, I [43:08] will show you how to add an intro at the [43:10] beginning of the video and an outro at [43:13] the end. For this, I have prepared some [43:16] intro and outro files in advance. So [43:19] these are the videos that we will add to [43:21] our compilation. Let's quickly view [43:23] them. So here I have the first file that [43:26] serves as the introduction. So I click [43:29] on it to open it and let's take a look [43:31] at it. [43:44] Very well. So this is the introduction. [43:46] The idea is to place this video at the [43:49] beginning of the video and we will do [43:51] the same at the end with the outro. So [43:53] for the outro, let's take a look at it. [44:07] Perfect. So these are two videos that I [44:10] have prepared beforehand before the [44:12] course. And by the way, again, you can [44:15] download all of these files if you [44:17] haven't downloaded everything already. [44:19] Oh, and by the way, if you have your own [44:21] introduction or your own outro video, [44:24] you can of course use them instead. But [44:27] for this course, I'm going to use the [44:29] two files that I've just showed you. Oh, [44:32] and by the way, you might have [44:33] recognized the background music. It's [44:35] again the music from Kevin Mloud. It's [44:38] the one that we have used in the [44:40] previous video. Perfect. So let's go [44:42] back to the code. So this was the code [44:44] from the previous video. And first let's [44:47] import the intro and the outro files. So [44:51] here I type intro path equals and inside [44:55] the resources folder. And this time I [44:58] type intro.mpp4. [45:00] And then we do exactly the same but for [45:03] the outro. So I copy and paste this line [45:06] of code. And here I put outro same I [45:10] modify here. And perfect. So we just [45:12] specified the path to access our intro [45:15] video and our outro video. Then we will [45:18] need to process these two videos the [45:21] same way we processed the clips. So [45:23] these videos are currently in MP4 format [45:26] which is not a format that movie pie can [45:29] handle. So as we did for the clips here [45:31] with the video file clip function, we [45:34] will do exactly the same but for these [45:36] two videos. But you will see it will be [45:38] very quick. Let's insert a line here and [45:41] we can type a comment create a video [45:43] file clip for intro. Here I will create [45:46] a list that I will call intro clips. So [45:49] I put clips in pl. You will understand [45:52] later why I use the pole. It's because [45:55] later in the training we will add other [45:57] things to this list. So here I open [46:00] brackets and I type the pass for the [46:03] intro. So intro pass. And as we did for [46:06] the clips, we can resize the videos. So [46:10] for the intro and the outro that we [46:12] already have in the resources, this [46:14] video are already in the full HD format. [46:17] So we don't actually need to specify the [46:19] target resolution again. But if you are [46:22] working on an intro that is not in this [46:24] format, then it is better to put the [46:26] code anyway. But if you are working on [46:28] an intro that is not in this format, [46:31] then it is better to put this code. So [46:33] for me, even if the intro and outro that [46:36] I'm using are already in the format [46:38] 1,920x [46:41] 1080, it doesn't hurt to specify the [46:43] target resolution again so that we are [46:46] sure that we have the full HD format. [46:49] Perfect. So next I will copy and paste [46:52] these two lines of code and do the same [46:54] for the outro. So here I type outro [46:57] clips and instead of using the intro [46:59] path I put out pass for the target [47:03] resolution we keep the same. And now [47:05] that we have defined the path to access [47:08] the intro and the outro and converted [47:10] them with the video file clip we will be [47:13] able to integrate them into the final [47:15] video. And you will see it's very easy [47:17] to do. We can go down to the bottom of [47:20] our code and before exporting the video [47:22] in MP4 format, let's make one last [47:25] modification. Let's use the concatenate [47:28] video clip function again. So I will [47:31] copy and paste this code here. And I'm [47:33] adding the comment uh combine the intro, [47:36] main clips, and outro into the final [47:39] video. In the parenthesis, let's add the [47:42] intro and the outro that we just [47:44] imported. So I type intro clips then I [47:48] type plus not a comma because in Python [47:51] when we want to combine lists we type [47:54] plus. So intro clips plus main clips [47:57] plus outro clips. There is a little [48:00] particularity since intro clips and [48:02] outro clips are lists with only one [48:04] element inside. We need to put brackets [48:07] in the second list which here contains [48:10] all our clips. [48:14] Perfect. So now if we execute this code, [48:17] we will get our video with the intro and [48:19] the outro. So before we execute the [48:21] code, let's rename some variables. For [48:24] instance, we can see that final video [48:26] appears multiple times. Let's modify it [48:28] here. In this line of code, we were just [48:31] assembling the clips together, but it's [48:33] not the final video. Let's rather name [48:35] it clips port like this, representing [48:38] the clips portion. And then let's modify [48:42] the other instances where we specify the [48:44] final video. So here we put clip sport [48:48] and we replace it here here as well. And [48:51] we do the same for this line. This way [48:54] we will only have one final video [48:56] variable which will be the actual final [48:58] video that includes the intro, the [49:00] clips, the outro and the music. Actually [49:03] even this variable here can be renamed [49:05] to clip sport as well. [49:08] Perfect. Next uh here let's remove the [49:12] with the music leaving just a final [49:14] video. And here we can type video with [49:17] intro and outro. [49:22] Perfect. I could have specified that it [49:24] also includes music as well, but I won't [49:27] do that to avoid making the title too [49:29] long. And that's it. So now we have our [49:32] code that gathers all the clips from the [49:34] clips folder, adds background music, and [49:37] includes an intro and an outro at the [49:40] end. So we can proceed to execute the [49:42] code. So remember to save your work [49:44] again. And now we can click on the run [49:47] Python file button. There we go. Let's [49:50] enlarge the terminal a bit to see the [49:53] results better. Oh, and we can see an [49:55] error appearing. Oh yes. Uh here in the [49:58] brackets I need to put clips port also [50:01] to use here the clips that have been [50:03] concatenated. Save your code. And now [50:06] let's reexecute it. Normally there [50:09] shouldn't be any errors now. So I click [50:11] on run Python file. And now the code is [50:14] executing. We will end up with our video [50:17] containing the intro, the outro, the [50:19] clips and the music. Let's wait for it [50:21] to finish. In the meantime, for those [50:24] who used to work with Python, you may [50:27] have noticed that for the intro and [50:29] outro variables, we created a list. Even [50:32] though there is only one element, it's [50:34] not logical to create a list for a [50:36] single element. But you will see in the [50:38] next video that we'll make some small [50:40] transformations where we will add [50:42] elements to this list, making it more [50:44] consistent to use lists. Here I prefer [50:47] to create the list directly to avoid [50:50] having to modify a lot of code later. [50:52] Perfect. So if we go to the output [50:54] folder, we should see the video being [50:56] created here and also the audio file [50:59] which is a temporary file created during [51:02] the editing process. And uh this file [51:05] will be automatically deleted afterward. [51:07] Perfect. So let's wait for the code to [51:09] finish executing. [51:12] And there we go. The code has finished [51:14] executing and the video have been saved [51:16] in the output folder. So let's go check [51:19] the results immediately. Here we can see [51:21] the video with a different thumbnail [51:23] from the previous videos because a new [51:26] element has been added. So I click on it [51:29] and theoretically we should start [51:31] directly with the intro then the clips [51:34] and finally the outro. So let's play the [51:37] video. [51:47] First we see the intro and then it [51:50] directly transitions to the clips. [52:02] >> One enemy remaining. [52:15] Let's quickly go through the other [52:16] clips. [52:23] And if I go towards the end, we should [52:25] see the outro. [52:52] Perfect. So, we can see that the code [52:54] worked very well. We start with the [52:56] intro, then move on directly to our [52:59] clips. And at the end after the last [53:02] clip, we transition directly to the [53:04] outro with a little video thanking [53:06] viewers for watching and reminding them [53:09] to subscribe. Perfect. So, we are [53:12] getting closer to the compilation videos [53:14] we can find on the internet. We [53:16] understand that this editing process can [53:18] be easily automated with the Python and [53:20] Movie Pie. As seen throughout this [53:22] course, we are gradually creating a very [53:25] polished video with an intro, an outro, [53:28] a music clips in full HD format, 60fps, [53:32] making it very close to our professional [53:34] video that could be easily published on [53:37] a video platform. Of course, we will [53:39] make a few more tweaks to improve this [53:41] video, which we will see in the upcoming [53:44] videos. So, that's all for this video. [53:46] Remember to save your code by pressing [53:48] Ctrl S. If you want to clean the [53:50] console, you can write the clear command [53:53] in the console and execute it. Perfect. [53:57] So that was all for this video. I see [53:59] you in the next one for more editing. [54:03] In this video, we will see how to add a [54:05] transition between each clip. So if we [54:08] go back to the video we have created in [54:10] the last video. So I'm going to my [54:12] output folder and it was this video. [54:15] Let's take a look at it. Here we are on [54:18] the intro and you will see that when we [54:20] move to the first clip, there is no [54:22] transition. It's a bit abrupt. [54:28] We moved directly to the first clip [54:31] without any transition or anything. [54:33] Personally, I don't find it very [54:35] pleasant to watch. And it's the same for [54:38] all other transitions between each clip. [54:41] For example, if I go to the end of this [54:43] first clip, you will see that we will [54:45] move to the next clip in the same abrupt [54:48] manner. [54:59] >> So, here we are on the second clip. And [55:01] I would like that between each clip [55:04] there is a little effect, a little [55:06] transition that makes the change from [55:09] one clip to another less abrupt. So if I [55:12] go back to my clips, I would like to be [55:14] a little transition between each video. [55:17] Something that makes the transition from [55:19] one clip to another more pleasant to [55:21] watch. And that's what we are going to [55:23] do in this video. For this, we will use [55:25] a video effect, another MP4 file that [55:29] will serve as a transition. It is a [55:31] video that lasts about a second, maybe [55:34] even less. And it has a visual snow [55:37] effect like on TV. So, I'm going to open [55:40] it and you will see it's a simple video [55:42] of not even a second with the visual [55:45] snow, which is the name given to this [55:47] small color of the dots, these black and [55:50] white dots. And I would like to apply [55:52] this transition between each clip. It's [55:54] a transition often seen in compilations [55:57] and it makes the transitions more [56:00] pleasant to watch. Therefore, our goal [56:02] in this video will be to integrate this [56:05] transition between each clip. So, let's [56:07] go back to Visual Studio Code, back to [56:10] the same code we wrote in the previous [56:12] video where we added the intro and the [56:15] outro. In the same way, we will be able [56:18] to add this transition effect. So, let's [56:21] add a variable containing the [56:22] transition. So I type transition path [56:26] like this. And like the previous [56:28] variables I will copy paste and instead [56:31] of putting outro I type transition to [56:34] get our transition file located in our [56:36] resources folder. We will then apply [56:39] this transition between each clip. For [56:41] this we need to modify this loop where [56:43] we take each video each clip from the [56:46] clip folder convert it with the video [56:49] file clip function and add each clip to [56:52] a list to group them all. So what we're [56:54] going to do is once we add a first clip [56:57] right after we will add the transition. [57:00] So there will be a transition between [57:02] each clip. Here let's type a comment add [57:05] a video transition clip to the list and [57:08] then I'm adding it to the new list. So [57:11] this new list will contain all clips. So [57:14] I type all clips.append [57:17] and then I call my transition. So I use [57:19] the video file clip function. Since the [57:22] transition is currently an MP4 video [57:25] format that needs to be converted to a [57:28] format Movie Pi can modify. So I'm using [57:30] video file clip. I define the variable [57:33] name to access the MP4 file. And then [57:36] like all the other video clips, I [57:39] modified the resolution to 1,920 [57:43] by 1,080. [57:45] So first we specified the height and [57:47] then the width. So with this [57:49] modification we will have a transition [57:52] appearing between each clip. You will [57:54] see it when we will execute the code. [57:56] Before that remember to change the name [57:58] of the final video. If you want I will [58:01] name it video with the transition. But [58:04] even if you don't change the name, it [58:06] won't be a big deal. It will just [58:08] overwrite the old video. So let's [58:11] execute this code to see the result. [58:13] Let's click on run Python file and wait [58:16] for the code to execute again. If you [58:19] wish, you can remove a few clips from [58:21] the clips folder like the last four or [58:24] five to speed up the execution process. [58:27] You can reintegrate them at the end of [58:29] the course to have all the clips. For [58:32] now, since we are still in the testing [58:34] and development phase, you don't have to [58:36] include all clips, just a few so we can [58:39] see the different transitions between [58:41] each clip. So, let's wait for the code [58:43] to execute and we will see the results [58:45] at the end. So, now the execution is [58:48] complete and we can see that the video [58:50] has been created. Let's go watch it [58:52] right away. So, I go to my folder then [58:55] to my output folder and I click on the [58:58] newly created video. Let's fast forward [59:01] a bit to any clip and wait for it to end [59:04] and then you will see the transition we [59:06] added. [59:13] >> Perfect. So you saw the transition [59:15] between the clips. We can take another [59:18] example. Let's go further into the [59:20] video. [59:34] So, as you can see, there's a transition [59:36] between each clip, making it much more [59:38] pleasant to watch. However, there is one [59:41] little thing missing. Currently, there [59:43] is no transition between the intro and [59:46] the first clip. I will show you. If we [59:49] go back to the beginning and launch the [59:51] video, you will see there is no [59:53] transition between the intro and the [59:55] first clip. [60:06] There is however a transition for the [60:08] last clip and the outro which makes [60:11] sense because in the code we always add [60:13] the transition after each clip. So it's [60:16] normal that after the last clip there is [60:18] a transition added resulting in a [60:21] transition for the outro. [60:28] Thus, we are missing only the transition [60:30] between the intro and the first clip. [60:33] This is a small modification that we [60:35] will make right away. So, let's go back [60:37] to our code and make some changes to add [60:40] this transition right after the intro. [60:43] So, we're going to modify this line of [60:44] code, adding a new element with the [60:47] video file clip function. This is why I [60:50] used the plural here. Even though we [60:52] currently have only one element, now we [60:55] will have two. So to make the code [60:58] easier to read, let's add a line break [61:01] here, separating the elements we we will [61:04] add. Here I type a comma and call the [61:07] video file clip function again, placing [61:09] the transition immediately after the [61:11] intro. Then I set the target resolution [61:15] as usual to keep the full HD format. [61:18] Although the video in our resources is [61:20] already in this format, this code will [61:23] automatically resize any future [61:25] transitions that might not be in this [61:28] format. So we have now added this [61:30] transition. For consistency, we can do [61:33] the same with the outro, but we won't [61:35] add a transition here because there is [61:38] already one after the last clip as you [61:40] saw. However, we can format the code to [61:42] make it easier to read. Save the code. [61:45] And uh now we have to concatenate the [61:48] elements of this list. Currently we have [61:50] a list containing two videos the intro [61:53] and the transition. Now we need to group [61:56] them. So copy and paste this line of [61:58] code to concatenate the intro elements. [62:00] Here instead of clips I use the intro [62:03] part and instead of all clips I use [62:06] intro clips. This concatenates the intro [62:09] with the transition. We can do the same [62:11] with the outro making development [62:14] easier. [62:18] change the comments accordingly to [62:20] concatenate the intro clips and [62:22] concatenate the outro clips. Now let's [62:25] go down in the code and make a final [62:27] modification. So in the last concatenate [62:30] function, since we are now working with [62:32] lists containing multiple elements, [62:35] let's remove the square brackets, [62:37] replace the plus signs with the commas, [62:40] and place the brackets just after the [62:43] parenthesis. We have to make this [62:45] modification now that we are working [62:47] with lists that have multiple elements [62:50] which will avoid us execution errors. So [62:52] we have now made the necessary [62:54] modifications to have the transition [62:56] after the intro and the all the other [62:59] transitions that follow. So save the [63:01] code again and let's modify the comment [63:04] here. So here we typed intro and [63:06] transition clips. You can also add outro [63:10] here. And finally, execute the code by [63:13] clicking on the run pattern file button. [63:15] Before that, uh just clear the console [63:17] by typing clear to clean it up. Click on [63:20] run Python file and the code will [63:23] execute. [63:26] Oh, we can see that we have a small [63:28] error to correct here. Instead of [63:31] putting intro clips and outro clips, we [63:34] need to put intro part and outro part. [63:37] So we need to properly specify these [63:39] variables since they contain the [63:42] concatenation of the intro with the [63:44] transition. Finally, let's execute the [63:46] code. Beforehand, we can type clear to [63:49] clean the console and then click on run [63:51] Python file. [63:54] You will see first the audio processing, [63:57] then the video processing. So the video [63:59] is generated with the same name as the [64:01] previous one as I chose to overwrite the [64:04] old one without the intro transition. So [64:08] now that the execution is complete, [64:10] let's go watch the video. So I return to [64:12] my output folder and launch the video [64:15] with transition. So first we see the [64:18] intro and then we should see the [64:20] transition after the intro. [64:31] And there it is, the transition right [64:34] after the intro. And similarly, there's [64:36] a transition between each clip, making [64:39] the video much more pleasant to watch. [64:48] >> We can verify this at the end as well, [64:50] just before the outro. [65:13] Perfect. So, in this video, we saw how [65:16] to add a transition between each clip. [65:19] Something commonly seen in such videos. [65:21] You saw it. It's not complicated to [65:24] implement and can be done quite easily. [65:27] In the next videos, we will continue to [65:30] explore other ways to edit our videos [65:32] with Movie Pie. So, that was all for [65:35] this video and I'll see you in the next [65:37] one. In this video, we will continue to [65:40] make transformations on the video [65:41] generated by our program by adding a [65:44] text this time. So, if we go back to the [65:46] folder containing our clips, by looking [65:49] at the name of each clip, we can see [65:51] that at the end of the name of each [65:53] clip, there is the author of the player [65:56] who recorded the video. For example, for [65:59] the video number four, the author is [66:01] called the gravity. So, it's the name of [66:04] the player who made this clip. And it [66:06] would be nice to mention the author's [66:08] name in the video. We could for example [66:11] add a small text at the top left with [66:14] the author's name. So a small white text [66:17] for instance that we would put in a [66:19] thoroughly small font so that it doesn't [66:22] cover the entire video. And in this way [66:25] we can mention the author and that's [66:27] what we're going to do with our program. [66:30] We will modify it to add the author's [66:32] name at the top left each time. So this [66:35] is something that we can do. But to add [66:37] the text with the movie pie, we need [66:39] first to install another element, [66:42] another dependency, specifically the [66:45] image magic software. So here I am on [66:47] the official movie pie documentation and [66:50] it is clearly indicated here that image [66:52] magic is a dependency that can be useful [66:55] if you want to write text on our videos. [66:58] So it is a small dependency that we need [67:01] to install in addition to be able to [67:03] write text on our video with the Python [67:06] and Movie Pie. And by the way, once the [67:09] software is installed, if you are on [67:11] Windows, we will have to make a few [67:13] small configurations so that movie pie [67:15] can detect image magic. But if you are [67:17] on Mac or Linux, in theory, image magic [67:21] should be detected automatically. So in [67:23] this video I will show you how to [67:25] install image magic and ensure it is [67:28] detected by Windows if you are working [67:30] on a Windows machine of course. So to [67:32] install Image Magic it's very simple. [67:35] Let's open a new window here and let's [67:37] type image magic like this. Then you can [67:41] press enter. You can then click on the [67:43] first link. Perfect. So we land on this [67:46] page. So it is a free open-source [67:48] software. So of course there is nothing [67:51] to pay. Let's go to the download menu to [67:54] download the software. And here we just [67:56] have to choose the version of image [67:58] magic according to our operating system. [68:01] So if you are on Linux, you can download [68:03] the image magic for this operating [68:05] system. If you are using a Mac, you can [68:08] also uh install Image Magic for this [68:11] operating system. And finally, if you [68:13] are on Windows, you can download Image [68:15] Magic directly by clicking on the little [68:17] link here. Let's click on it. And we can [68:20] see that the software is downloading. [68:23] Okay. So the software has been [68:24] successfully downloaded to my computer. [68:27] And now we just have to install it. So I [68:30] went to my downloads and for the [68:32] installation there's nothing simpler. [68:34] You can click on the.exe file. And there [68:37] will be only a few buttons to press to [68:39] download image magic. It's very easy to [68:41] install. So here I press yes. You can [68:45] click on accept agreements. You can read [68:47] the license if you wish. Click on next. [68:50] You can leave the default settings [68:53] except maybe for create a desktop icon [68:56] to avoid creating a shortcut to access [68:58] image magic directly from your desktop. [69:02] Then click next. And now you just have [69:04] to click install. So for my port it is [69:07] already done. So I don't need to click [69:10] on install. I'm just going to close this [69:12] file. But for you you can click on [69:14] install to install the software if you [69:17] haven't already done. So once that is [69:19] done, we will need to modify a Python [69:21] file that is on our computer and that [69:24] was installed automatically when we [69:26] installed the Movie Pi library at the [69:28] very beginning of the course. So you [69:31] need to go to the folder where Python is [69:33] installed on your computer. A little [69:35] tip, if you are using Visual Studio [69:38] Code, in the terminal, you should have [69:40] the path to your Python.exe and you need [69:43] to go to that path. So here we can see [69:46] that my Python.exe Excel file is in my [69:48] app data folder. To get there in my [69:51] research bar here, I type percent ape [69:54] data percent. I then click on the folder [69:57] that appears. So here we are [70:00] automatically taken to the roaming [70:02] folder. Let's back up once to be in the [70:04] app data folder. Next, let's go inside [70:07] the local folder. Then you can click in [70:10] program as indicated in the path here. [70:12] So program then python then python 3.12. [70:16] So I'm just following the path indicated [70:19] here and then we need to go to the lib [70:21] folder. So this is no longer indicated [70:24] here. So now you have to follow the path [70:26] that I'm indicating. So next let's go to [70:29] the lib folder then to site packages. [70:33] And inside this folder we have almost [70:35] all the libraries that we download on [70:37] python. So here we just need to look for [70:40] the movie pi folder. So here it is. [70:44] Inside this folder we find most of the [70:46] files that were downloaded when we [70:48] installed the movie pi library. And here [70:51] we need to modify the config default. [70:54] py. You can open this file to edit it. [70:57] So it opens directly in visual studio [70:59] code for me. So in this file you need to [71:02] change this line. There is a variable [71:05] called the image magic binary with the [71:07] path to access the software we just [71:10] downloaded. So image magic the path is [71:13] not specified by default. I had already [71:16] made the modification. So me I have the [71:19] correct path to access Image magic but [71:22] you you will need to set the correct [71:24] path to access the software. So I've [71:27] installed it on my D drive. So Image [71:30] magic for me is inside my D drive. You [71:32] can see here the image magic folder. I [71:35] click on it and inside this folder I [71:38] should have the magic.xe file. You can [71:41] right click on it and press copy as path [71:44] to simply copy the path to image magic. [71:47] Then you can paste this path inside this [71:50] variable and put it in quotes like this [71:57] and then it will be good. We have [71:59] indicated to Movie Pi how to access the [72:02] image magic software. So again, I [72:05] installed the image magic on my D drive. [72:07] Maybe you have it on your C drive. But [72:10] don't worry, it will work the same way [72:12] as long as you specify the correct path [72:14] to the magic.xe file. And now that we [72:17] have made this modification, we are [72:19] ready to use Image Magic with Movie Pie [72:22] and write text on our videos. So that [72:25] was all for the installation of Image [72:27] Magic. Again, if you have a trouble [72:30] finding the path to the movie Pi folder, [72:32] you can refer to the path indicated in [72:34] your code editor. So here on Visual [72:37] Studio Code, I can find the folder where [72:40] my Python is installed. So just follow [72:43] the path I indicated to get the site [72:45] package folder, then move and inside you [72:49] will have the config defaults file to [72:52] modify. And once you have made the [72:54] modification, remember to press Ctrl S [72:57] to save. Then you can close this window. [73:00] So that was all for this video and I'll [73:02] see you in the next one. [73:05] So I'm making this video in addition to [73:07] the last one about the installation of [73:10] image magic because some people have [73:12] encountered the difficulties with the [73:14] creating text on Movie Pie due to movie [73:17] pie not being able to find the path [73:19] through the magic.xe file. even though [73:22] the correct path is specified in the [73:24] config default file we configured in the [73:28] last video. So some people despite [73:31] having specified the correct path to [73:33] magic.exe find that when they implement [73:36] text on movie pie the text does not [73:39] appear in the video. The reason for this [73:41] error is that some versions of Python do [73:44] not properly support what were called [73:47] air strings. So the air strings are the [73:50] strings where there is an error in the [73:52] front which allows us to define path [73:55] using just a backslash as used in [73:57] Windows. It's much simpler for copying [74:00] and pasting path from a directory. [74:02] However, in some versions of Python, [74:05] this does not work correctly. So to [74:08] resolve this problem, we will simply [74:10] rewrite the path in another way. So we [74:13] are just going to write the path [74:15] differently. As a reminder, for me, the [74:17] magic.xe file is in my D drive. For you, [74:21] it may be another directory. And to [74:23] solve the issue, essentially you just [74:26] need to remove the error and rewrite the [74:28] path adding an extra backslash each time [74:32] we change the directory. So here I have [74:34] added a backslash and here I will add [74:37] another as well. So you need to add two [74:40] backslashes every time you change [74:42] directory. So this is the classic way to [74:45] define a path to a directory or a file [74:48] in Python. With this writing style, it [74:50] will work every time regardless of your [74:53] Python version. And once you have made [74:56] the modifications, namely removing the [74:58] error and adding the extra backslashes, [75:01] make sure to save your file, you can [75:03] press Ctrl S. And once this is done, you [75:06] can move on to the next video where we [75:09] will be able to implement text on Movie [75:11] Pie without any issues. So that was all [75:14] for this video and I'll see you in the [75:16] next one. Now that we have seen how to [75:19] install image magic on our computer, we [75:21] can start writing text on our videos [75:24] with the Movie Pie. So the text we want [75:26] to write is the author's name on each [75:29] clip. So for example when the first clip [75:32] will play here we can see that the [75:34] author's name is Mr. Azy. So I would [75:37] like the author's name to be in the top [75:39] left corner. So the name Mr. Azy will be [75:43] written throughout the clip in the top [75:45] left corner. And that's what we're going [75:47] to do in this video. And of course it [75:50] needs to be an automated solution that [75:52] does it for each clip in the folder. [75:54] Very well. So before that we also need [75:57] to tell to movie pie which font to use [76:00] for writing the text. Actually by [76:02] default movie pie will choose a basic [76:05] font but it's not a font would have very [76:08] good quality. So the best practice I [76:10] recommend is to choose your own font [76:13] from the internet and incorporate it [76:15] into the script. So I chose a font [76:18] called Robboto. It's a royalty-free font [76:21] so you can use it without any issues. [76:24] And so this is the font we will use to [76:26] indicate the author's names. Very well. [76:29] And so like with all the other [76:30] resources, we are going to import it. So [76:34] here I skip a line and type font path [76:36] like this. Then I type equals. And here [76:40] I can copy past the line above. And I [76:42] just have to replace transition.mpp4 [76:45] with the font. TTF. Be sure to write it [76:49] correctly. Perfect. So we've completed [76:51] the first step. We have imported the [76:53] font and then all that's left is to [76:57] display the author's name on each clip. [76:59] So since this is a modification we will [77:01] make to each clip, we will write our [77:04] code in the loop because it is in the [77:06] loop that we process each clip. And [77:08] first we will need to make a few small [77:11] textual modifications. We can see that [77:13] in the file names besides having the [77:15] author's name, we also have some numbers [77:18] with a dash here. And these are the [77:21] things we do not want to display. So [77:23] first we are going to remove the [77:25] numbers, the dots and the spaces to keep [77:29] only the author's name. For that we need [77:32] to import a library which is the OS [77:35] library. So it's a Python library that [77:37] allows us to interact with our operating [77:39] system. OS is for operating system by [77:43] the way. So with this library we can [77:45] create files, folders, delete them etc. [77:49] So therefore we will use this library to [77:51] retrieve the file names and remove the [77:54] text we do not want to keep. Very well. [77:57] So here let's type a command extract the [78:00] name from the clip path and I will [78:02] create a new variable that I will call [78:04] name which will contain the name of each [78:07] author and then let's type the function [78:10] os.path.base [78:12] name and I put clip path in parenthesis. [78:16] So what does this piece of code do? This [78:18] piece of code is simply retrieves the [78:20] full name of each file. So right now [78:23] this code will retrieve 01- [78:26] MR. Next, we will need to replace the [78:29] text we do not want. Starting with [78:32] thempp4. We don't need this part of the [78:35] text. So let's type the method.replace [78:38] open parenthesis. Then in quotes type [78:42] and then we type again inside quotes. [78:45] Basically nothing. Here we are just [78:47] replacing thempp4 with nothing because [78:51] we don't want to put anything in place [78:53] of thempp4. Perfect. So at this stage we [78:56] have removed thempp4 and now we just [78:59] have to remove the 01 dash and space. So [79:03] to remove these characters we will use [79:05] another function called the l strip [79:08] which is a function that also allows us [79:09] to remove characters but it works a [79:12] little differently. we will basically [79:14] indicate all the characters to be [79:16] removed in each name. So here we want to [79:19] remove the digits 0 1 2 3 4 5 6 7 8 and [79:24] 9. And we will also indicate that we [79:26] want to remove the spaces and dashes. [79:29] And so that's what I'm doing here. I'm [79:30] simply indicating the characters that I [79:32] want to remove. So 0 1 2 3 4 5 6 7 8 9. [79:37] I'm also indicating the dash and then [79:39] the space. And that way all these [79:42] characters will be removed. So it's [79:44] quite simple. We first remove thempp4 [79:47] and then we remove the uh the numbers, [79:50] the spaces and the dashes. Very well. So [79:53] now that we have the author's name [79:55] cleaned, we will incorporate it into the [79:57] video. For that, right after the video [80:00] clip variable, we will create a new [80:02] variable. So here, let's type a comment [80:04] create a text clip object with the clip [80:07] name. So in movie pie text have a [80:10] predefined object just like we have an [80:12] object for videos and an object for [80:14] audio files. So we had the function [80:16] audio file clip for audio files and the [80:19] function video file clip for video [80:21] files. And so just like them we also [80:24] have a function for text and that is [80:26] what we're going to import. So let's [80:28] scroll to the top and we will import the [80:30] function text clip. Perfect. And with [80:33] this function we are now able to create [80:35] a text clip object. So first here let's [80:38] create a variable called the text [80:40] underscoreclipip and then I just call [80:42] the text clip function that I have just [80:44] imported. So first of all I would like [80:47] the name to be displayed always in [80:49] uppercase. For that first I'm typing the [80:53] variable name which contains the name of [80:56] the author and then I type dotuper to [80:59] have the text in uppercase. So we can [81:01] type it like this with an opening and [81:04] closing parenthesis. And by doing this [81:07] all the text will be in uppercase. Next [81:10] I need to define the font size. So this [81:12] is done with the font size function like [81:15] this. And then we need to define a [81:17] number that corresponds to the size of [81:19] the text. The higher the number, the [81:21] larger the text will be. Here I put 100 [81:24] because it is a sufficient value to have [81:26] text. In the top left corner that is a [81:29] small enough. Next we can define the [81:31] color. So, I recommend using white [81:33] because if you use a somewhat [81:35] extravagant color with the colorful [81:38] background of video games, it might not [81:40] be clearly visible. It depends, of [81:42] course, on the content you want to [81:44] automate, but generally it is best to [81:46] use white, especially for video games. [81:49] Next, we need to define the font we want [81:52] to use. So, for the font, we've already [81:54] imported it. So, we just need here to [81:57] redefine the path. So, we type font [81:59] equals to font path. And that way we [82:02] will be able to use the font we [82:04] imported. Then let's complete our code [82:07] by defining the text position in the [82:09] video. So as I mentioned earlier, I want [82:11] to put the text in the top left of the [82:14] video. For that, let's type in the [82:16] method set pause like this. Let's open [82:21] two parenthesis. And here we need to [82:23] provide two pieces of information. We [82:26] need to set the horizontal position and [82:28] the vertical position. Let's start with [82:30] the vertical position. So here I can [82:33] just type left and then we can type top. [82:36] This way I will have the text in the top [82:39] left corner. If I wanted to put it in [82:41] the top right here I will replace left [82:43] with the right. Perfect. So that was for [82:46] the position of the text. And finally [82:49] the last parameter we need to modify is [82:52] the duration of the text. So this text [82:55] needs to appear from the beginning to [82:57] the end of the clip. For that we can use [83:00] set duration just like we did for the [83:02] music. And then we can call our video [83:04] clip variable. And we just have to type [83:07] dot duration to indicate the duration of [83:09] the clip. Perfect. So one last piece of [83:13] code we need to add is the merging of [83:15] the video with the text because here we [83:18] have one video for the clip and one [83:20] video for the text and we need to merge [83:22] them so that they overlap exactly as we [83:25] did for the video sound where we over [83:28] overlapped the music with the sound of [83:30] the clips. So if you remember we have [83:32] used a function called the composite [83:34] audio clip and in the same way we will [83:37] use the function composite video clip to [83:39] merge the two videos. So here let's [83:42] import the function composite video clip [83:44] and then we will be able to call the [83:46] function and use it. So let's create the [83:49] variable that will use this function. [83:52] But first I will add a comment. Let's [83:54] type combine the video clip and the text [83:57] clip. And then I will create a new [83:59] variable which I will call video with [84:01] text. And here I will be able to call [84:04] the function I just imported. So [84:06] composite video clip. Let's open [84:08] parenthesis and then brackets. And here [84:11] I just need to specify video clip and [84:14] text clip. So first we have the variable [84:17] that contains the video the clip and [84:19] then the variable that contains the text [84:22] which is the name of the author of the [84:24] clip. Also here we need to make a little [84:27] modification. Instead of putting video [84:30] clip here, we will just put a video with [84:32] text to correctly add to the list the [84:34] video that contains the author's name. [84:36] And then it's done. We have completed [84:38] the modification we wanted to make to [84:40] the final video. If we scroll down to [84:42] the bottom of the code here, we can [84:44] replace video with transition with the [84:47] video with the music. Perfect. We can [84:49] then save the code. And now we can run [84:52] it. So to run the code, we can do as [84:55] usual. You can click on the button run [84:57] Python file to execute it. And there you [84:59] go. So let's wait for the code to [85:01] execute. We can see that the music has [85:03] been edited. And now it's time for the [85:05] video editing. So let's wait for the [85:08] editing to complete. [85:10] Perfect. So we can see that the code has [85:13] been executed. And by the way, I just [85:15] noticed that it's not a video with music [85:17] here. It's not a video with music we [85:19] should put, but rather video with text. [85:22] Sorry for my mistake. So you can just [85:24] type a video with text here. So now we [85:26] can go to our output folder and start [85:29] the video we just generated. And in this [85:32] video we should now have the author's [85:34] name in the top left corner for each [85:36] clip. Let's check that. [85:43] Perfect. So here we have the author's [85:45] name for the first clip. Very good. [85:48] Let's speed up a bit. Let's see if the [85:50] author's name is there for the second [85:52] and third clips. So for the second clip, [85:55] we also have the name here. It is the [85:58] sixth clip. So it looks the same. [86:02] This is the third clip. We can see that [86:04] each time you have the author's name [86:07] appearing in the top left corner. Very [86:09] good. However, there's a small [86:11] modification we could make regarding the [86:14] positioning. We can see that here I'm [86:16] enlarging the video a bit. the text is [86:19] very tight to the left. Let's put the [86:21] video in full screen. So as I said here [86:24] we can see that the text is quite tight [86:26] to the left whereas on the top part [86:29] vertically we have a bit more space. So [86:32] this is because of the left parameter [86:33] that we defined in our code that the [86:36] text has this position. So what we can [86:39] do to make the text a bit more to the [86:41] right. There is a solution to this. [86:43] Instead of putting left, we can simply [86:45] set the number of pixels to insert the [86:48] text from. So here, if we put one pixel, [86:51] for example, I will put one. The text [86:53] will be very, very tight to the left [86:55] since it will start from the first [86:57] pixel. And so the higher the number, the [87:00] more the text will move to the right. So [87:02] I did some tests on my side and the [87:04] ideal number is 20. So here I recommend [87:07] putting 20. This way the text will be a [87:10] little bit shifted to the right. As I [87:12] said before, the higher the number is, [87:14] the more the text will move to the [87:16] right. 20 is a good number of pixels so [87:19] that the text fits well in the top left [87:21] corner with as much space above the text [87:24] as to the left of the text. Very good. [87:27] So once that is done, we will be able to [87:29] run our code one last time to get the [87:31] final video with all the improvements we [87:34] wanted. First here, let's type clear to [87:36] clean a little bit the console and then [87:39] let's run this code. Perfect. So the [87:41] rendering is starting and we will meet [87:43] at the end of the code execution to see [87:45] the results. So we can see that the [87:48] script has been executed. Let's open the [87:50] file a video with text.mpp4. So I'm [87:53] opening it [87:58] and there we go. We can see now that the [88:00] text appearing in the top left corner [88:02] has been shifted a little bit to the [88:04] right. I find it a little bit more [88:06] aesthetically pleasing like that. where [88:09] before the text was completely tight to [88:11] the left, it's better like this. Oh, and [88:14] by the way, if you ever want to change [88:16] the font or the text size. So for the [88:19] text size, you can just modify the font [88:21] size parameter here. And for the font, [88:24] you can change it yourself by replacing [88:26] the font. TTF file. So you can replace [88:30] this file I left in the project [88:32] resources with another font you want to [88:34] use. Perfect. So now we have the [88:37] author's name displayed each time and [88:39] that's great. It's something often seen [88:41] in this type of compilation on the [88:43] internet even in those shown on [88:45] television where the author's name is [88:47] usually credited in the corner of the [88:49] screen. Perfect. So we can close this [88:51] video. And that was all for adding text [88:54] on Movie Pie. You have seen it's not [88:56] complicated to do. We do this with the [88:58] text clip function to indicate the text [89:01] we want to display with the font. also [89:03] the font size, the position, the [89:05] duration, etc. And then we just merge [89:08] the text with the video using the [89:10] composite video clip function that we [89:13] just imported. Perfect. So that was all [89:15] for this video. Thank you everyone. [89:19] So we have reached the end of this [89:22] training on Movie Pie. We have covered a [89:24] lot of interesting things together to [89:26] automate the editing of these clips. [89:29] First, we saw how to assemble multiple [89:32] clips to combine them into a single [89:34] video. We also learned how to resize [89:37] them to the 1,920 [89:40] by 1,080 format with the 60fps [89:44] so that the video format meets the [89:46] standards used by video platforms. Next, [89:49] we saw how to add a music, specifically [89:52] background music, which we set to play [89:54] until the end of the video to perfectly [89:57] match its duration. We also covered how [90:00] to add an introduction video and an [90:03] outro video, as this is generally the [90:05] convention for such videos. This makes [90:08] the video much more professional. And of [90:11] course, if you already have your own [90:12] intro or your own outro, you can just [90:15] use them by replacing the files that I [90:18] have provided you. And you can do the [90:20] same with the music. Then we looked at [90:22] how to add a transition between each [90:24] clip to ensure that the transitions [90:27] between videos between the clips are [90:29] professionally done and so that the [90:32] transition are not too abrupt to watch. [90:34] And finally, we saw how to add a text to [90:37] the videos, especially to credit the [90:40] different authors. For this, we first [90:43] installed the image magic, which is an [90:45] essential prerequisite for adding text [90:47] to a video with Movie Pie. We then saw [90:50] how to configure it and then how to add [90:52] the text and modify parameters such as [90:55] the color, text size, position, etc. In [90:58] the end, we have been able to obtain [91:00] this video. We can quickly rewatch the [91:03] beginning. So here we have the intro. [91:06] [Music] [91:13] We have then here the first clip, the [91:16] music behind the text appearing at the [91:19] top left. The transition [91:33] >> down. One enemy remaining. [91:47] >> Perfect. So the editing is really [91:50] identical to the compilations of this [91:52] kind that we can find on the internet or [91:55] on the television. We have seen during [91:57] this training that it is quite easy to [91:59] automate this kind of editing and that's [92:01] what we did. And of course this code can [92:04] be reused regardless of the context of [92:07] the clips. During this course we have [92:09] used the clips from the video game [92:10] Valerant as an example. But you can also [92:13] use clips from sports, uh, some funny [92:16] animal clips, etc. The code will work [92:19] the same way. You just have to change [92:21] the music if you want. Also, the intro [92:23] and the outro. For the transition, you [92:26] can maybe keep it. It is a quite a [92:28] generic transition that can be used in [92:30] any context. At the end, you will get a [92:33] video in the full HD format with 60 fps. [92:36] So once again, it is a video that can be [92:38] published on video platforms with the [92:40] recommended quality standards. So if you [92:43] haven't done so yet, the final code can [92:46] be downloaded. And also if you liked the [92:48] course, please leave a little rating for [92:51] the course so that I can read your [92:53] feedback. And if you have any questions, [92:56] don't hesitate to contact me. And I'll [92:58] see you next time for a new course. [93:01] Goodbye everyone.