better video rendering in d

H. S. Teoh hsteoh at qfbox.info
Tue Mar 21 17:46:00 UTC 2023


On Tue, Mar 21, 2023 at 05:29:22PM +0000, monkyyy via Digitalmars-d-learn wrote:
> On Tuesday, 21 March 2023 at 17:18:15 UTC, H. S. Teoh wrote:
> > On Tue, Mar 21, 2023 at 04:57:49PM +0000, monkyyy via
> > Digitalmars-d-learn wrote:
> > > My current method of making videos of using raylib to generate
> > > screenshots, throwing those screenshots into a folder and calling
> > > a magic ffmpeg command is ... slow.
> > [...]
> > 
> > How slow is it now, and how fast do you want it to be?
> > T
> 
> I vaguely remember an hour and half for 5 minutes of video when its
> extremely lightweight and raylib trivially does real-time to display
> it normally and realistically I wouldn't be surprised if it could do
> 1000 frames a second.
> 
> Coping several gb of data to disk(that probably asking the gpu one
> pixel at a time) to be compressed down into a dozen mb of video is
> just... temp shit.  I should just do something that isnt stressing
> hard drives extremely unnecessarily.

You could try to feed the frames to ffmpeg over stdin instead of storing
the frames on disk. See this, for example:

	https://stackoverflow.com/questions/45899585/pipe-input-in-to-ffmpeg-stdin

Then you can just feed live data to it in the background while you
generate frames in the foreground.


T

-- 
Lottery: tax on the stupid. -- Slashdotter


More information about the Digitalmars-d-learn mailing list