FFMPEG & Visual Studio Code on Windows: How To Get Started Easily!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this is Steph today we're going to see how to work with FM pack on Visual Studio code so if you would like to um inspect the code FM pack as soon as you are running the script you would like to use this is a um the way that I usually use a inspector so it is an adaptation of what you did in the past with the visual studio with Visual Studio code you can navigate quite easily it is easier than you think in the beginning I thought was a really complicated but if you make the right linking and you use the right configure and the right make everything will be smooth so um the moment I would like to thank you very much for all your support at the moment um if you didn't do it please like share and subscribe hit the notification Bell to be notified about the the videos I'm going to release so Windows ready let's get started okay here we are now we're going to get back to the previous environment that we set in the last video so if you didn't watch the last video I will give it the card here on top um we're going to repeat not repeat the process we're going to get from what we left off so we compile the application we have everything there and what we need to do is to clean everything recompile with different flags so uh the flags are slightly different we're going to compile them or compile FM pack we have the um debug version and the release version uh and so we are going to run a visual studio code with the code that we downloaded the other time and with the um the debug version of the software that we left so far so um let's get started first of all I would like to see the location as it was the other time it is in the um user folder and then I have a folder called TMP and here we have these three folders I'll make everything a bit bigger okay here we go we have the installed where we can make the applications available here and we have the build where we have the uh all the things built as you can see we have F probe and FM pack and on the other side we have the sources so if you would like we can keep this to open in um Visual Studio code and um then we're going to use the application that we are going to build so Second Step what we're going to do is to open the x64 build tools for visual studio I remind you again to the video that we um that I did the last time so even there there is a thing to see how to install all the tools that are necessary to go on with um the compilation and I'm opening the windows terminal so this time I put the windows terminal with the enabling of the x64 Native tools command prompt for visual studio 2022 so I opened this and as you can see there is a new tab opening and here here I'm going to navigate to the msys folder where we have the msys shell.cmd here we have a the command prompt that opens right here so this we can close it we don't need it anymore we are going on with this we're keeping the same size as we did the other time here we go and right here going to increase the size just to have everything a bit more visible on the screens and what you can do is to navigate to the folder that we have here the folder is a on the C users your username in this case is mine okay and then TMP and we are going to the build folder here we go okay and here we have all the built things what we need to do now is to clean everything so we're going to wipe in order to recompile again so I think there are common that we can make is uh common you can send is a make clean all so here we're going to wipe everything and restart from a cleaner compilation of all the things so we're going to reconfigure and we are going to compile with the make again okay so we wait a second until the process finishes okay here we have a bit an error uh right here but it's not a problem for us so it allows us to compile FM Peg back again if you don't like you can start over and re-download but it's not the it doesn't make us so many problems anyway um during the compilation of FM pack the latest step one the first step that we need to do after we downloaded the code on the FM pack build is to configure so we take the command from the other time this is a what we did if you would like you can uh delete the enable yasmus since it's going to be deprecated then um we can keep the enable static enable libx264 we remove the enable non-free we keep the enable debug because we're going to create the debug version of FM pack you can enable or disable by default it is enabled if you put the disable here it's going to disable but in this case we want it enabled and we got to put another flag here um that is the disable optimizations what do do these things do uh this uh disable D here disable optimizations foreign the thing says remove the optimization but why do we want to remove the optimization it seems like that we're going to slow down everything uh because uh the compiler is not only a translator from source code to executable it's also a matter of optimization for example if there's some code that is not reachable it will remove it completely or if you have something that can be done faster in assembly it's going to render this thing faster in this case um the optimization prevent a one to one alignment from the code to machine instructions so in this case um uh there's a translation this thing is done one-to-one so from machine code to from code to machine code we're going to align them all so it allows us to skip into every line of code that fmpeg has so this uh is necessary if you want to configure uh FM Peg with the right thing so here it's okay we can go on and the rest can be kept like this uh what is important is uh to locate the executable later but this is a not done neither here nor in phase of a compilation so we start with the configure we are waiting [Music] okay and here we have the whole configuration so I want to specify we have the architecture that is a x86 here it writes a x86 by 1864 bits we already gave the thing right here uh we gave that the compiler is the one provided but Microsoft we have all the also the external libraries and now as you can see we have as a library uh um GPL in this case version 2 if you would like you can also enable the version free um but here everything is fine so a thing that we can do is to run a make with the number of course you would like this case I put the number of four and we're going to wait until the end anyway this time is very long okay so we finished and now on to the next step Visual Studio code installation configuration and then running over FM pack cool okay if you would like you can also close everything so no worries here everything is done um just to check we have a FM pack.exe we have a FF Pro F Peg G that is the debug version.exe and then also FF Pro over and F approach worries uh here we can finish and now on to the installation of Visual Studio code so we open a browser window and in the browser window we search for visual studio code we've got Studio code we go and here we have a the first link that will bring us to the page and here we have directly the pages to download a visual studio code so here it takes uh almost 90 Megs go it is and it's almost finishing [Music] good 10 seconds and here we go so now it has been downloaded I'm going to run it so installation is pretty straightforward per se and so we have this window appearing so you accept the agreement let's go on here if you would like to put the thing into path uh so it requires a share restart but anyway this is uh to use a code if you type code it will open uh Visual Studio code you can go on and you can install and everything will go on as uh as forecast so I don't do it because I've already installed it and now it's time to open it okay so if you would like to um open Visual Studio code we're going to the start menu and uh type Visual Studio code here we go once it opens we have a here the possibility to start by opening a new file opening a file or open up folder in this case what you would like to do is to open a folder and the folder is under TMP sources fmpeg and we select the folder here we go we have a this thing that opens other thing that is important is which are the um or the extensions that we need to install extension so we need to install uh first of all C C plus plus and if you would like the CC plus plus extraction spec this is a fundamental if you would like to go on with the um configuration then the other extensions are called navigation so if you type a code navigation this is the one that you will find this is a useful if you want to go into the methods and the variables so you want to climb up the tree of the source code that you are having in your project then um you have a vs uh yes cold sorry yes called icons it gives a a new uh visualization of the icons in fact these are not the icons by default you will find on the default installation of Visual Studio code but as soon as you apply Visual Studio code and you reboot these are the extensions that you will find so um I have others since I'm using also python I'm using cmake I use make file um I also installed pre-tier uh like install it install it and it's not mandatory there is also kite since I'm using um this was a fundamental with the python mostly but the extensions that I mentioned are the fundamentals so um so far so good the thing that we need to do next is to configure um our let's say project so let's see how to launch a video Studio code with the the executable that we might have uh the program since we are dealing with FM pack is under ff2s fmpeg.c and here we have all the source code that is run as soon as you run um FM pack then I think that we need to do here is if you would like to run this case it there is a there's a prompt it is a palette that comes up so what we would like to do uh in this case we got to take a Windows launch so the last option that you find is palette um here doesn't exist so we got to open launch dot Json um here what do we have we have a C plus plus with GDB but in this case we don't use GDB we use a C plus plus Windows sorry that I'm is misclicked so let me do it again we have debug Windows launch open launch.json and here we've got C plus plus windows here we have a there's a uh a file that opens and essentially we have now a new file that is a DOT vs code launch.json and in this case we got to run a new configuration for to run a new configuration sometimes you will find a button right here but in this case okay here if you escape and you go back you have the button that is the add configuration in this case the add configuration we got to take C C plus plus Windows launch and here we have a plethora of options that we can use um the options that we need to change is in this case only program this case we got to take the location where the program is the executable that we want to execute is so in this case [Music] the um executable is under put it under C um this gives a forward slash backslash uh we take the forward slash so otherwise if you take the backboard slice that is the window style got to put double sometimes it's easy to forget so we can put the C forward slash excuse users name and um then we have a TMP build this case this is FM Peg underscore g dot exe this should be the folder otherwise you have some problems like a file to your name workspace folder and something like this but in this case it should be more than fine if you put the absolute folder it's a less flexible if you would like to change from one side to the other um in this case uh it is fine like so okay other thing is to put the arguments so in this args option we have the common line arguments you want to put in your configuration in this case we don't have anything particular we put the minus H that tells all the help that we need to have if you want to put multiple options put a comma remember it and put other things between double quotes in this case it is fine like so we save the launch configuration and now we go back to the a previous instance to the pre so to the code that we have here we're going to um like launch and we can launch back going to Windows launch and uh so here I think I made a mistake because it says that the impact doesn't exist as it is so let me search for it I will copy the location foreign Peg FM Peg g.exe cool [Music] so we can debug the file and here we go we have the new thing right here um here we ran the program simply if you would like to get a step-by-step um walking through the colder we have an option that is right here um it should be [Music] here stop at the entry stop at the entry you can put this to true and once you save and run the thing back again Windows launch you have the application that stops and here we've got the first line of code so here what you can do is to go with F10 f11 or F9 to shift and f11 to step in and step out your code so here you can go and see what it does go on and in the meanwhile we have all the help it has come out and because it has already passed the option and so on and so forth cool here we finish let's go on to the next step so we're going to run uh an effect program I have a bad comment sorry okay so uh now how to run the um FM pack with a normal comments so first of all let's have a look at what we would like to run so we have our folder right here so we have a Big Buck Bunny uh ready here I'm running with VLC just to take a look at how the video is so we have this 10 seconds of video and uh [Music] what we need to do is uh to go to the launch.json and right here replacing what we have with all the options so all the options must be um separated so all the arguments are separated by space so whenever you find a space in the FM pack command we're going to um do it uh we got to put a new argument right here so here we have minus I then we have the name of our video file that is a yep we have to copy as path we copy here once we copy the this is path remember to either put a forward slash or a double backslash so here we are more Linux like and we put forward slash okay then what you can do is to put I don't know the minus CV lib x6264 now we don't mind so much you got to put another command line argument and all the arguments separated by comma good and then the output file so we're going to copy from here test [Music] output .np4 and we run the program so if there is some mistake it's going to notify us okay so we're going to launch [Music] and here we have all the comments so first of all there's the showing on the banner so we have all the first part of the program then good it is going in it gets all the timestamp here in this case going to transcode as you can see it's right here and it goes until the end we have the exit of the program here we go the program is exited okay this is uh far from being a deep inspection we make a video dedicated to that but this is the first beginning so if you are up to this point congratulations we've done uh the running of the program within Visual Studio code good good today we run a visual studio code with FM pack um it is so much fun to go into the code so uh once in a while we enter uh the code we enter hardcore the inner guts of Fun Pack uh for the moment um so we'll be satisfied we're making other videos and we're trying to inspect some videos and see what does FM pack do as soon as it enters we enter the options so for the moment thank you very much for watching uh if you didn't do it please like share and subscribe and hit the notification Bell to get notified about the next videos I'm going to release follow my social media and I hope to see you next time for the moment uh making my wishes for a happy New Year and see you next time for other content regarding multimedia and much much more ciao [Music]
Info
Channel: Dev Stef
Views: 4,701
Rating: undefined out of 5
Keywords: ffmpeg, ffmpeg tutorial, tutorial, FFmpeg (Software), ffmpeg help, how to, how to use, basics, filters, effects, fundamentals, getting started, video conversion, audio conversion, video, install ffmpeg, visual studio code, ffmpeg visual studio code, debug, debugging in vscode, debugging in visual studio code, ffmpeg debugging, debug ffmpeg, ffmpeg debug, dev stef, devstef, devstefit, vscode, vscode setup, vscode plugins, vscode plugins for c++, visual studio code plugins
Id: OF0z4z7A1lM
Channel Id: undefined
Length: 27min 2sec (1622 seconds)
Published: Thu Dec 29 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.