better video rendering in d
Ferhat Kurtulmuş
aferust at gmail.com
Tue Mar 21 18:24:49 UTC 2023
On Tuesday, 21 March 2023 at 17:46:00 UTC, H. S. Teoh wrote:
> 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:
>> > [...]
>>
>> 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
This is how I use pipe process with d and ffmpeg. I am reading
video frames but other way may work too.
https://github.com/aferust/oclcv/blob/main/examples/rgb2gray-video/source/app.d
More information about the Digitalmars-d-learn
mailing list