FYI not bug - gifs are useable as BG
hersche opened this issue · 4 comments
Just to might save some other peoples time or to add it to the readme.md or whatever you like;
i wanted to use gifs as background and entered the gif as image, which appeared logic to me. That was failing.
By checking your source and do a short google-search however, i found that you just can set it as a video and it works.
If that was clear already, excuse my spam.
Thanks for your good work!
You can use anything, that opencv can read as video. I wonder if GIF shouldn't work, but maybe opencv needs to be built with a compile time switch for it?
Anyway, have a look at the ffmpeg commandline for splitting a video in png files. You can also split a gif, or convert a gif to a format opencv can read, which should be most modern video formats. Don't use a format with too much compression as the script splits the video into still frames anyway, so you won't save any memory.
I am sorry, i was unclear; the use by the video-config DOES work perfect. It is only a little confusing since in the config, i need the video-config for it:
- "empty": [["video", "images/nice.gif"]]
i tried the "image"-one, which does not work. However, as you labeled correctly, the only issue if any would be a example/hint in the documentation :)
(i mostly wasn't sure if that was clear to others as i didn't found anything about it in the issues and readme.md)
Using the image plugin should show the first frame, doesn't it?
I think an option would be to print a warning on the console "You're using a gif as background image. To play an animation use the video plugin".
No, it actually crashes, i came to the video-idea since it was the solution i found in stack-overflow.
Yes, a such warning would be a nice hint!
Edit: a bit a hacky, but convinient solution can be to re-route the user in code to the video-layer.