Skip to content

Instantly share code, notes, and snippets.

ffmpegCmd << "ffmpeg -r 60 -f rawvideo -pix_fmt rgba "
<< "-s " << FrameWidth << "x" << FrameHeight << " "
<< "-i - -preset fast -y -pix_fmt yuv420p -crf 21 " << CaptureVideoPath;
ffmpegPipe = _popen(ffmpegCmd, "wb");
while(rendering)
{
fwrite(framePixels, frameSizeInBytes, 1, ffmpegPipe);
}
@kayru
kayru / cube.c
Created July 26, 2018 08:38
Modified Vulkan Cube demo to show dropped frames in windowed FIFO present mode
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0

Keybase proof

I hereby claim:

  • I am kayru on github.
  • I am kayru (https://keybase.io/kayru) on keybase.
  • I have a public key ASBrKn33Jb_jISpGxCZO_GMLgyDMxEhN_4g6dqyNWRko9Qo

To claim this, I am signing this object:

glslangValidator -l shaders/test.comp