Skip to content

Instantly share code, notes, and snippets.

using FFmpegArgs;
using FFmpegArgs.Cores;
using FFmpegArgs.Cores.Enums;
using FFmpegArgs.Cores.Maps;
using FFmpegArgs.Cores.Utils;
using FFmpegArgs.Executes;
using FFmpegArgs.Filters.AudioFilters;
using FFmpegArgs.Filters.MultimediaFilters;
using FFmpegArgs.Filters.VideoFilters;
using FFmpegArgs.Filters.VideoSources;
using System;
using TqkLibrary.Proxy.Interfaces;
using TqkLibrary.Proxy.Authentications;
using TqkLibrary.Proxy.ProxySources;
using System.Threading.Tasks;
using System.Threading;
using System.IO;
using System.Diagnostics;
using System.Net.Security;
using System.Linq;
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 / CopyProperties.cs
Last active February 26, 2025 11:05
CopyProperties between same object type
public static void CopyTo<T, TProperties>(this T source, T target, Expression<Func<T, TProperties>> expression)
{
MemberExpression? memberExpression = expression.Body as MemberExpression;
if (memberExpression is null)
return;
List<MemberExpression> listMemberExpression = new([memberExpression]);//child to parent
while (true)
{
MemberExpression? child_memberExpression = memberExpression?.Expression as MemberExpression;
@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;
import sys
import os
import numpy as np
import argparse
from modules.utils.paths import (WHISPER_MODELS_DIR, DIARIZATION_MODELS_DIR, OUTPUT_DIR, DEFAULT_PARAMETERS_CONFIG_PATH,
UVR_MODELS_DIR)
from modules.uvr.music_separator import MusicSeparator
parser = argparse.ArgumentParser()
ChromeDriverService? _service = null;
public int? ChromeProcessId
{
get
{
ProcessHelper processHelper = new ProcessHelper((uint)_service!.ProcessId);
foreach (var child in processHelper.ChildrensProcess)
{
ProcessHelper.Win32_Process? win32_Process = child.Query_Win32_Process();
if (win32_Process?.Name?.Contains("chrome", StringComparison.OrdinalIgnoreCase) == true)
try
{
VideoTextVM.RenderWorkStatus = RenderWorkStatus.Working;
if (string.IsNullOrWhiteSpace(VideoOutputConfigure.SaveDir))
throw new InvalidOperationException("Chưa chọn thư mục đầu ra");
Directory.CreateDirectory(VideoTextVM.TmpDir);
FFmpegArg ffmpegArg = new FFmpegArg().OverWriteOutput().VSync(VSyncMethod.cfr);
class WrapperStream : Stream
{
readonly HttpResponseMessage _httpResponseMessage;
readonly Stream _stream;
public WrapperStream(HttpResponseMessage httpResponseMessage, Stream stream)
{
this._httpResponseMessage = httpResponseMessage;
this._stream = stream;
}
public override bool CanRead => _stream.CanRead;
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Runtime.InteropServices;
namespace Spazzarama.ScreenCapture
{
public static class Direct3DCapture
{