-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Video overlay (gauges...) #222
Comments
You can definitely do all these fancy overlays with moviepy. Say that camera_clip is the clip of the racing car and gauge_clip is a clip representing a gauge with a mask (that defines where it lets see through), then you simply do:
you can compose multiple clips at once:
I have no examples of gauges. You could try to do your own (tell me if the manual is enough, else I could try and make an example). However you cannot do live streams with moviepy at the moment. For livestreams I suggest you look into OpenCV (it does less fancy compositing than moviepy but it is faster and may be well suited for your needs). |
Thanks @Zulko for your quick reply Ideally I would like to make a code for gauges that could apply to both recorded videos and also live stream. What vector graphics library do you suggest to make gauge code ? Gizeh, cairocffi, pycairo ? |
I'd they Gizeh but I am biased ;) Another solution (the one I'd go for) would be to pre-generate a series frames (with either Gizeh, Gimp, Inkscape) in which the gauge goes from 0 to 300mph, with steps of, say, 5mph. Then you load these frames and just display the right frame depending on your data (I guess you have somewhere the evolution of speed over time). |
Don't you think that gauges should be SVG ? I don't see SVG support in Gizeh. SDL might be an other library to consider but you may have some other ideas. |
The gauges won't be svg the moment you insert them in the video (they need to be an image for that). Gizeh is a Vector Graphics library, so you can do any effect that you could do with SVG, the only thing being that it is exported as a PNG image instead of SVG. For SDL I'd say why not, may be a solution if you want "live" video editing (have a look at Pygame which does overlays and uses SDL), but OpenCV will work as well. |
I've had some success in making a guage for overlay by using pygame and passing a raw framebuffer of what is displayed directly to ffmpeg via a pipe. It's much faster than pregenerating the frames. Incidentally one of Zulko's blog posts helped me a lot with understanding how ffmpeg works with pipes. |
Hello, is video in video possible through moviepy? Like two videos playing simultaneously together one with audio and other without in an overlay manner.. |
Yes it is possible, you can also use ffmpeg or Openshot. |
Thanks, i could do it using moviepy only! |
This example has video in video. I assume it's still current. |
This is interesting, as i'm looking for a dashware alternative for Linux. any tutorials of this subject by previous posters? I'm not python adept, but am very commandline adept. |
Closing this issue as it sounds like the original problem was solved. |
@scls19fr @opensourcegrappler @meoso did you managed to work with gauges and video sync? |
Yes, I wrote my own tool to generate the gauge video frames from a gps log file and overlayed them onto gopro video using kdenlive. The sync is harder, I used some of my own custom hardware to flash some lights for a visual clap to line things up. The tool for making the gauges is here https://github.com/opensourcegrappler/mct |
nice, thanks for sharing. I would love to have a free/opensource software like dashware for unix systems but it seems that nothing exist yet. A good woorkaround would be to use moviepy as you did. i would say that the main problem right now would be the lack of gaphic gauges and their animation while the script to read the database and feed these gauges should be simple anyway I just send an app request to wine, i will post it here when it will be reviewed |
i added dashware to wine: |
As far as I know dashware doesn't do a very good job of solving the sync of data and video problem. What kind of data/video do you have? |
racing motorbikes with a custom software to read data from the ECU of my suzuki motorbike + IMU +GPS and more |
Hello,
I'm looking for an open source alternative using Python to make video overlay.
I'd like to make something similar to https://www.youtube.com/watch?v=EJIg9FOGH84
see also http://www.dashware.net/ or https://www.youtube.com/results?search_query=gopro+overlay
or http://racerender.com/
I wonder if moviepy is able to make video overlay and if some gauges already exists.
If not how I could make gauges that could be easily add to an existing video.
I also wonder if a realtime stream of video and data could be mixed to output a video with overlaid data (gauge...).
Kind regards
The text was updated successfully, but these errors were encountered: