![]() |
|
|
|
#1
|
|||
|
|||
|
Ich hatte Schwierigkeiten, einen vernünftigen Abschlussbefehl zu erstellen.
/pfad/zu/meinem/shellscript "?0" Liefert Fehler. Wenn die Datei z.B. /Users/skeeve/Wickie und die starken Männer 1.ts ist, kommt als erster Parameter beim Shellscript an: "/Users/skeeve/Wickie Das Problem ist meiner Meinung nach diese Zeile im Source: Code:
Process subprocess = Runtime.getRuntime().exec(commandline); // anyone has told that works better Code:
Process subprocess = Runtime.getRuntime().exec(arguments); /pfad/zu/meinem/shellscript ?0 steht da also jetzt, und das Shellscript hat den Inhalt: Code:
#!/bin/sh infile=$1 outfile=$1.mp4 /Applications/iSquint.app/Contents/Resources/ffmpeg \ -y \ -threads 4 \ -i "$infile" \ -s 400x300 \ -r 25.00 \ -vcodec mpeg4 \ -g 300 \ -aspect 400:300 \ -b 2300 \ -async 50 \ -acodec aac \ -ar 44100 \ -ac 2 \ -ab 128 \ "$outfile" |
|
#2
|
|||
|
|||
|
Und hier jetzt nochmal der vollständige Abschlußbefehl, den ich in OS X nutze, um nach dem Schneiden und Konvertieren mein Aufnahmen vom M750S direkt eine iPod kompatible Version zu erstellen.
Hier die Variante für 4:3 Aufnahmen: Code:
#!/bin/sh
osascript -e '
property resH : "400"
property resV : "300"
property framerate : "25.00"
property aspect : "4:3"
property bgcol : {16705, 26985, 43690} -- kind of blue
property fgcol : {65535, 65535, 39321} -- kind of yellow
property bdcol : {65535, 65535, 65535} -- white
on run (arg)
set arg to quoted form of (arg as text)
set columns to 26 + length of arg
if columns > 200 then set columns to 200
tell application "Terminal"
set theTab to do script "/Applications/iSquint.app/Contents/Resources/ffmpeg -y -threads 4 -i " & arg & " -s " & resH & "x" & resV & " -r " & framerate & " -vcodec mpeg4 -g 300 -aspect " & aspect & " -b 2300 -async 50 -acodec aac -ar 44100 -ac 2 -ab 128 " & arg & ".mp4 ; exit"
tell theTab to tell current settings
if number of columns < columns then set number of columns to columns
set background color to bgcol
set cursor color to fgcol
set normal text color to fgcol
set bold text color to bdcol
end tell
end tell
end run
' "$1"
Code:
/Users/skeeve/bin/convert2iPod_4x3.sh ?0 Nach dem Konvertieren öffnet sich nun ein Terminal Fenster mit eigenen Farben (Siehe Properties im Script) in dem mit ffmpeg (aus iSquint) die Konvertierung erfolgt. |