![]() Print "Exception occured running main():" print str (e ) print_help ( ) raise SystemExit if _name_ = '_main_': add_option ( "-s", "-split-size" ,ĭest = "split_size", help = "split or chunk size in seconds, for example 10", type = "int" ,Īction = "store" ) (options, args ) = parser. ![]() ![]() add_option ( "-f", "-file" ,ĭest = "filename", help = "file to split, for example sample.avi", type = "string" ,Īction = "store" ) parser. Popen (split_cmd split_str, shell = True, stdout = subprocess. "'" print "About to run: " split_cmd split_str Split_str = " -ss " str (split_start ) " -t " str (split_length ) \ Split_cmd = "ffmpeg -i '" filename "' " for n in range ( 0, split_count ): Print "Clip length is less then the target split length." raise SystemExit # -acodec copy and -vcodec copy will not give accurate results so do not use them ceil (clip_length/ float (split_length ) ) ) if (split_count = 1 ): Print "Can't determine clip length." raise SystemExit group ( 3 ) ) print "Clip length in seconds: " str (clip_length ) else: search (output ) if matches:Ĭlip_length = int (matches. (filename, split_length ) = parse_options ( ) if split_length
0 Comments
Leave a Reply. |