RMVB Batch Cropping

Source: Internet
Author: User

There are more than 100 videos in the computer, and then it starts and ends too long, so I want to cut it ...

#!/usr/bin/env python# rmvbeditor  http://gd.7edown.com:808/green/rmedtgui.rar   # mediainfo cli x86 http://mediaarea.net/download/binary/mediainfo/0.7.72/mediainfo_cli_ 0.7.72_windows_i386.zip# mediainfo cli x64 http://mediaarea.net/download/binary/mediainfo/ 0.7.72/mediainfo_cli_0.7.72_windows_x64.zipimport subprocessimport datetimeimport ossource_dir  =  ' D:\English\SaladEN ' dist_dir =  ' D:\English\SaladENnew ' Os.chdir (' d:\soft\mobile  Soft\rmvb cut ') For filename in os.listdir (source_dir):     total_time  = subprocess. Popen ("mediainfo.exe --output=video;%%duration%% %s\%s"  %  (source_dir,filename),  Shell=true, stdout=subprocess. PIPE)     total_time = total_time.stdout.read (). Strip ()      End_time = datetime.datetime.strptime ('%s:%s '  %  (int (to)Tal_time[0:-3])/60, int (total_time[0:-3])%60),  "%m:%s")  + datetime.timedelta (seconds=-34)     end_time =  "%s.%s"  %  (datetime.datetime.strftime (end_time,  '% M:%s '),  total_time[-4:-1])     subprocess. Popen ("rmeditor.exe -i %s\%s -o %s\%s -s 0:30.000 -e %s -q " " %  (Source_dir,filename,dist_dir,filename,end_time),  shell=true)   print " all  ok "


RMVB Batch Cropping

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.