FFmpegGUI
Version 2.4.0 (216 MB) by
Peter Seibold
Convert, trim, crop, scale, merge etc. videos with ffmpeg. Add, replace, extract audio.
1 Features
Video
- Convert images to video
- Decompose video to images
- Overlay an image on a video
- Merge up to three videos
and
- Trim play time (start and end time)
- Crop area
- Scale (resize) area, stretch or pad
- Flip video horizontally or vertically
- Rotate video
- Change frame rate
- Set quality
- Set compression
- Use default encoder (mostly h264) or high encoder h265 if possible
Audio
- Remove audio streams
- Extract audio streams
- Add/replace audio stream and synchronize audio and video (delay audio).
Since ffmpeg offers a tremendous choice of parameters, in most cases the default parameters are used, in order to make videos compatible with most players.
2 Remarks
2.1 Speed
The ffmpeg commands are not in all cases optimized for process speed. E.g. if you merge 3 parts of the same video the reencoding part can be replaced with a copy command. Here, the ffmpeg documentation is incomplete on what parameters must be equal for a copy procedure.
2.2 Output folder
You may select an output folder. The default output folder is ‘…/ffmpegGUI/Output’.
If input and output folder are the same, output files will always be renamed.
2.3 Codecs
The selection of codecs is minimal, since every video format (about 50) has its own codecs. Therefore in general only the default codec is used.
2.4 Progress bar
In Matlab a ‘system’ or a ‘dos’ command blocks entirely Matlab. Even timer interrupts are not fired. In order to display a ffmpeg progress bar a work around with an extra windows-command-window is implemented.
The progress bar is accurate, while the predicted remaining time is an estimate.
So far, it is in a beta stage.
Main reason: DOS handles file names different to the operating system.
FFMPEGgui.m determines the code page the operating system is using and sets it as the variable ‘codePage’ in the file ‘FFMPEGguiIni.mat’. You may also change it manually there. It is a number as string. For western Europe it is ‘1252’.
With code page ‘1252’ file names like “Charlie-+ äüÉû{}^~[]@°%#=&B.flac” are accepted by DOS.
If you don’t want to change the code page, set the variable ‘codePage’ in the file ‘FFMPEGguiIni.mat’ to ‘default’.
The code page is altered only temporarily in the running DOS window.
2.5 Width, height
The width and height are forced to even numbers, since some pixel-formats, as the default in h264, require this.
2.6 Embedded VLC
For embedded VLC you need to have VLC installed on your PC.
The single step functions (e.g. +1) are only accurate if the video has many key frames. Else it deviates by ±2 frames. Towards the end of a video, single step is not available with VLC.
A click on the time bar moves the play time.
Embedded VLC does not support all characters in a file name. Therefore, ‘%’ or ‘#’ are escaped.
3 Restrictions
- Multi video streams are not handled.
- Mostly the default codecs are used.
4 Installation
4.1 FFMPEG
If not already installed, follow the steps according: https://www.wikihow.com/Install-FFmpeg-on-Windows
Important: Set ffmpeg as environment variable, see step 13 of above link, or
The environment path must be e.g. C:\Programs\Video\ffmpeg\bin
4.2 VLC
If you want to use the internal player, install VLC from: https://www.videolan.org/vlc/download-windows.html
Alternatively the video is redirected to the standard player of your pc.
4.3 Matlab
Copy the FFmpegGui folder anywhere on your pc. You may delete the ‘…/ffmpegGUI/SampleVideos’ folder.
More information in 'ReadMe.pdf'.
Cite As
Peter Seibold (2021). FFmpegGUI, MATLAB Central File Exchange.
MATLAB Release Compatibility
Created with
R2016a
Compatible with R2020a and later releases
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
2.4.0 | Removed a sporadic failure on start up. |
||
2.3.0 | Fixed error in OpeningFcn. |
||
2.2.0 | Implemented flip and rotation of video |
||
2.1.1 | Upload of zip file |
||
2.1.0 | Better folder handling for input and output.
|
||
2.0.0 | Added some audio functions |
||
1.1.0 | Resize of GUI implemented and some minor changes. |
||
1.0.0 |