-
Notifications
You must be signed in to change notification settings - Fork 3
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
Unable to list filename without directory slash in .vtt file #65
Comments
Hi @philipgoyal, thanks for the report. It is because the run directory depends on the path calculation. It uses paths relative to the running directory. So you can just run the script or CLI from the directory where the video is. Thanks, I hope this fixes your issue. |
Thanks for your reply, Artyom. If I run the script pointing to the input file, and simply omit the generator.base and generator.output variables, then the .vtt file automatically includes the actual filesystem path to the video.png file. And, as I say, I don't want that—I'll be moving the .vtt file to a website, where the .png file will be in the same directory, so there is no need for a full path.
So could you perhaps introduce a flag that allows this behaviour to be user-selected?
|
Sorry @philipgoyal, for the misunderstanding. It is my fault for not having a proper issue template requiring the things you've tried, your expectations, and the actual result. Yes, the If the above information doesn't solve your issue and you still have any questions, please answer these questions as detailed as possible.
Please do not hesitate to ask questions about the non-mentioned cases if there are some. I will wait for you to reply. |
Many thanks for your detailed reply.
First, I am using the Python package rather than the CLI. That suits my needs better.
Second, the video is in a folder, and has path "/path_to_video_folder/video.mp4".
Third, the desired result is that the .png and .vtt files are written to the folder "/path_to_video_folder". And that the .vtt file contains lines of the form:
00:00:00.000 --> 00:00:05.000
video.png#xywh=0,0,384,216
Fourth, when I set the variable generator.base = "", then the actual .vtt file contains lines of the form:
00:00:00.000 --> 00:00:05.000
/path_to_video_folder/video.png#xywh=0,0,384,216
(i.e. the file path of the input video is not removed).
If I instead set the variable generator.base = " ", then the .vtt file contains lines of the form:
00:00:00.000 --> 00:00:05.000
/video.png#xywh=0,0,384,216
i.e. a space followed by '/' are prepended to video.png
I hope this helps clarify the situation. What I would hope is that setting generator.base = "" would lead to .vtt omitting any reference to the directory in which "video.png" is located.
|
Hey @philipgoyal, check out the latest release by |
Thank you @ArtyomVancyan—it works perfectly. i.e. setting generator.base = "" now creates a .vtt file which references video.png without prepending it with path information.
|
I've closed the issue as it has been resolved by the update. |
I would like .vtt entries to look like this:
00:00:00.000 --> 00:00:05.000
video.png#xywh=0,0,384,216
i.e. the .png file is referred to directly, not prepended with anything.
But if I choose generator.base = "", then the filename is prepended with generator.output.
And if I choose generator.base = " ", then the filename appears as:
\video.png#xywh=0,0,384,216
Could you fix this?
Many thanks!
The text was updated successfully, but these errors were encountered: