How to make a spectrogram with FFmpeg on Linux. This is very cool.

Making a spectrogram with FFmpeg on Linux is very easy. The FFmpeg utility is the best way to accomplish this task. This simple command will render a spectrogram of the audio file. This can be very interesting if the music file contains hidden information in the audio. ┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5/Music/Rap] └─$ ffmpeg -i das\ efx\ -\ … Read more

Very interesting Bash shell script for creating a Webm clip from a movie.

This is a very useful Bash shell script, this will create a Webm clip from a movie. This shows how to get parameters in a Bash script easily. #!/bin/bash   while [[ "$#" -gt 0 ]]; do case $1 in -f|–filename) filename="$2"; shift ;; -t|–timestamp) timestamp="$2"; shift ;; -o|–outfile) outfile="$2"; shift ;; *) echo "Unknown … Read more

How to encode a movie clip with FFmpeg and have the encoding start right away.

Encoding a movie clip with FFmpeg is very simple, but getting the encoding to start right away is the hard part. Sometimes it will take many seconds to start, but this is due to the slow searching through the file looking for the right section. Putting the “-ss 01:58:11” parameter before the “-i” parameter is … Read more

How to get the best quality when creating a webm with FFmpeg.

Rip a Youtube video to a good quality Webm with FFmpeg This very useful command will get a Youtube video and rip a certain timeframe from the video to a good quality WebM file. Create a Webm with FFmpeg. ┌──[[email protected]]─[~/Videos] └──╼ ╼ $ ffmpeg -ss 00:00:55 -to 00:01:05 -i `yt-dlp -g -f bestvideo GbPK2VCarvU` -threads … Read more

How to merge sound and video in FFmpeg. This is very helpful sometimes.

To merge a Video file and an audio file, only FFmpeg is required. I needed the audio from one other video, I ripped it like this. ffmpeg -i Online-1.mp4 -vn -acodec copy output-audio.aacffmpeg -i Online-1.mp4 -vn -acodec copy output-audio.aac Then I could use this command to merge the aac audio with a silent video to … Read more

How to use FFmpeg to get a slow-motion video clip.

Making a slow-motion clip from a video can be very useful to show off what is happening in a certain scene. The example below will make a slow-motion clip from a video file. This would be another very useful FFmpeg tip. > ffmpeg -i qS_lu5dKo9A2qoNW.mp4 -c:v libvpx -b:v 3200k -filter:v "setpts=2.0*PTS" -ss 00:00:03 -t 6.9 … Read more

How to properly brighten a video file with FFmpeg.

Making a video file brighter is very easy, this can be done with FFmpeg. The curves filter can easily brighten a video file without causing much degradation at all. Use this example to make a video file a bit brighter and it will still be the same quality. ffmpeg -i -i underground-war.mp4 -vf "curves=all=’0/0 0.4/1 … Read more

More fun with FFmpeg. How to reverse video colors in interesting ways.

FFmpeg allows interesting video manipulation. This includes inverting the colours of video files. The example below will invert the colours of a video file. ┌──[[email protected]]─[~/Videos/titles] └──╼ ╼ $ ffmpeg -i zombiestrain.avi -vf lutrgb="r=negval:g=negval:b=negval" zomby.avi┌──[[email protected]]─[~/Videos/titles] └──╼ ╼ $ ffmpeg -i zombiestrain.avi -vf lutrgb="r=negval:g=negval:b=negval" zomby.avi This is an example of what this filter will give you. This … Read more

How to increase the loudness of an audio track using ffmpeg on Linux.

The FFmpeg utility on Linux is very useful for encoding to different file formats, but it can also be used to tweak audio files. The example below will increase the loudness of an audio track. ┌──[[email protected]]─[~/Music] └──╼ ╼ $ ffmpeg -i Forest_Bg_Night_01.wav -c:a libvorbis -b:8 64k -af loudnorm=I=-16:LRA=11:TP=-1.0 forest.ogg┌──[[email protected]]─[~/Music] └──╼ ╼ $ ffmpeg -i Forest_Bg_Night_01.wav … Read more

How to get an excerpt from a video with FFmpeg.

Extracting an excerpt from a video is very useful, this is how to do it. The command below extracts an excerpt from a video at 00:00:05 to 00:00:15. This is scaled to 640×360 pixels and is good quality. ┌──[[email protected]]─[~/Videos] └──╼ ╼ $ ffmpeg -v 1 -i agropromfun.mp4 -ss 00:00:05 -to 00:00:15 -c:v libvpx -crf 4 … Read more

Create a nice spectrum display of an audio file. This is very easy to do.

Creating a very nice spectrum display of an audio file is very simple to do. The FFmpeg utility is the best way to generate such a useful audio waveform demonstration. This command will generate a 2560×1080 resolution waveform display of the file underground_01.ogg ffplay -f lavfi ‘amovie=undergrnd_01.ogg, asplit [a][out1]; [a] showspectrum=size=2560×1080:overlap=1:slide=scroll:scale=cbrt:legend=true,setdar=dar=21/9 [out0]’ffplay -f lavfi ‘amovie=undergrnd_01.ogg, … Read more

Feed a Youtube video into FFmpeg directly with youtube-dl.

Downloading a Youtube video with youtube-dl is pretty common, but it is also possible to feed it directly into FFmpeg using parameter expansion in bash. ┌─[jason@jason-desktop]─[~/Videos] └──╼ $ffmpeg -i $(youtube-dl -f 22 -g https://www.youtube.com/watch?v=laJpHzVtF9k) output.ts┌─[jason@jason-desktop]─[~/Videos] └──╼ $ffmpeg -i $(youtube-dl -f 22 -g https://www.youtube.com/watch?v=laJpHzVtF9k) output.ts This command will get a Youtube video file and then process … Read more