Split a video for Youtube
Hi, I am writing a script to split videos in order to match Youtube restrictions (<100Mb, <10'). For now I have something like that: $ ffmpeg -i in.avi -fs 100000000 -t 600 -s $OFFSET out-$INDEX.avi $OFFSET starts at 0 and it's incremented with the duration of the previous chunk. Finally, when $OFFSET+$DURATION_OF_CHUNK >= $TOTAL_DURATION, I know I have to break. Problem is that sometimes, depending on the input file, the sum of chunks does not reach the input video duration; then, the script does not know this was the last chunk and continues to loop. I know I could check the chunk size and time duration and compare against my restrictions (if none is meet, then it was the last chunk), but maxfilesize is actually never reached. Any ideas? thanks
participants (1)
-
tokland@gmail.com