Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on run {input, parameters}
- repeat with file_ in input
- set initialMessage to quoted form of "display notification \"Rozpoczęto przetwarzanie pliku\" with title \"MediaPTV\""
- set completeMessage to quoted form of "display notification \"Przetwarzanie pliku zakończone!\" with title \"MediaPTV\""
- tell application "System Events"
- set inputFilename to name of (get properties of file_)
- end tell
- set inputFilePath to quoted form of (POSIX path of file_)
- set outputFilePath to quoted form of (POSIX path of file_)
- tell application "Terminal"
- activate
- do script "osascript -e " & initialMessage & " && ~/ffmpeg -i " & inputFilePath & " -vcodec libxvid -b:v 4000k -q 2 " & outputFilePath & ".avi && osascript -e " & completeMessage
- beep
- end tell
- end repeat
- return input
- end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement