In the past, we've worked with FFMPEG as a conversion tool, but in fact, this little command line utility is so much more! We kick off this two-part series by first delving into some of the more interesting filters provided by the program!
= 0612 TV =
0612 TV is your one stop for general geekery! Learn about a variety of technology-related subjects, including Photography, General Computing, Audio/Video Production and Image Manipulation! Enjoy your stay, and don't hesitate to drop me a comment or a personal message to my inbox =) If you like my work, don't forget to subscribe!
If you're interested in showing monetary support, consider making a recurring donation at: http://patreon.com/lcc0612
Alternatively, you can send me a one-off payment via PayPal. Click on the "Business Enquiries" button to reveal the email address on this page: http://youtube.com/lcc0612/about
More about me: http://about.me/lcc0612
Official Twitter: http://twitter.com/0612tv
Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.
Thank you 0612! Very informative, appreciate the time you took to make this video. :) Do you know if it is possible to specifically change the pitch of a video to the exact pitch you want? For example to the musical note C4? Thanks!
Hello again! You're welcome! FFMPEG will not detect the "original" or "starting" pitch of your file. You'll have to figure that out yourself first somehow (you can try using Audacity's spectrograph), and then calculate how much you have to adjust the sample rate.
I'm not a software engineer (though I am computer science trained). I work as a freelance educator =)
+0612 TV w/ NERDfirst Hi and thanks a lot for your quick reply! I actually managed to change it the way you suggested. But the problem is I can't determine if the pitch is now at C4 or A3 or any other musical note that I want it at haha I found a way to lower and raise the pitch I think. Now I just have to detect the frequency of the sound file (it is just a 1-2 second file that I want to be able to change). Do you work as a Software Engineer in Singapore? Thanks again and have a great day!
Hello and thank you very much for your comment! Glad to be of help =)
For what you wish to do, it doesn't seem that FFMPEG gives you a direct way of doing it. You'll have to first change the overall sample rate of the audio track (thus affecting both pitch and tempo), then using the atempo filter to revert the tempo back to the original. Source: https://superuser.com/questions/292833/how-to-change-audio-frequency (refer to the answer with the lower score).
Based on what I'm seeing though, you may have better luck using a different tool.
Thanks for the great tutorial..
I want to make video with images and want to add different animations between the images..
I've done with first part..now i want to add animations between different images..
Can you help me with this?
Hello and thank you for your comment! Sounds like you want to create a slideshow with transitions! I'm afraid I haven't done that before, but I see some interesting discussions on superuser that would probably be useful for you! Check it out: https://superuser.com/questions/1189246/ffmpeg-image-slideshow-with-zoompan-and-fade-in-out
Hello and thank you very much for your comment! Glad you found the video useful =)
I'm afraid I don't have experience with chapter management. However, the metadata portion of the documentation seems useful, perhaps you can start your search there: https://ffmpeg.org/ffmpeg-formats.html#Metadata-1
Hello and thank you for your comment! Unfortunately if you're planning on using multiple videos / transitions things may start looking less pretty! I haven't tried it myself but I found someone else trying to do the same thing: https://stackoverflow.com/questions/35852622/combining-videos-with-ffmpeg-using-crossfades-and-plain-cuts
ffmpeg -i output.mkv -filter "unsharp=lx=7:ly=7:la=1.5" newoutput.mkv
the command doesn't work. Its l not 1 right? la instead of 1a? lx ; ly etc? Still doesnt work
cannont connect video filter to audio input
error reinteitiliatin giflters
fialed to inject frame into filter network: invalid rgument
erroe while processsing the decodded datat for stream 0:1
Before I delve too deep into this, let's address the obvious first.
Using "-filter" may tell FFMPEG to target both video and audio streams. Try using -vf (or -filter:v) to target only the video stream first.
Hello and thank you for your comment! FFMPEG offers several deinterlacing filters, you can try yadif (-vf yadif).
For more: https://video.stackexchange.com/questions/17396/how-to-deinterlacing-with-ffmpeg
Hello and thank you for your comment! Unfortunately I have no experience in this. However, you can check if you've specified an encoding correctly: https://en.m.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/subtitle_options#Set_Subtitles_Character_Encoding_Conversion
Hello and thank you for your comment! I'm afraid I've never done this before, but you may want to check and see if the -timecode option can be of use to you. Scroll up a little in the following link to see: https://ffmpeg.org/ffmpeg.html#filter_005fcomplex_005foption
thanks for the reply, but the video will still encode in it's default framerate value which is 12.5fps.
This is what I typed :
ffmpeg -i "My sweet lord.flac" -filter_complex "showwaves=rate=60:mode=cline:size=3840x1440" sample.mp4
EDIT: this didn't work either:
ffmpeg -i "My sweet lord.flac" -filter_complex "showwaves=mode=cline:rate=60:size=3840x1440" sample.mp4
Hello and thank you very much for your comment! I've just added it in now, though it doesn't appear as an annotation, but as a card on the upper right. Didn't realize YouTube has completely removed it's annotation editor.
Hello and thank you for your comment! As far as I'm aware, if you're calling ffmpeg from the command line, you cannot switch out or add new filters. However, for filters with a disable function, you may be able to switch them off or on during certain timestamps, using the "t" parameter.
Validated as working but using the selectivecolor filter slows things down tremendously.
-vf "selectivecolor=reds=0 -.2 -0.2 +.1:yellows=0 0 -.2 0:cyans=-.5 .5 .5 -.25"
You can also use a PhotoShop asv file:
Hello and thank you for your comment! I've just looked up the syntax and it is indeed a bit complex. I might do a video on this sometime, but for now in words:
You have to first target colors using the filter. Then, for each color, you can increase or decrease its cyan, magenta, yellow and black levels. For example, to reduce the yellow from green areas, I would say:
ffmpeg -i infile -vf "selectivecolor=greens=0 0 -0.5 0" outfile
The format is selectivecolor=<color to target>=<c> <m> <y> <k>
Where c,m,y, and k are separated by spaces and are numbers that run from -1 to 1.
Hello and thank you for your comment! Your code would look something like this:
ffmpeg -i infile -vf "scale=640:480" outfile
Replace "infile" and "outfile" with your desired input and output file names. Replace "640" with your target width and "480" with your target height. If that doesn't work, please copy the error message you're getting so I can better help you!
Hello and thank you for your comment! It's not very clear what exactly you're trying to do and what result you are expecting, but it sounds like you want to encode a higher frame rate video down to a lower frame rate one by combining frames?
If so, the filter involved is: -vf "tblend=all_mode=average" -r <target frame rate>
You can manipulate the -q:v flag to further tweak quality if needed.
Hello and thank you very much for your comment! Happy to be of help =)
I do actually have a patreon (http://patreon.com/lcc0612). I also accept one-time donations via paypal. Thank you very much for your support!
Freaking awesome info Video! been looking for this, thanks for the clear explanations and guide! anyway you could make a video on using ffmpeg for multi bitrate profiles with rtmp streaming to hls? and explaining the different options available to you?
Hello and thank you for your comment! I wouldn't know where to start on this as I have never used FFMPEG for streaming before! However, this _is_ one of the more powerful and less-known features of this platform, so I'm definitely interested in exploring! I may do something on streaming eventually though I don't know if I'll ever address what you're looking for I'm afraid!
Another great video mate! I saw what I believe to be Marina Bay Sands, so I guessed you were Singaporean!
Would like to ask you about your username and channel name! What is the significance of those letters and numbers? :)
I can see some of those filters possibly being useful if one wants to apply some quick colour correction to ones footage. Guess I will have to experiment one day! Anyways good to know what possibilities exist, so thanks for detailing out here what else we can do with FFmpeg.
By the way... just curious... what things are you currently working on or playing with at the moment image/video/tech wise... ?
Have a great weekend mate!
Hello and thank you very much for your comment! Yes I'm Singaporean, and what you saw in the video was indeed MBS!
lcc0612 comes from my name and birthday. It's horrible in terms of marketing because nobody can remember it =P
Unfortunately at present moment I'm quite overwhelmed with work so I haven't been experimenting a lot with image / video. My work actually puts me in contact with quite a bit of robotics and microcontroller platforms so I've been playing with those a bit!
Have a good weekend too!
Hello and thank you for your comment! Firstly, please clarify - When you sat ".anyvideo", is there a particular file format with that extension you're looking at? Or do you mean any video in general?
Second, actually it's not quite possible to convert a video to GIF without loss of quality because of the way GIF represents color - Every pixel can only be one of 255 colors (aka 8-bit color) which is not quite enough to represent the full gamut of colors in a video.
my favorite filter (windows compile only -vf format=gray to get grayscale.)
They way I get around it is NOT to compile the linux code. I just use the windows .exe under Wine... it works fine in command line.
We will accept entries between now and June 15th. Posters will ship in July.
YESTERDAY WAS EVERYTHING OUT JUNE 30th.
Filmed primarily during the tour celebrating the 10th anniversary of our debut album, this feature length documentary, directed by our friend Matthew Mixon, follows the band as we reunite with our original vocalist Jesse for the first time since our split a decade prior. The film explores the fatal tragedy that brought the band together and follows our journey across North America as we face old ghosts and attempt to reconcile the past.
Signal Spam is a public-private partnership that allows users to report anything that they consider to be spam in their e-mail client or webmail in order to assign it to the public authority or the professional that will take the required action to combat the reported spam.
The Spam Signal reflex.
A spam report allows to collect all the technical information required for the identification of a spammer, wether the report relates to a marketing abuse or cyber-criminal spam. Signal Spam is responsible for the qualification of your report and distributing useful information to the fight against spam.
Download the plugin that corresponds to your messaging environment and install it.
Report spam from your e-mail and track developments in your personal space.
Thanks to your reports, Signal Spam collects information essential to the identification of spammers , and share them with the authorized actors able to take action adapted to each specific report.
Consult the code of ethics.
The reports provide the digital evidence investigators and public authorities need engage legal procedures, controls and sanctions against companies which send abusive marketing e-mails, and legal actions against cyber criminals.
Easy-To-Use Tools For Hard Trading Decisions.
Find what to trade, when to trade, and how to trade with signals and tools for over 350,000 stocks, ETFs, futures, forex and mutual funds.
Managing your own portfolio is easier than you think.
Create Your MarketClub Account Now.