How to get information about a video file with the Linux command line easily.

Getting information about a video file on Linux with the command line is very easy. I will show how you can easily find the resolution of a video and the format. This example below will return the resolution of a video file. jason@jason-desktop:~/Videos$ ffprobe XR_3DA_2019_03_16_19_22_35_777.avi 2>&1 | grep -E ‘[[:digit:]]{3,}x[[:digit:]]{3,}’…

Read More

Easily capture a good quality webm of a movie clip with ffmpeg.

This simple one-liner will capture a high-quality webm file from a movie. 4.4 Thu May 07 jason@Yog-Sothoth 0: $ ffmpeg -i inputmovie.avi -ss 51:43.02 -t 7 -c:v libvpx -b:v 3200k -an -sn -copyts -threads 4 guns1.webm4.4 Thu May 07 jason@Yog-Sothoth 0: $ ffmpeg -i inputmovie.avi -ss 51:43.02 -t 7 -c:v…

Read More

Overlay two videos on top of another with ffmpeg.

Overlaying two other video files on to another is very easy with ffmpeg. I had two video files that are 640×360 pixels, and one that is 1920×1080. I used this command line with ffmpeg to overlay them. ffmpeg -i controller_agroprom.mp4 -vf "movie=dbz120.mp4 [a]; movie=dbz121.mp4 [b]; [in][a] overlay=0:32 [c]; [c][b] overlay=0:448"…

Read More

How to cut a section out of a video with ffmpeg.

Cropping a section of a video and saving it without reencoding is very simple, the example below shows how to use ffmpeg to cut out a section of video and then save it to a separate file. This example will cut out a clip starting 12 minutes into the video…

Read More

How to rip subtitles from a movie file using ffmpeg.

Ripping the subtitles from a movie file is very easy, just use this command to rip the subs to a file for later perusal. Or to correct grammar and spelling/translation errors. ffmpeg -i BLADE_RUNNER_2049_WEB_DL_1080p-BLUEBIRD.mkv -map 0:s:0 subs.srtffmpeg -i BLADE_RUNNER_2049_WEB_DL_1080p-BLUEBIRD.mkv -map 0:s:0 subs.srt This rips the first subs track to a…

Read More

Trim a video with ffmpeg very easily.

How to properly trim out a section of video with ffmpeg This ffmpeg command will trim out a section of video from a long video file. This is how a clip is snipped out of a movie file easily. ffmpeg -i "baraka.mkv" -ss 00:14:59.691 -to 00:17:24.044 -c:v libx264 -preset veryslow…

Read More

How to best encode a video for Youtube on Linux.

This simple one-liner will encode a video to a format suitable for Youtube. 4.4 Tue Sep 04 jason@Yog-Sothoth 0: $ ffmpeg -i scorcher.avi -codec:v libx264 -crf 21 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart scorcher.mp4 This gives good quality output whilst…

Read More

Create a video from one image and a wav file easily.

To create a video file from a wav, just use ffmpeg. This is how I created a 4k resolution video using just ffmpeg and an image file and audio wav I got off the Internet. Put both files into the same folder and then run this command. This will add…

Read More

Lovely webm I made with ffmpeg.

I made this webm using ffmpeg. Firstly, I ripped a section of video. ffmpeg -i starwars.mkv -vcodec copy -acodec copy -ss 00:19:23 -to 00:19:33 out.mkvffmpeg -i starwars.mkv -vcodec copy -acodec copy -ss 00:19:23 -to 00:19:33 out.mkv Then I did the first pass of two pass encoding. ffmpeg -i out.mkv -c:v…

Read More

Creating webm video clips on Linux using ffmpeg.

The /g/ wiki has a good guide for creating webm video clips from your existing video content using ffmpeg. This is not very difficult and allows you to post the completed videos on your website. Firefox and Iceweasel have native support for the webm format; this is an easy way…

Read More

How to encode a video to webm format and use it as a GIF replacement.

This is how to encode a video to webm format without sound to create a GIF replacement. The ffmpeg utility allows encoding a video in different formats. This is the perfect command for encoding a good quality webm video. ffmpeg -i gzdoom_2012_11_04_20_34_10_391.avi -ss 00:01:00.000 -to 00:01:20.000 \ -codec:v libvpx -quality…

Read More

Fedora 16 screencast recording & Windows XP outdated.

I have had problems trying to record a screencast for Gnome Shell 3.2.1, the top and bottom panels disappear when I activate the recordmydesktop command to record the desktop to a file. I have found a solution linked below that should work and allow me to record a nice video…

Read More