TGViewer
compresee tech compresee tech @compreseetech · 10 subscribers
Post #4 194
import type { EncodingProfile } from "@/ff/mpeg/newoptions.js";

const qsvHwaccel = [
["-init_hw_device", "vaapi=intel:/dev/dri/renderD128"],
["-init_hw_device", "qsv=hw@intel"],
["-filter_hw_device", "hw"],
["-hwaccel", "qsv"],
["-hwaccel_output_format", "qsv"],
];
const rateControlOpt = [
["-extbrc", "1"],
["-look_ahead_depth", "60"],
["-rdo", "1"],
["-mbbrc", "1"],
["-adaptive_i", "1"],
["-adaptive_b", "1"],
];

const baseOpus = [
["-c:a", "libopus"],
["-vbr", "on"],
["-ac", "1"],
];

const qsvHevc = [
["-c:v", "hevc_qsv"],
["-preset", "veryslow"],
["-profile:v", "main"],
];

export const defaultProfiles: EncodingProfile[] = [
{
id: "static",
name: {
en: "Educational / Static",
fa: "",
},
description: {
en: "Perfect for coding tutorials, screen recordings, or slideshows with minimal movement. Drops the frame rate to 1 FPS to drastically slash file size, keeping audio clear enough to follow along.",
fa: "",
},
tier: 1,
outputType: "video",
builder: ({ inputPath, outputPath }) => [
qsvHwaccel,
["-i", inputPath],
qsvHevc,
["-global_quality:v", "35"],
rateControlOpt,
["-r", "1"],
baseOpus,
["-application", "voip"],
["-b:a", "32k"],
["-f", "mp4"],
outputPath,
],
},
{
id: "extreme",
name: {
en: "Extreme Survival",
fa: "",
},
description: {
en: "Maximum compression for critical network conditions. Drops video and audio quality to the absolute bare minimum functional level. Use only when the internet is heavily restricted and nothing else loads.",
fa: "",
},
tier: 1,
outputType: "video",
builder: ({ inputPath, outputPath }) => [
qsvHwaccel,
["-i", inputPath],
qsvHevc,
["-global_quality:v", "48"],
rateControlOpt,
["-r", "1"],
baseOpus,
["-application", "voip"],
["-b:a", "12k"],
["-f", "mp4"],
outputPath,
],
},
];

export function isDefaultProfile(profileId: string): boolean {
return defaultProfiles.some((p) => p.id === profileId);
}
More from @compreseetech
  1. May 8, 2026البته دردسر سرورش هست چون سرور با cpu خاصی میخواد
  2. May 8, 2026اینم کد پروفایل های جدید ( شامل پروفایل های صوتی و تصویری ) کسی بخواد احتمالا با AI و ده د…
  3. May 8, 2026document post
  4. Apr 24, 2026یه توضیحات بیسیکی هم بخوام بدم راجع بهش ایناست : با qsv کار می کنه که یه شتابدهنده سخت افز…
  5. Apr 24, 2026این مهم ترین قسمت سورس کد کمپرسی هستش، دقت کنید که این فقط با درایور های intel کار می کنه…
  6. Apr 24, 2026Messages in this channel will no longer be automatically deleted
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →