Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on run {input, parameters}
  2.     repeat with file_ in input
  3.         set initialMessage to quoted form of "display notification \"Rozpoczęto przetwarzanie pliku\" with title \"MediaPTV\""
  4.         set completeMessage to quoted form of "display notification \"Przetwarzanie pliku zakończone!\" with title \"MediaPTV\""
  5.         tell application "System Events"
  6.             set inputFilename to name of (get properties of file_)
  7.         end tell
  8.         set inputFilePath to quoted form of (POSIX path of file_)
  9.         set outputFilePath to quoted form of (POSIX path of file_)
  10.         tell application "Terminal"
  11.             activate
  12.             do script "osascript -e " & initialMessage & " && ~/ffmpeg -i " & inputFilePath & " -vcodec libxvid -b:v 4000k -q 2 " & outputFilePath & ".avi && osascript -e " & completeMessage
  13.             beep
  14.         end tell
  15.     end repeat
  16.     return input
  17. end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement