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

Script does not export gifs with subtitles. #5

Open
0xAB51NTH opened this issue Sep 17, 2020 · 4 comments
Open

Script does not export gifs with subtitles. #5

0xAB51NTH opened this issue Sep 17, 2020 · 4 comments

Comments

@0xAB51NTH
Copy link

Hi, i tried using script and it exports gifs without subtitles fine but when i want to export it with subtitles it dosent export them at all.

@ALogograph
Copy link
Contributor

Seems like an issue with escaping the backslash in paths in the subtitles= param in the filter. It seems fixed by changing the backslashes to front slashes.

@0xAB51NTH
Copy link
Author

0xAB51NTH commented Sep 20, 2020

Okay now Im even more not sure and having even more problems than before heh.
Looking on pull request i copied the new piece of code and pasted it into the script.

After doing this I saved file and opened a .mkv file in mpv. Picked 2:30 as start and 2:50 as end. First i tried doing just gif as this function worked fine before soo i wanted to be sure that it still works. It opened cmd as always and after while closed displaying "GIF created" in mpv. Always created gif was in the same dir as the files, but it wasn't there soo i decided to check the default path in config, but it wasn't their neither.

dir = "C:/Program Files/mpv/gifs",

Being a little dissapointed with it not working I though that atleast the subtitle burned one will work but it didnt neither the cmd closed faster than without burning and displayed the same message afterwards just like the one without burned subs. File wasn't present at all just like case before.

I tried reverting those changes but they didnt fixed anything for some reason? I don't really know whats going on at this point. I thought that maybe i didnt installed needed prequisities soo i checked the mainpage, downloaded the whole script again. Used windows, used newest mpv and got sure that my ffmpeg has libass enabled.

I tried to make gif out of 24minute anime video containting .ass subs in .mkv format.
Video uses h264 as codec, from what I remember my friend had similliar issues but as far as I know he just decided to delete this script.

@hooke007
Copy link

hooke007 commented Feb 24, 2021

Similar problems here. It cannot export anything.

To check the original script and find the the same issue.

@kevinazhu
Copy link

I had problems with generating gifs with subtitles as well, but I was finally able to get it working. Turns out the file I was playing had square brackets in the name like "[" and "]", and you have to escape those properly for ffmpeg to parse it as the subtitles argument.

To fix it, I added the following after line 81:

s = string.gsub(s, "%[", "\\%[")
s = string.gsub(s, "%]", "\\%]")

Not sure if this is the best way to fix or if this is actually the same issue others have here, but maybe this will help someone else. I also put out a Pull Request if the maintainer wants to review and merge it: #11

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

4 participants