Skip to content

Commit 9e0f12d

Browse files
committed
fix: linux gpu error
1 parent d5f6791 commit 9e0f12d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/util/ffmpeg.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,10 @@ export function extractAudio(videoPath, audioPath) {
7979
}
8080

8181
export async function toH264(videoPath, outputPath) {
82-
const hasNvidia = await detectNvidia()
83-
log.debug('hasNvidia:', hasNvidia)
82+
// const hasNvidia = await detectNvidia()
8483
return new Promise((resolve, reject) => {
8584
ffmpeg(videoPath)
86-
.videoCodec(hasNvidia ? 'h264_nvenc' : 'libx264')
85+
.videoCodec('libx264')
8786
.outputOptions('-pix_fmt yuv420p')
8887
.save(outputPath)
8988
.on('end', () => {
@@ -123,4 +122,4 @@ export function getVideoDuration(videoPath) {
123122
}
124123
})
125124
})
126-
}
125+
}

0 commit comments

Comments
 (0)