Last active
June 11, 2021 09:32
-
-
Save Rajssss/590fab26fd06348eef7e50c90ea17ecf to your computer and use it in GitHub Desktop.
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
| #1000 duplicated fames error fix, | |
| find . -name *.mp4 ! -path *.mp4.* -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 -max_muxing_queue_size 9999 -movflags frag_keyframe+empty_moov -max_interleave_delta 0 -vf mpdecimate -c:a copy -vsync vfr {}.mp4 \; -exec rm {} \; | |
| #Ilegal Seek fix adn out of queue error fix (faster encoding) | |
| find . -name *.mp4 ! -path *.mp4.* -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 -max_muxing_queue_size 9999 -movflags frag_keyframe+empty_moov {}.mp4 \; -exec rm {} \; | |
| #run from any dir, will find .mp4 in all subdir and process it | |
| find . -name *.mp4 -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 {}.mp4 \; -exec rm {} \; | |
| #Same as above but skip already processed files | |
| find . -name *.mp4 ! -path *.mp4.* -exec ffmpeg -i {} -s 1280x720 -movflags faststart -profile:v high -level 4.2 {}.mp4 \; -exec rm {} \; | |
| #for GPU accelerated encoding | |
| -hwaccel cuvid | |
| #run this in side a dir where targets are located in root of that dir | |
| for i in *.mp4; do ffmpeg -i "$i" -s 1280x720 -movflags faststart -profile:v high -level 4.2 "${i%.*}-converted.mp4"; done | |
| #for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment