Skip to content

Instantly share code, notes, and snippets.

@chenxuuu
Created July 27, 2020 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenxuuu/5319881a1f25db3489d6dcb883103053 to your computer and use it in GitHub Desktop.
Save chenxuuu/5319881a1f25db3489d6dcb883103053 to your computer and use it in GitHub Desktop.
ffmpeg mp4 to flv bash script
mp4=( onedrive/**/*.mp4 ); for file in "${mp4[@]}"; do echo $file; if sudo ffmpeg -i "$file" -c copy -f flv -flvflags add_keyframe_index "$file.flv"; then echo success delete raw file; sudo rm "$file"; else echo fail; fi; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment