Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VLC-GIF-Maker tries to create output file with a slash (/) on Windows . Gif extension is not added #3

Open
nieto-madrid opened this issue Sep 26, 2024 · 2 comments

Comments

@nieto-madrid
Copy link

nieto-madrid commented Sep 26, 2024

VLC-GIF-Maker on Windows tries to create output file with a slash (/). Gif extension is not added to the output filename

Unfortunately, no matter what I write on the settings, the output path (is shotly overlaid on the video) is like:
"C:\temp/g172345556" (note the /)
Settings used: 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}" (actually it does not matter whether I put a backslash or a slash between {output_path} and {output_filename}
output_path: C:\Temp
output_filename:

GIF-VLC error

@RobertZickler
Copy link

RobertZickler commented Sep 26, 2024

How random. What are the odds! I just stumbled over this repo and precise issue just now.

Yes, I can reproduce, and I thought this is the reason I don't get an output. In fact, after pushing "generate GIF" the terminal pops up for a split of a second but even logging and pausing the script did not return anything.

How did I solve the issue: As written in the README.md you need FFmpeg to be installed and accessible from PATH / environment variable. I used a pre build version (e.g. https://github.com/GyanD/codexffmpeg/releases) and added the extracted archive to PATH (C:\path\to\your\ffmpeg\bin). Note: PATH expects the directory where the executable is located (ffmpeg.exe).

Now I can generate the GIF. Nice work btw.

The output path for Windows should be changed to the correct directory separator.
And I would have loved to have a check and a note in the terminal that FFmpeg needs to be installed first. For everyone that just skims over the README like me 😅
I'm no LUA expert at all but something like os.execute('where ffmpeg'). And depending on the return value, inform the user about the missing tool. Or there could even be a check for the FFmpeg version in the same call, if a min version is required. Like os.execute('ffmpeg -version')

@Dante383
Copy link
Owner

Dante383 commented Sep 27, 2024

@RobertZickler Unfortunately VLC doesn't allow to fetch a response from shell commands, only to execute them - that was actually the first function I started to write. You can't even get a status code
The directory separator is changed depending on the platform while generating the command, is it not correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants