Skip to content

Commit

Permalink
Early exit on error in ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed Jan 11, 2025
1 parent 2a44d6c commit f8a539c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/support/media-files/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ async function processAudio(

await spawnAsync('ffmpeg', [
'-hide_banner',
['-err_detect', 'explode', '-xerror'], // Fail on error
['-loglevel', 'error'],
['-i', localFilePath],
'-y', // Overwrite existing file
Expand Down Expand Up @@ -352,6 +353,7 @@ async function processVideo(

await spawnAsync('ffmpeg', [
'-hide_banner',
['-err_detect', 'explode', '-xerror'], // Fail on error
['-loglevel', 'error'],
['-i', localFilePath],
['-filter_complex', filters.join(';')],
Expand Down

0 comments on commit f8a539c

Please sign in to comment.