Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
90
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 completeMessage to quoted form of "display notification \"Przetwarzanie pliku zakończone\" with title \"MediaPTV\""
  4.         tell application "System Events"
  5.             set inputFilename to name of (get properties of file_)
  6.         end tell
  7.         set inputFilePath to quoted form of (POSIX path of file_)
  8.         set outputFilePath to quoted form of (POSIX path of file_)
  9.         tell application "Terminal"
  10.             activate
  11.             do script "~/ffmpeg -i " & inputFilePath & " -vcodec libxvid -b:v 4000k -q 2 " & outputFilePath & ".avi && osascript -e " & completeMessage
  12.             beep
  13.         end tell
  14.     end repeat
  15.     display notification "Rozpoczęto przetwarzanie pliku…"
  16.     return input
  17. end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement