Last active
March 2, 2016 06:05
-
-
Save nuomi1/a6b8632f8b50fda72a67 to your computer and use it in GitHub Desktop.
Automator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set inputPath to "" | |
repeat with temp in input | |
set inputPath to inputPath & " " & quoted form of POSIX path of temp | |
end repeat | |
tell application "Terminal" | |
activate | |
do script "concat.py " & inputPath & "" | |
end tell | |
end run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import subprocess | |
import sys | |
def concat(files, output = sys.argv[1].replace('[00].f4v', '') + '.mp4'): | |
concat_list = open(output + '.txt', 'w', encoding = "utf-8") | |
for file in files: | |
if os.path.isfile(file): | |
concat_list.write("file '%s'\n" % file) | |
concat_list.close() | |
params = ['ffmpeg', '-f', 'concat', '-i', output + '.txt', '-c', 'copy', output] | |
subprocess.check_call(params) | |
os.remove(output + '.txt') | |
concat(sys.argv[1:]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set inputPath to "" | |
repeat with temp in input | |
set inputPath to inputPath & space & quoted form of POSIX path of temp | |
end repeat | |
tell application "Terminal" | |
activate | |
do script "Leanify " & inputPath & " " | |
end tell | |
end run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set inputPath to "" | |
repeat with temp in input | |
set inputPath to inputPath & space & quoted form of POSIX path of temp | |
end repeat | |
tell application "Terminal" | |
activate | |
do script "MediaInfo " & inputPath & "" | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment