Skip to content

🎥 Make videos programmatically with React

alright

Jonny Burger47905305d3f1
diff --git a/packages/convert/app/routes/transcribe._index.tsx b/packages/convert/app/routes/transcribe._index.tsx
index a31a005327..3008710bad 100644
--- a/packages/convert/app/routes/transcribe._index.tsx
+++ b/packages/convert/app/routes/transcribe._index.tsx
@@ -1,4 +1,3 @@
-import type {HeadersFunction} from '@remix-run/node';
import App from '~/components/transcribe/App';
const Main = () => {
@@ -7,12 +6,9 @@ const Main = () => {
export default Main;
-export const headers: HeadersFunction = ({
- actionHeaders,
- errorHeaders,
- loaderHeaders,
- parentHeaders,
-}) => ({
+/* comment this out for development
+export const headers: HeadersFunction = ({}) => ({
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
});
+*/
diff --git a/packages/convert/app/seo.ts b/packages/convert/app/seo.ts
index b49609f6ee..01e74b2732 100644
--- a/packages/convert/app/seo.ts
+++ b/packages/convert/app/seo.ts
@@ -57,6 +57,9 @@ export type RouteAction =
}
| {
type: 'generic-probe';
+ }
+ | {
+ type: 'transcribe';
};
export const getHeaderTitle = (routeAction: RouteAction) => {
@@ -100,6 +103,10 @@ export const getHeaderTitle = (routeAction: RouteAction) => {
return `Report bad videos to Remotion`;
}
+ if (routeAction.type === 'transcribe') {
+ return 'Fast video and audio transcription in the browser';
+ }
+
throw new Error(`Invalid route action ${routeAction satisfies never}`);
};
@@ -144,6 +151,10 @@ export const getPageTitle = (routeAction: RouteAction) => {
return `Report bad videos to Remotion`;
}
+ if (routeAction.type === 'transcribe') {
+ return `Online Audio and Video Transcriber - Remotion Convert`;
+ }
+
throw new Error(`Invalid route action ${routeAction satisfies never}`);
};
@@ -194,6 +205,10 @@ export const getDescription = (routeAction: RouteAction) => {
return `Report bad videos to Remotion. We will investigate and fix them.`;
}
+ if (routeAction.type === 'transcribe') {
+ return `A free and local online audio and video transcriber, powered by Whisper. No upload required, no watermarks, no limits.`;
+ }
+
throw new Error(`Invalid route action ${routeAction satisfies never}`);
};
@@ -238,5 +253,9 @@ export const makeSlug = (routeAction: RouteAction) => {
return `/resize/${routeAction.format}`;
}
+ if (routeAction.type === 'transcribe') {
+ return '/transcribe';
+ }
+
throw new Error(`Invalid route action ${routeAction satisfies never}`);
};
diff --git a/packages/docs/copy-convert.ts b/packages/docs/copy-convert.ts
index 14226539e8..14cf17d1b6 100644
--- a/packages/docs/copy-convert.ts
+++ b/packages/docs/copy-convert.ts
@@ -90,6 +90,10 @@ extraPages.push({
type: 'report',
});
+extraPages.push({
+ type: 'transcribe',
+});
+
for (const page of extraPages) {
const slug = seo.makeSlug(page);
const pageTitle = seo.getPageTitle(page);
diff --git a/packages/docs/vercel.json b/packages/docs/vercel.json
index 469785556f..a79b49965a 100644
--- a/packages/docs/vercel.json
+++ b/packages/docs/vercel.json
@@ -14,6 +14,19 @@
"value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version"
}
]
+ },
+ {
+ "source": "/convert",
+ "headers": [
+ {
+ "key": "Cross-Origin-Embedder-Policy",
+ "value": "require-corp"
+ },
+ {
+ "key": "Cross-Origin-Opener-Policy",
+ "value": "same-origin"
+ }
+ ]
}
],
"redirects": [