Guest User

Untitled

a guest
Feb 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. var precut=""
  2. var nextcut=""
  3. function something_handler() {
  4.  
  5. mp.utils.write_file('file://'+mp.utils.split_path(mp.get_property('path'))[0]+'cut.py', "import subprocess \nsubprocess.Popen('ffmpeg -hide_banner -ss "+precut +" -y -i "+'"'+"'+(r'"+mp.get_property('path')+"')+'"+'"'+" -t "+nextcut +" -c:a copy -c:v copy "+'"'+"'+(r'"+mp.get_property('path')+"')+'"+'02.mp4"'+"'"+")")
  6. }
  7.  
  8. function endthing_handler(){
  9. nextcut= mp.get_property("playback-time")
  10.  
  11. }
  12. function delthing_handler(){
  13.  
  14. precut= mp.get_property("playback-time")
  15. }
  16.  
  17. mp.add_key_binding("c", "something", something_handler)
  18. mp.add_key_binding("x", "endthing", endthing_handler)
  19. mp.add_key_binding("z", "delthing", delthing_handler)
Add Comment
Please, Sign In to add comment