Skip to content

Commit 24b63e6

Browse files
authored
fix: improve ffmpeg encoding
1 parent 1d029f5 commit 24b63e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

playgrounds/app/src/components/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ export default function Editor(props: EditorProps) {
10191019
setIsGeneratingVideo(true)
10201020
setVideoProgress(0)
10211021
await ffmpeg.writeFile('input.gif', dataURItoUInt8Array(gifDataUrl()))
1022-
await ffmpeg.exec(['-i', 'input.gif', 'output.mp4'])
1022+
await ffmpeg.exec(['-i', 'input.gif', '-vcodec', 'libx264', '-pix_fmt', 'yuv420p', 'output.mp4'])
10231023
const data = await ffmpeg.readFile('output.mp4')
10241024
const blob = new Blob([data], { type: 'video/mp4' })
10251025
const filename = 'giffium.mp4'

0 commit comments

Comments
 (0)