Skip to content

Commit

Permalink
fix: cleanup formats and add opus, fixes #159
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed Sep 30, 2024
1 parent 6caa583 commit ae1dfaf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/converters/ffmpeg.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { exec } from "node:child_process";


// This could be done dynamically by running `ffmpeg -formats` and parsing the output
export const properties = {
from: {
Expand Down Expand Up @@ -80,6 +81,7 @@ export const properties = {
"bit",
"bitpacked",
"bmv",
"bmp",
"bonk",
"boa",
"brender_pix",
Expand Down Expand Up @@ -206,7 +208,10 @@ export const properties = {
"jack",
"jacosub",
"jv",
"jpegls",
"jpeg",
"jxl",
"kmsgrab",
"kux",
"kvag",
"lavfi",
Expand Down Expand Up @@ -287,24 +292,38 @@ export const properties = {
"okt",
"oma",
"omg",
"opus",
"openal",
"oss",
"osq",
"paf",
"pdv",
"pam",
"pbm",
"pcx",
"pgmyuv",
"pgm",
"pgx",
"photocd",
"pictor",
"pjs",
"plm",
"pmp",
"png",
"ppm",
"pp",
"psd",
"psm",
"psp",
"psxstr",
"pt36",
"ptm",
"pulse",
"pva",
"pvf",
"qcif",
"qcp",
"qdraw",
"r3d",
"rawvideo",
"rco",
Expand Down Expand Up @@ -347,6 +366,7 @@ export const properties = {
"sfx",
"sfx2",
"sga",
"sgi",
"shn",
"siff",
"sln",
Expand All @@ -372,6 +392,7 @@ export const properties = {
"sub",
"sup",
"svag",
"svg",
"svs",
"sw",
"swf",
Expand All @@ -381,6 +402,8 @@ export const properties = {
"thd",
"thp",
"tiertexseq",
"tif",
"tiff",
"tmv",
"truehd",
"tta",
Expand Down Expand Up @@ -431,6 +454,7 @@ export const properties = {
"way",
"wc3movie",
"webm",
"webp",
"webvtt",
"wow",
"wsaud",
Expand Down Expand Up @@ -485,6 +509,7 @@ export const properties = {
"ast",
"au",
"aud",
"av1",
"avi",
"avif",
"avs",
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/normalizeFiletype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const normalizeOutputFiletype = (filetype: string): string => {
return "jpg";
case "latex":
return "tex";
case "markdown_phpextra":
case "markdown_strict":
case "markdown_mmd":
case "markdown":
return "md";
default:
Expand Down

0 comments on commit ae1dfaf

Please sign in to comment.