Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var precut=""
- var nextcut=""
- function something_handler() {
- 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"'+"'"+")")
- }
- function endthing_handler(){
- nextcut= mp.get_property("playback-time")
- }
- function delthing_handler(){
- precut= mp.get_property("playback-time")
- }
- mp.add_key_binding("c", "something", something_handler)
- mp.add_key_binding("x", "endthing", endthing_handler)
- mp.add_key_binding("z", "delthing", delthing_handler)
Add Comment
Please, Sign In to add comment