This is a C++ program that uses FFmpeg to convert video and image files. It allows conversion to different formats and removal of metadata.
- Select input files through a file selection dialog.
- Choose an output directory.
- Convert video and image files to the desired format.
- Remove metadata from images and videos (except for codec and duration for videos).
- Add a custom metadata (
title
).
- C++ Compiler: Ensure you have a C++ compiler installed, such as g++ or Visual Studio.
- FFmpeg: The program depends on FFmpeg for conversion. Make sure FFmpeg is installed and accessible from the command line (or add the path of the executable to your
PATH
).
To compile the program, use the following command (replace source_file.cpp
with the name of your source file):
g++ -o cdc source_file.cpp -lcomdlg32 -lshell32
Or, if you are using Visual Studio, simply create a new project and add the source code to the project.
You can run the program as follows:
- Via Command Line:
./file-format [--format <format>] [--input <file path>] [--output <directory path>]
--format : Specifies the output format (default: mp4). --input : Specifies the input file path. --output : Specifies the output directory.
If the input file and output directory are not provided, the program will open file and folder selection dialogs.
- Example:
To convert a video file to MP4 format, you can use:
./file-format --input "path/to/your/video.avi" --output "path/to/directory/"
The program removes all metadata from images (JPG, JPEG, PNG) and only retains codec and duration metadata for videos. A custom metadata will be added to all converted files.
Feel free to submit pull requests or report issues.
This project is licensed under the MIT License. See the LICENSE file for more details.