This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3.6 | |
| import subprocess | |
| import sys | |
| import os | |
| import glob | |
| def fix_video_using_ffmpeg(f, output_dir): | |
| out_f = os.path.join(output_dir, os.path.basename(f)) | |
| # ffmpeg -err_detect ignore_err -i video.mkv -c copy video_fixed.mkv | |
| exit_code = subprocess.call(['ffmpeg', '-err_detect', 'ignore_err', '-i', f, '-c', 'copy', out_f]) |