Advertisement
constantin-net

mpv_input.conf_v02

Feb 12th, 2019 (edited)
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. #---trsnslate subs---
  2. F1 run "/bin/bash" "-c" "echo \"${sub-text}\" | tr -s ' ',',','!','?','.','-','—',':' '\\n' > /tmp/sub; ~/.bin/words.sh \"${time-pos}\""
  3. F2 run "/bin/bash" "-c" "echo \"${sub-text}\" | tr -s ' ',',','!','?','.','-','—',':' '\\n' > /tmp/sub; ~/.bin/words2.sh \"${time-pos}\""
  4. #google_translate
  5. F3 run "/bin/bash" "-c" "echo \"${sub-text}\" | tr -s ' ',',','!','?','.','-','—' '\\n' > /tmp/sub; ~/.bin/words3.sh \"${time-pos}\""
  6. #escape brackets
  7. F4 run "/bin/bash" "-c" "echo ${sub-text} | tr -s '\'',' ',',','!','?','.','-','—',':' '\\n' > /tmp/sub; ~/.bin/words2.sh \"${time-pos}\""
  8. #------
  9. #---encode video---
  10. #start point
  11. F5 run "/bin/bash" "-c" "echo \"${=time-pos}\" > /tmp/webm_start"; show-text "start \"${time-pos}\""
  12. #stop point
  13. F6 run "/bin/bash" "-c" "echo \"${=time-pos}\" > /tmp/webm_end"; show-text "end \"${time-pos}\""
  14. #PV
  15. F7 run "/bin/bash" "-c" "mpv --title='PREVIEW' --geometry=640x360 --no-resume-playback --start=`cat /tmp/webm_start` --end=`cat /tmp/webm_end` --loop=no \"${filename}\" "
  16. #cut webm
  17. F8 run "/usr/bin/xterm" "-e" "mpv_webm \"${filename}\" \'${sid}\' \'${aid}\' \"$HOME/Desktop/cut\" "; show-text "webm encode (sub: \"${sid}\")"
  18. #F9 run get_mouse_coord.lua
  19. #cut cropped webm
  20. F10 run "/usr/bin/xterm" "-e" "mpv_crop \"${filename}\" \'${aid}\' \"$HOME/Desktop/cut\" "; show-text "mpv crop webm"
  21. #cut mp4
  22. F11 run "/usr/bin/xterm" "-e" "mpv_mp4cut \"${filename}\" \'${aid}\' \"$HOME/Desktop/cut\" "; show-text "mp4_cut"
  23. #test or clear points
  24. F12 run "/bin/bash" "-c" "rm /tmp/webm_* &>/dev/null"; show-text " clear "
  25. #------
  26. #MOUSE_BTN0_DBL cycle fullscreen
  27. MOUSE_BTN2_DBL cycle sub
  28. #MOUSE_BTN0 cycle pause
  29. MOUSE_BTN1 screenshot
  30. ENTER cycle pause
  31. ESC quit
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement