2/16/2023 0 Comments Ffmpeg cut video into piecesAlso, there is no need for seq - brace expansion is all you need to get a sequence. This works: for i in $( seq 50 ) ĭo ffmpeg -i input.mpg -sameq -ss 00:`expr $i \* 2 - 2`:00 -t 00:02:00 output.mpg doneĪnother thing is that you probably don't want output.mpg to be overwritten in each run, do you? :) Use $i in the output filename as well.Īpart from that: In bash, you can just use $(( )) or $ instead of expr - it also looks more clear (in my opinion). You forgot to use backticks - or better: $( ) subshell - in the seq invocation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |