Source i (link to git-repo or to original if based on someone elses unmodified work):

https://github.com/Dante383/VLC-GIF-Maker/archive/refs/heads/main.zip

Original
0
Become a Fan
5.0

Description:
Extension to the VLC player which allows you to easily generate GIFs from watched content (or execute other, custom commands)

Bugs and suggestions: please create a new Issue on GitHub: https://github.com/Dante383/VLC-GIF-Maker

## Installation

**WARNGING: THIS EXTENSION REQUIRES FFMPEG TO BE INSTALLED (and put in PATH for Windows)**

Put "vlc_gif_maker.lua" file in directory suitable for your operating system:

* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\VLC\lua\extensions\
* Linux (all users): /usr/lib/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
* Mac OS X (current user): /Users/%your_name%/Library/Application Support/org.videolan.vlc/lua/extensions/

## Usage

https://i.imgur.com/Q2fZT07.png

In VLC, click "View" and select "VLC GIF Creator". GIF creator window will open.

Adjust output path and filename as needed. **Do not put a slash at the end of the output path!**

Now, you can either input start and end timestamps by hand, or you can simply navigate the player
and click "Get" by the inputs. The timestamps will be set automatically.

Press "Generate GIF" and it's gonna be saved to the path you specified, followed by a confirmation on the VLC screen.

## Adjusting resolution

This is how the command looks by default, important bits are bold:

ffmpeg -ss {start_timestamp} -to {stop_timestamp} -i {input_file} -vf "fps={fps},**scale=498:-1:**flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop {loop} "{output_path}/{output_filename}.gif"

** Resolution

In short, scale = resolution, width:height in pixels to be exact.

If you put -1 instead of one of the values (like in the default command), it will be scaled without losing proportions.
For example, input video has 2000x1000 resolution. You put scale=500:-1 in the command, and the GIF will have 500x250 resolution.
Same with the other way - scale=-1:500 and the GIF will have 1000x500 resolution.

This is how the command would look like with 600px height (and scaled width):

ffmpeg -ss {start_timestamp} -to {stop_timestamp} -i {input_file} -vf "fps=15,scale=-1:600:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 {output_path}/{output_filename}

This is how the command would look like with forced 1920x1080px resolution (probably a bad idea, just set the width or height, not both)

ffmpeg -ss {start_timestamp} -to {stop_timestamp} -i {input_file} -vf "fps=15,scale=1920:1080:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 {output_path}/{output_filename}

You can leave it empty and the GIF will be generated with the maximum resolution (so input video's). This is however probably a very bad idea. 6 second GIF from a 1080p source material would weight around 70MB.

This is how the command would look like with source material's resolution:

ffmpeg -ss {start_timestamp} -to {stop_timestamp} -i {input_file} -vf "fps=15,scale=flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 {output_path}/{output_filename}

See https://ffmpeg.org/ffmpeg-filters.html#scale for more information

** Other uses

You might notice that this extension simply executes a command with filled parameters. You can of course change it, here is an example command which will just export the selected timeframe to mp4 instead of turning it into a GIF.

ffmpeg -i {input_file} -ss {start_timestamp} -to {stop_timestamp} -c:v copy -c:a copy {output_path}/{output_filename}.mp4


Gif icon created by Freepik - Flaticon @ https://www.flaticon.com/free-icons/gif
Last changelog:

0.0.5 update

- Miliseconds-accurate timestamp
- Fixed Windows path formatting
- UI rework, code cleanup
- FPS and looping can be set directly from the graphical interface now, no need to mess with the command manually


Ratings & Comments

0 Comments

Be the first to comment
Pling
0 Affiliates
Details
license MIT License
version 0.0.5
updated
added
downloads 24h 1
mediaviews 24h 0
pageviews 24h 44

Other VLC Extensions:

Multiple VLC enhancments
tubh
last update date: 12 years ago

Score 4.9

TUNE IN RADIO
willyboy63
last update date: 12 years ago

Score 5.0

Etevaldo Scopel
etevaldo
last update date: 12 years ago

Score 4.7

VLsub 0.9
nonkelleo
last update date: 12 years ago

Score 4.1

IP Webcam
manonlatramee62
last update date: 11 years ago

Score 5.1

TandN Co LLC
tandnone23
last update date: 10 years ago

Score 5.7



System Tags