# Short script to split videos by filesize using ffmpeg by LukeLRĮcho 'Illegal number of parameters. split-video.sh huge-video.mov 64000000 "-c:v libx264 -crf 23 -c:a copy -vf scale=960:-1"įinally, the source code of the script: #!/bin/bash It takes only three arguments: The source filename, the desired filesize of each part and the desired arguments for ffmpeg.Įxample call to split a file into 64MB parts. Allow for custom ffmpeg arguments to also reduce resolution and quality in one pass.proceed with as many parts as needed to contain the whole source file.Check length of resulting video part and calculate where to start next part.Use ffmpeg's -fs-flag to limit filesize.I just had the same problem, and after I didn't find a solution here, I wrote a quick bash script for that job.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |