- Registriert
- 11.01.19
- Beiträge
- 32
HI Leute,
Ich habe das Erfolgreich hinbekommen aber ich möchte es alles in eine einzigen Text Datei auslesen und schreiben lassen.
Es Sollte dann so aussehen. Die Text Datei soll dann zbs. heissen FFmpeg_Edit.cfg. Es sollte dann das drin stehen. Es sollte dann Natürlich in Dialogs Text Input nicht output optionen: und auch nicht output format: drin stehen sondern nur was da nach kommt. Beim Speichern darf natürlich auch nicht output optionen: und output format: verändert werden sonder nur was danach kommt.
Ich hoffe ihr Versteht was ich was ich meine.
FFmpeg_Edit.cfg
Zum Verständnis ist ihr das Script und die 2 Text Dateien.
ffmpeg_output_file_options.cfg
ffmpeg_output_format.cfg
PS. Ich bedanke mich schon mal dafür.
MFG flashi
Ich habe das Erfolgreich hinbekommen aber ich möchte es alles in eine einzigen Text Datei auslesen und schreiben lassen.
Es Sollte dann so aussehen. Die Text Datei soll dann zbs. heissen FFmpeg_Edit.cfg. Es sollte dann das drin stehen. Es sollte dann Natürlich in Dialogs Text Input nicht output optionen: und auch nicht output format: drin stehen sondern nur was da nach kommt. Beim Speichern darf natürlich auch nicht output optionen: und output format: verändert werden sonder nur was danach kommt.
Ich hoffe ihr Versteht was ich was ich meine.
FFmpeg_Edit.cfg
Code:
output optionen:-threads 1 -preset fast -c:a aac -b:a 128k -c:v libx264 -vf scale=854:480
output format:mp4
Zum Verständnis ist ihr das Script und die 2 Text Dateien.
Code:
on readFile(unixPath)
set foo to (open for access (unixPath))
set txt to (read foo for (get eof foo) as «class utf8»)
close access foo
return txt
end readFile
on writeFile(theText, unixPath)
set foo to open for access file unixPath with write permission
set eof of foo to 0
write theText to foo starting at eof
close access foo
return
end writeFile
set output_file_options to readFile((path to documents folder as string) & "ffmpeg_output_file_options.cfg")
set {text returned:output_file_options} to (display dialog "Output File Options" default answer output_file_options buttons {"Abort", "Save"} with title "FFmpeg Edit")
set DlogResult to result
if button returned of result = "Save" then
set this_output_file_options to output_file_options
writeFile(this_output_file_options, (path to documents folder as string) & "ffmpeg_output_file_options.cfg")
set output_format to readFile((path to documents folder as string) & "ffmpeg_output_format.cfg")
set {text returned:output_format} to (display dialog "Output Format" default answer output_format buttons {"Abort", "Save"} with title "FFmpeg Edit")
set DlogResult to result
set this_output_format to output_format
writeFile(this_output_format, (path to documents folder as string) & "ffmpeg_output_format.cfg")
end if
ffmpeg_output_file_options.cfg
Code:
-threads 1 -preset fast -c:a aac -b:a 128k -c:v libx264 -vf scale=854:480
ffmpeg_output_format.cfg
Code:
mp4
PS. Ich bedanke mich schon mal dafür.
MFG flashi
Zuletzt bearbeitet: