Generate a short preview of a single video, or generate multiple at once! This tool gives you the power to break up your video into many short miniclips, fully customizable in how long or how many there are for that ultimate preview experience. View Example.
- Works natively with Linux and MacOS terminal
- Windows users must install a Unix-like environment terminal such as Git for Windows or use the native Windows Subsystem for Linux
- Must have ffmpeg installed
-
Details
For MacOS Users
MacOS users may have to download Homebrew and install ffmpeg via the lines of code below for access to full codec and encoding functionality:
brew tap homebrew-ffmpeg/ffmpegFor additional information regarding this ffmpeg installation, click herebrew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac --with-opencore-amr --with-openh264 --with-openjpeg --with-speex
-
This project builds upon the original, but also expands upon it in many ways. The program is increasingly customizable, offering the ability to change a wide set of parameters without having to go into the file itself.
- Generate a preview of a single video file
- Generate a bulk of previews from a batch of files
- Customize the parameters of the video preview(s):
- Can modify the amount of seconds trimmed from the beginning of the input file (useful to skip past opening credits)
- Can modify the amount of seconds trimmed from the end of the input file (useful to skip past closing credits)
- Can modify the number of mini-clips to be created in the video preview
- Can modify the length of each mini-clip
- Can modify the encoding values of the video preview as well (CRF, bitrate, preset, resolution, and audio)
Download the preview.sh file.
Make the file executable. You only need to do this once:
chmod +x /path/to/preview.sh
Now run it:
/path/to/preview.sh
And that's it! The rest is pretty straightforward from there. This command can be run from ANYWHERE! It works with folders and file names with both spaces and without spaces.
Here is an example as to what the first page looks like after you run:
[*] Video Preview Generator [*]
[*] Version : 1.0.3 [*]
[*] Originally Created By : David Walsh (davidwalshblog) [*]
[*] Modified & Developed By : Jonathan Thompson (jethomps0n) [*]
Project Home: https://github.com/jethomps0n/Video-Preview-Generator
Generation Type Description
----------------- -------------
[1]Single Generate a preview from a single file
[2]Batch Generate series of previews from multiple files
Actions
---------
[q]Quit Quit
Select an option to begin:
And generating a preview of a single file:
[Single Generation - FINAL PARAMETERS]
Current Encoder Settings
--------------------------
CRF value: 23
Bitrate in mbps: 5M
Preset type: fast
Resolution: 720p
Audio Toggle: off
Actions Description
--------- -------------
[b]Back Return to the previous page
[s]Settings Access settings
[q]Quit Quit
-------------------------------------------------------------------
Please enter the input and output parameters to begin the process
[] = REQUIRED {} = *NOT REQUIRED *Defaults to preset
values if left blank
Format:
[inputfile] {outputfile} -OR- [inputfile] {outputextension}
Ex. input.mp4 output.webm -OR- input.mp4 .webm
-------------------------------------------------------------------
[Input]:
{Output}:
If you would like to help add or improve a feature within this project in any way, follow the steps below:
- Fork the project!
- Create your new branch:
git checkout -b my-new-branch - Add and commit your changes:
git commit -m "Add new supercool feature" - Push to the branch:
git push origin my-new-branch - Submit a pull request!
To engage with the community or for more information, write about it in the Discussions tab.
- Ask for help
- Share ideas
- Write feedback
- View announcements
- And many more...
For issues found with the tool, direct this information to the Issues tab.
- Flag bugs and issues the program shouldn't be doing
Nolan-Oscar-Win-preview.mp4
"Christopher Nolan Wins Best Director for 'Oppenheimer' | 96th Oscars (2024)" - Oscars, YouTube (March 10, 2024)
Original file and much of the core functionality was created by David Walsh.
See all changes that have been made
- Added a user interface
- Added support for WebM and other codec and encoding features
- Added support for multiple files to be generated at once (batch mode)
- Fixed the way the intervals between miniclips were calculated
- Fixed an issue where the miniclips would be out of order in the output file if the number of miniclips was 10 or more
- Added an input to modify the seconds trimmed from the end of the video file
- Added functionality for files to be referenced from any directory
- Added functionality for files and folders with spaces
- Added a special subfolder for generated preview files in the output path
- Added a default naming system for empty fields
- Added compatibility if a file on a users device has the same name of the output file in the output directory
- Added heavy customization features for input and output settings
Despite creating this project and sharing it with you all, I do not know Bash. Bash is a language I've never learned, and never heard of or come across until I uploaded this. I've been in need of a program like this for my website project and upon finding the original, I decided to add some functionality to it. Any modifications I've made have been done purely out of my knowledge of other coding languages and the similar syntax they share. A few sources of online people in past discussions that are way smarter than me helped as well. With this being said, I'm sure my code my not be up to par with similar programs and can be made to be much more efficient. Nevertheless, I am always looking for ways to improve, so any comments or feedback anyone may have is always welcome! I hope you are able to find some comfort with this project and can put this tool to good use!