Skip to content

Commit

Permalink
ffmpeg argument order
Browse files Browse the repository at this point in the history
trimming would sometimes break
  • Loading branch information
halworsen committed Mar 24, 2023
1 parent 0a4977a commit 290da36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion footgas/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def save_clip(self):
trimmed_file = f'{self.file}-TRIMMED.tmp'
subprocess.run([
'ffmpeg', '-y', '-hide_banner', '-loglevel', 'error',
'-ss', f'{self.start}', # order matters. must be before -i
'-to', f'{self.end}',
'-i', f'{self.file}',
'-c', 'copy', '-ss', f'{self.start}', '-to', f'{self.end}',
'-f', 'mp4',
f'{trimmed_file}',
], creationflags=self.NO_WINDOW_FLAG)
Expand Down

0 comments on commit 290da36

Please sign in to comment.