Skip to content

Instantly share code, notes, and snippets.

Syntax: x264 [options] -o outfile infile [widthxheight]
Infile can be raw YUV 4:2:0 (in which case resolution is required),
or YUV4MPEG 4:2:0 (*.y4m),
or Avisynth if compiled with support (no).
or libav* formats if compiled with lavf support (no) or ffms support (no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
@tqk2811
tqk2811 / MonoScriptTry.cpp
Created February 16, 2025 19:34 — forked from zwcloud/MonoScriptTry.cpp
Trying mono in C++
#include <mono/jit/jit.h>
#include <mono/metadata/assembly.h>
#pragma comment(lib, "mono-2.0.lib")
int main(int argc, char* argv[])
{
mono_set_dirs("C:\\Program Files (x86)\\Mono\\lib",
"C:\\Program Files (x86)\\Mono\\etc");
MonoDomain *domain;
@tqk2811
tqk2811 / H264_Decoder.cpp
Created August 21, 2021 21:10 — forked from roxlu/H264_Decoder.cpp
LibAV parser and decoder example with openGL (YUV420 -> RGB shader).
#include "H264_Decoder.h"
H264_Decoder::H264_Decoder(h264_decoder_callback frameCallback, void* user)
:codec(NULL)
,codec_context(NULL)
,parser(NULL)
,fp(NULL)
,frame(0)
,cb_frame(frameCallback)
,cb_user(user)
@tqk2811
tqk2811 / gl_ffmpeg.cpp
Created June 5, 2021 05:08 — forked from rcolinray/gl_ffmpeg.cpp
OpenGL-FFMpeg integration
// Use OpenGL 3.0+, but don't use GLU
#define GLFW_INCLUDE_GL3
#define GLFW_NO_GLU
#include <GL/glfw.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
extern "C" {