Is there a way to use love2d to encode mp4s or other video formats, or is the most one could do simply to encode many png files and then use an external program to stitch them into a video? Or is there even a Lua library out there for doing this?
Edit: I realized it was not exactly clear what I meant. I was wondering if there was a way to use love2d to draw each frame, but instead of just outputting each frame to the screen, outputting each frame to a function that would encode it into an mp4 file. In fact, I don't necessarily need a love2d-specific way to do this; I just need a Lua way to do it. Is there a library out there capable of this?
Encode an mp4?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- NetherGranite
- Prole
- Posts: 30
- Joined: Wed Jul 11, 2018 11:08 pm
Encode an mp4?
Last edited by NetherGranite on Thu Jul 12, 2018 8:27 pm, edited 1 time in total.
Re: Encode an mp4?
I'm unsure of your goal; to make a video from PNG files try FFMPEG: https://trac.ffmpeg.org/wiki/Slideshow
If you're looking to create a video of gameplay footage, use https://obsproject.com/ to capture your screen & audio while you play.
If you're looking to create a video of gameplay footage, use https://obsproject.com/ to capture your screen & audio while you play.
- NetherGranite
- Prole
- Posts: 30
- Joined: Wed Jul 11, 2018 11:08 pm
Re: Encode an mp4?
Sorry, I just realized that my question was not clear. I was wondering how one would go about using love2d to draw each frame but instead of merely outputting each frame to the screen, outputting each frame to a function that would encode it into an mp4 file. I have added clarification to it.
Re: Encode an mp4?
LÖVE supports Ogg Theora video decoding, but I don't think it supports any form of video encoding. Saving one image per frame to encode them into a video later sounds like one way to go. Using a video capturing tool that captures from the screen would be another.
- zorg
- Party member
- Posts: 3444
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Encode an mp4?
If anything, i'd just code my game to be able to save deterministic replays, since that can be done much faster than saving each rendered frame, and one could either export the recreated frames "off-line", as png images and combined together with an external program, like ffmpeg, or one could theoretically include ffmpeg in their project and maybe use FFI to access its functions so it automatically would do that for you.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: No registered users and 234 guests