You sir just crushed it! Blew all the videos I have watched on FFmpeg and pretty much any CLI tutorial out of the water. I love the way for broke those switches down Barney Style, I love it!!!!! Thank you again, subscribed. Keep them coming. There are too few videos that explain these tools with such clarity.
+victormgv Hello and thank you very much for your comment and support! Really happy to be of help! Hope to see you around in the comments section of the videos to come =)
Thank you for all the help. Been needing to transfer old home video files from DVDs to online. It's cool how a community has made such an excellent tool for file transfers. .vob files to .mp4 are not easy to work with, and this did exactly what was needed. Still, 8 years later, and you're still keeping in touch with your community? It's sweet to see. Thanks again
You're very much welcome, very happy to be of help! Yes I'm definitely still hanging around. This channel is a passion project so I'm always appreciative of any engagement!
Whoaaaaaa. This video is a great tutorial, but this guys is so RESPECTABLE. If you scroll down all the way to as far as you can got, he has answered EVERY. SINGLE. COMMENT. He will answer this just you wait.
I watched this video about two years ago. This weekend, I was wrestling with our own home-grown video rendering and decided to have another look, and now my life has changed. I wonder what other great, life-changing advice this very smart guy has?
Hello and thank you very much for your comment! I can't promise life changing videos, but if you check out the channel you can find 900+ videos created over the years =)
Great tutorial! Not only does it deliver all the info I need to get started, but you also seem so enthusiastic about it that it actually got me pumped to dig in. Thanks for that!
Amazing walkthrough. when starting out you search up how to use these command line tools up on forums or reddit and you basically get told to not be dumb or they act all high and mighty and start explaining as to why what you want is wrong. in short they give you everything but a solid answer or what you want
Hello and thank you for your comment! Unfortunately that's how the internet is, though it does bear mentioning that issues like the AB Problem are very real. At any rate, the command line gets better with time and practice. Keep at it! I'm glad I've been able to give you the nudge you need :)
Before watching this video I wasn't able to understand what that items such as -i, -filter, v, a mean and in which place they should be placed in the array, now everything is clear to me thanks to this super helpful video, thanks a lot!
*Expand for Important Notes* *1. On Download Availability* Zeranoe, which was featured in this video, has discontinued providing FFMPEG binaries since 2020. You can download from this github page instead, as linked to by the official FFMPEG downloads page: github.com/BtbN/FFmpeg-Builds/releases. Windows users can go for the "ffmpeg-master-latest-win64-gpl" build, as the GPL version is likely to have the most features. *2. On Debugging and Help* Unfortunately due to high IRL workloads, I'm not able to look at your commands and help diagnose problems. You may contact me at hello(at)nerdfirst(dot)net for paid consultation, if you really see the need. *3. PSA* If you have a question, please post it as a new comment, *_not_* as a reply to one of my earlier comments here. RU-vid does not reliably notify me of the latter, which means I may miss your message!
Today was the first I ever heard of the FFMPEG, I just needed to replace audio track in an mp4, and I got the exact info I needed in under 4 minutes. Great Job.
I could not get the audio works after converting it from mp4 by using vlc. This works great.... all i have to do now is to increase the audio quality. Thank you so much! Your tutorial is fantastic!
and here I am, developing Flutter Mobile Apps for compressing Videos inside the app, watching explanation of FFMPEG. this 6 years old video is clear and easy to understand. Kudos to you!
Thank you so much for this tutorial series about FFmpeg and CMD. It really helped a lot, and if you don't mind, could you please consider adding a video to that playlist talking about how to handle subtitles as well. Like how to bulk extract multiple subtitles from a single video and also from a bunch of videos placed in the same directory. Hope you consider, coz all other topics regarding the video and audio part were covered, except for this one. Thanks again.
Hello and thank you very much for your comment! Yes, subtitles and livestreaming are two major topics in FFMPEG that I haven't yet covered and are on the drawing board. I don't use these features often so I tend to need more time to research and understand them better before I feel comfortable enough to make a tutorial. Thanks for the suggestion!
dude, this is fantastic. Thank you for demystifying this. The email group that the official site recommends for this utility is full of people who have no business being asked questions about how something works.
You're welcome, very happy to be of help! Though to be fair, creating a broad how-to video versus having to answer questions are two very different skillsets, so I totally understand the discrepancy.
Very good explaination. I wondered how to install it first, I had to download a static build and watch a video on RU-vid on how to install it. Getting it to run is way harder than actually working with it.
Hello and thank you for your comment and for sharing! If you must have spaces in the file name, you can wrap it in "quotation marks", ie. ffmpeg -i "input file.mp4" "my output file name.mov"
Mine gives me the PowerShell command window option instead. I still tried your line at 4:45 converting from avi to mp4 and it works! First time that I follow a tutor on this complicated subject and it works after many failed attempt from others! Thanks a lots!
Hello and thank you for your comment! Yes, newer versions of windows prefer powershell over cmd, but it largely works the same. Glad you got it working!
Hello and thank you very much for your comment! Very happy to be of help, have fun with 360 video! I hope to be able to dabble with that someday as well.
Hello and thank you for your comment! This question isn't easy to answer, since of course the specifications of your computer matter greatly. Plus I can't say I've had experience using FFMPEG in a live context. You'll just have to experiment with settings to see. Some operations and presets are much less CPU-intensive than others.
@@NERDfirst I've then watched your other video about advanced filters, great too ! I knew the basics already, but it's always interesting to check how other people explain things, there's always something to learn you either didn't know or didn't use properly. I had no idea about the difference using '-ss' before '-i' vs after ! :) Thanks, your videos are very understandable and I like the effort with the animation/graphics you put in them ! Cheers
Thanks a lot for the tutorial, it is very clear and all the relevant info is there. As it happens, I had FFMPEG on my computer for years without knowing about it :D Cheers
ffmpeg and Video.js are great examples of incredible software that go largely unused because they make no attempt to educate others on how to use them.
Hello and thank you for your comment! I don't think software like FFMPEG are really designed for mass consumer use, which is why you may find the documentation scant or lacking. I don't blame them for that at all - GUI wrappers for FFMPEG do exist, and for the rest of the gaps, I suppose it's up to the community to help fill in! After all, that's the spirit of FOSS.
Thanks. I got suggested FFmpeg by Audacity but had no idea how to use it. This made things really simple and now I can use a converter without having to open another app that would probably charge money :D
Hello and thank you for your comment! Glad to be of help :) Though, if you're only using Audacity, it can do all the conversions for you! So you don't even have to use the command line in the way shown in the video.
@@NERDfirst Interestingly enough, I tried that and also another free application that I use in music sometimes called Virtual DJ, but neither of them were able to read the file for some reason.
Hello and thank you for your comment! I'm afraid I have not used flowblade and so cannot comment. FFMPEG is, in and of itself a standalone utility, so unless flowblade is integrated with ffmpeg, it doesn't seem like it can be of much use here.
OMFG! It works! Less than 100 mb and it works! No frills, no gui, all results! This successfully converted .MOV files (H264) to .MP4 and I can now import them to Adobe CS 5.5 (old school, I know)!
Hello and thank you very much for your comment! Glad it works out well for you. As you get more proficient with it you'll find yourself reaching out for graphical tools less and less =)
Hi. Your video was nice. It was very useful as well. There are no good tutorials for ffmpeg. I wanted to learn ffmpeg complex filters..like combining videos at different positions, overlays...do you know of any good resource to learn the same ? I'm tired of stack over flow answers.
Hello and thank you for your comment! If you haven't already, you may want to check out the other videos I have on this topic. Advanced Filters: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-M58rc7cxl_s.html Filtergraphs & Timeline: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-hElDsyuAQDA.html
I"m curious about a certain ffmpeg code. And how would I batch convert 170 files with different names, (ex Seinfeld S1E01 - thisthat, Seinfeld S1E02 - nowthen Seinfeld S2E09 - whythere Seinfeld S2E10 - herethere, Seinfeld S3E01 - nowlater, Seinfeld S3E02 - greenyellow, Seinfeld S4E05 - laterlater ) Why didn't the following code change the audiobitrate (keep codec type for both)? -vcodec copy -acodec copy -b:a 128k Why did the following actually change the audiobitrate (keep code type for both)? -vcodec copy -acodec ac3 -b:a 128k Codec for audio is AC3 with a bitrate of 192kbits in the original file. I wanted to keep AC3 for the audio codec and change the bitrate to 128kbits, and I thought -acodec copy 128k would solve that issue. But when simply typing -acodec copy 128k the audio bitrate stayed the same. Instead I needed to type -acodec ac3 128k for it to actually work. Why is this? ========================================================= I initially rip the following Seinfeld episode from my DVD to VOB, then used MeGUI and converted it to an mp4 file. I want to change the audio bitrate from 192kbits to 128kbits while keeping both the video & audio codec the same. The following code results in the same exact file. It didn't change anything whatsoever when I used mediainfo. I'm doing this because when I first converted all Seinfeld episodes, MeGUI made the audio 192kbits. (A) Didn't work. (NOPE) ffmpeg -i "Seinfeld - The Pilot.mp4" -vcodec copy -acodec copy -b:a 128k SEINFELDNEW.mp4 Seinfeld - The Pilot.mp4 has an audio bitrate of 192k SEINFELDNEW.mp4 still has an audio bitrate of 192k (B) Did work. (YES) ffmpeg - i "Seinfeld - The Pilot.mp4" -vcodec copy -acodec ac3 -b:a 128k SEINFELDNEW.mp4 Seinfeld - The Pilot.mp4 has an audio bitrate of 192k SEINFELDNEW.mp4 still has an audio bitrate of 128k Part 2: Now, I can use the program Avidemux to get it to do what I want, but Avidemux can't batch convert. I have do it individually 172 times to convert all Seinfeld episodes. Part 3: How would I batch convert all the Seinfeld episodes changing only the AUDIO bitrate when the files are named like such: Seinfeld S01E01 S1 D1 VTS_02_1 - The Pilot Seinfeld S01E02 S1 D1 VTS_03_1 - Male Bonding Seinfeld S01E03 S1 D1 VTS_04_1 - The Stakeout Seinfeld S02E01 S2 D1 VTS_01_1 - The Ex-Girlfriend Seinfeld S03E01 S3 D1 VTS_01_1 - The Note etc. etc. I'll probably eventually manually change them to Seinfeld S01E01 - The Pilot Seinfeld S01E02 - Male Bonding Seinfeld S01E03 - The Stakeout Seinfeld S02E01 - The Ex-Girlfriend Seinfeld S03E01 - The Note etc. etc.
Hello and thank you for your comment! Regarding Batch conversion: If you're on Windows, you can use a tool like Forfiles to help you. I've done a video on this before, check it out: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-1mTFYyfYBS4.html As to Changes to bitrate: Whenever you say -acodec copy, it doesn't mean "use the same codec". It means "copy the stream", which usually implies that you cannot really make modifications to it. Changing bitrates is one of the operations that you cannot do when you perform a stream copy. Same deal with -vcodec.
Hi, I would like to know, what command I should use to change the name of the Encoder shown in the Metadata without actually changing the encoder or encoding profile.
Hello and thank you for your comment! This isn't a use case I've even remotely considered doing before, so I won't be able to advise exact steps. You might want to look towards exiftool, it works wonders on video too.
Hello and thank you for your comment! I don't much experiencing streaming with FFMPEG, but you may want to refer to this official streaming guide which is fairly comprehensive: trac.ffmpeg.org/wiki/StreamingGuide
So how can i make a video still image + sound (audio file) lossless with ffmpeg? I want the still image video to sound just like the audio track/file if its possible, i dont want any transcoding. Also, i'd like to know if i can do it vp9 webm lossless if there is a way as well? im trying to make one single still image with sound (Music) video.
Hello and thank you for your comment! Sounds like you want to do a slideshow of one slide. For that, FFMPEG documentation has some details: trac.ffmpeg.org/wiki/Slideshow If you want to simply copy the codec, specify -ac or -acodec copy. Note that this doesn't make it lossless - This assumes that your original audio is lossless. FFMPEG will keep it the same way without transcoding. If you want to use VP9, specify -vcodec libvpx-vp9. More on vp9 here: trac.ffmpeg.org/wiki/Encode/VP9
1. I have another question: i did a screencapture using OBS of a video, getting a .flv video file. I use this technique to convert it to a .avi using the quantizer (-q 1) command. I tried 0/1/10/50. The only acceptable values were 0 and 1. The others looked like 240p versions of the original. But even the 0/1 ones were just okay, they were visibly worse than the original .flv file. In this video you only say u can set the q value to single or double digits. Is the lowest number and highest quality quantizer value 0 then? Or is there a higher quality setting I can use? the highest quality quantizer should be the same as the highest bit rate in the finer control, no? Also I don't understand what the bitrates I can use are, is there a guide you can suggest? like my vse allows me to export audio bitrates up to 384kbps and it uses ffmpeg to do it. SO its 384 the max audio bitrate? But then what's the max video bitrate value I can use? again in my vse its 10000 but im not sure if that value is correct or if there's a better one. Also the -q 0 sized file was 70mb whereas the original .flv is only 26mb....but the original still looks much better? why? 3. Next there's 1 bit i'm missing. The commands you mentioned were for changing the container, like from .avi to mp4, etc. What happens with the codec....? Do these commands copy the codec of the original and use it in the new container? Also I'm assuming changing the container re-encodes everytime, is this correct? IF I'm changing to a container that doesn't support the original codec does it give you an error or what happens then (like say I had a .wav file in a .avi and made it into an ,mp4, how does ffmeg work then. im assuming .wav can't be stored in .mp4 containers) ? 2. Do filters re-encode? say i just want to half the volume, is it gonna re-encode the video? How would u tell if something re-encodes?
1. Regarding the quantizer setting, not all codecs use the -q flag. I have no experience with FLV, but see if there's a different flag or setting that would work better. The range of quantizer values also depend on the codec. For bitrates there isn't really a "maximum" unless your codec enforces one. Of course, beyond a certain point you won't get any more perceptible quality. I don't really have any guidelines for you, go with your gut! For me, if it "feels" okay it's okay. If you're still worried, you can search the net for some common values. As to your last point, higher file size doesn't correspond to higher quality (the other way tends to be more likely, but even then it's not always the case). I don't know what was done to the video exactly, but every bit of processing will clobber it further. 2. You can take it that all FFMPEG operations re-encode unless you explicitly tell it not to. 3. When codecs are not specified, FFMPEG picks one for you based on the container you've selected (it will of course pick a valid one), and your media is re-encoded to that codec. I have not changed codecs very much to be honest but I'm sure FFMPEG will complain if you do something that's invalid or incompatible.
hey! may i ask some quesion my KTV mpg, in poineer dvd player can select L+R with stereo, ffmpeg how to make command line.thank you. now i'm using WinAVI all video converter,buy just give me 480X480, play on tv screen not full image (ffmpeg -i 123.mp4 123.mpg)123.mp4: no such file or directory
Hello and thank you for your comment! Regarding your first question, I'm not exactly sure what you're looking for. Do you mean you want to make a karaoke style video that has instrumentals on one channel and vocals on the other? For your second query, if it says "no such file or directory", it means that ffmpeg cannot find the file. Make sure that "ffmpeg.exe" is in the same folder as "123.mp4".
Hello and thank you for your comment! I apologize for the late reply - I never get notified properly on replies to comments for some reason! I recently realized that another reason why the entry does not appear is if you have a file in the folder selected. The context menu that appears (even if you right click on empty space) is tailored towards the selected file instead, and as such the entry does not appear. Try to make sure no files are selected by clicking on empty space. Then try the described technique again and see if this helps!
It says there's no directory/file of my video, do I have to pick the whole directory? You seem to just use the file name and format which I am doing, but that isn't working out for me. My exe. also doesn't work, I have to run the batch though and my ffmpeg folder is in thje same directory as the videos in question. I'd be more than greatful if you could help me. Regards.
Hello and thank you for your comment! From the two problems you've listed, hopefully they're two symptoms of the same problem instead of two different problems. If ffmpeg.exe is in the same folder as your videos, then you should be able to run it the way I did (ie. ffmpeg ). But this will only work if your command line is pointing to that same folder. Did you open the command line within that folder? If not, try it and see if the problem persists (With the folder open, hold shift, right click empty space and click on "Open Command Window Here"). It is also possible that you've simply typed the filename wrong. Make use of the autocomplete feature to help you (type the first few characters of the filename, then press tab on your keyboard). EDIT: Hang on, did you say your ffmpeg _folder_ is in the same folder as your videos? That wouldn't work. Move ffmpeg.exe out of that folder so that the exe file is sitting right beside the videos in the same folder. Try again and let me know if that works!
Hi, just found your channel as I have a question about ffmpeg. Can you convert an rmvb video file format to mp4 file format without re-encoding? every time I try I got an error message saying “ cannot find codec rv40.......”. If I use the command ffmpeg -i input output, it will re encode it. Thanks
Hello and thank you for your comment! I don't have any experience with rmvb, so I can't say for sure. Try updating FFMPEG to the latest version. Usually, missing codecs indicate an outdated version of FFMPEG. If you still get the same error after specifying -vcodec copy (and -acodec copy if you need it), then perhaps ffmpeg doesn't support this codec.
Hello and thank you for your comment! Typically, when you run a program from the command line, that program must be in the currently-open folder. Otherwise, it cannot be accessed. That's why we introduced the idea of a staging folder, in which FFMPEG.exe sits. If you put FFMPEG.exe on the path, you can run it no matter what folder you're in. Because of this, you don't technically need a staging folder anymore. You can run FFMPEG directly within the folder in which you store your videos.
If I use the basic command line prompt without specifying a target quality, will the conversion execute using the highest quality or maintaining 444/422 codecs? I intend on using ffmpeg for converting my DNxHR 4444 media to Apple Prores 444. Thanks!
Hello and thank you for your comment! I wasn't able to find formal documentation of the default configuration, so I can only speak from experience - From what I have seen, default quality is not very high, and does not appear to make any attempt to preserve any properties from the original file. Best to be explicit if you have specific requirements.
Thanks for the video, using the ffmpeg, what's the command for: 1- convert DVD to h264 mp4 with variable bitrate of maximum 5000 kbps 2- convert a video file or DVD to hq prores 422 uplscaling to 1080 Many Thanks
Hello and thank you for your comment! Some commands may be subtly different on a Mac, though what you tell FFMPEG remains the same. What is the command you have tried, and what error did you get?
What syntax do you use to record the desktop and audio at the same time both the output and input. Probably different syntax for input and output audio
Hello and thank you for your comment! I'm not too familiar with your use case unfortunately. Personally I find that if you want to do this, it's probably a lot easier to go with software that is designed for this, especially when you have to start dialing in settings later on for quality and the like. For this use case I recommend OBS: obsproject.com/
Hello and thank you for your comment! The video might be old, but FFMPEG is still consistently being updated. I find it indispensable for my use case and other options can't really compare.
Hello and thank you for your comment! When you do _any_ form of video conversion, expect to lose some quality, even if very high settings are used. This is caused by video compression techniques having to "unpack" and "re-represent" data (aka re-encoding).
Hello and thank you for your comment! You can do this with powershell as well, just add a ./ behind the command, ie ./ffmpeg Alternatively, you can open the command line window by just typing "cmd" in the address bar - That's where the path of the folder appears.
Thanks for the video. I am trying to capture a screenshot from a video, but I have a URL for the video instead of the actual video file. Please suggest me is there a way to achieve this using FFMPEG or any other tool. Thanks!!!
Hello and thank you for your comment! I don't have much experience using FFMPEG to work with URLs. If your URL points directly to a media file, you should be able to do it just fine. However, if you only have a link to a site on which the video is embedded, that might not be enough! You may want to use a tool like yt-dlp to download the video first: github.com/yt-dlp/yt-dlp
Hi, please, Would it be possible to change the h.624 metadata using FFmpeg? What exactly I need is to change some assets that are as follows in SPS = fps 5994 \ 100 and the correct one would be fps 60000/1001.
Hello and thank you for your comment! I'm afraid I don't have experience with metadata. From what I know, metadata is finicky to work with at the best of times. See if this helps: stackoverflow.com/questions/11474532/how-to-change-metadata-with-ffmpeg-avconv-without-creating-a-new-file
please help i have .mkv file and i tried to do the same thing and it says ffmpeg : The term 'ffmpeg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ffmpeg -i ventex.mkv ventex.mp4 + ~~~~~~ + CategoryInfo : ObjectNotFound: (ffmpeg:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Hello and thank you for your comment! It sounds like your command line can't find ffmpeg. Make sure you're in the ffmpeg installation folder, or do the required setup for the PATH variable (which isn't covered in this video).
For the filter parameters at 8:54, I think there is is shortcut ( -af volume=2 ). -a for audio -f for filter Similarly to add filter to a video, you can do, for example -vf scale=-1:720, to shrink or expand a video to 720P -v for video -f for filter, scale is the filter function to scale the video input -1:720, -1 means to keep the original ratio and adjust width automatically, 720 sets the height of the video to 720px.
Hello and thank you very much for sharing! Yeah, there are many shortcuts available in FFMPEG. Unfortunately the video was already running a little long and I was saving those for a future video =P Good to have a reference here though!
I just came across your channel and this video is great. Do you know if we can do a prelim sort of file analysis before we run any commands that could (and it will) destroy the file? I'm thinking video quality report and audio current settings such as mono or stereo. So a basic report of the file we want to play with before hand. Thanks and I will be looking out for any comments from you or anyone ffmpeg enthusiasts.
Hello and thank you for your comment! FFMPEG ships with ffprobe. You can consider that, though I'm not sure how much good information you'll get out of there. PS. Trying out ffmpeg commands won't destroy the file - Just don't overwrite the original and you'll be fine.
Hello. I wanted to remove some frame duplicates in my video, and I used a code I found from a website. ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB output.mp4 But my computer says that "ffmpeg" is not recognized.
Hello and thank you for your comment! If ffmpeg is not recognized, it indicates that it is not installed correctly. Follow the instructions in the video for installation. Alternatively, put the video files in the same folder as ffmpeg.