Skip to content

Commit

Permalink
fix: certain images didn't render properly when exported to MP4
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Dec 20, 2024
1 parent 585fc0d commit f4ecee2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src-electron/main/ffmpeg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export const createVideoFromNonVideo = async (
.inputFormat('image2')
.videoCodec('libx264')
.size(`${convertedDimensions.width}x${convertedDimensions.height}`)
// .outputOptions('format=yuv420p', '-r 30')
.outputOptions('-t 5')
.loop(5) // Loop the input for 5 seconds
.outputOptions('-pix_fmt', 'yuv420p') // Pixel format
.outputOptions('-r', '30') // Frame rate: 30fps
.save(convertedFilePath)
.on('end', () => {
resolve();
Expand Down

0 comments on commit f4ecee2

Please sign in to comment.