[MEncoder-users] Encoding iPhone MOV into MPEG-2 -- Video framerate is super fast!?
L Lee
llee040 at sbcglobal.net
Wed Nov 11 19:59:20 CET 2009
On 11/11/09 10:08 AM, "Jarred Nicholls" <jarred.nicholls at gmail.com> wrote:
> I'm on debian/ubuntu, but I run os x on my dev box. I can convert any
> script to a bash/ruby/python/etc. script so maybe just having the workflow
> would be helpful, thanks! I am unfamiliar with the ffmpeg/sox workflow, I
> wasn't on the list until yesterday. What was the subject titled? I can
> search for it in the archives.
Separating each of the 6 channels of ac3 file into separate wav files
http://thread.gmane.org/gmane.comp.video.mencoder.user/10568/focus=10574
The AppleScript droplet requires that you have recent versions of ffmpeg,
sox, and mediainfo cli executables installed. It will require reworking to
adjust anything but tempo because it calculates the sox tempo adjustment
factor by subtracting the inappropriate delay observed near the conclusion
of the source video from the actual duration and then dividing the actual
duration by the difference. The factor for sox tempo adjustment is larger
than 1 for audio that needs to be sped up.
property newline : ASCII character 10
property tmpfile : "/tmp/execme.command"
on open filelist
set afile to item 1 of filelist
set targetstring to (quoted form of POSIX path of afile)
set initval to (word -1 of (do shell script "/usr/local/bin/mediainfo -f
" & targetstring & " | grep -m 1 Duration")) as text
set adjustval to text returned of (display dialog "How much too long is
the original audio in milliseconds?" default answer 1000)
set calcval to initval / (initval - adjustval)
set i to afile as alias
tell application "Finder" to set P to i's container as text
set n to (info for i)'s name
my replace_chars(n, ".ac3", "_adjusted.ac3")
set output_file to POSIX path of (P & result)
set outputfile to (quoted form of output_file)
set theShellScript to "ffmpeg -v 0 -i" & space & targetstring & space &
"-f sox - | /usr/local/bin/sox -S -V -p -p tempo" & space & calcval & space
& "| /usr/local/bin/ffmpeg -v 0 -i - -acodec ac3 -ab 448000 -y" & space &
outputfile
delay 1
do shell script "echo " & quoted form of theShellScript & " > " &
tmpfile
repeat
try
do shell script "chmod +x " & tmpfile
do shell script "open -a Terminal.app" & space & tmpfile
exit repeat
on error
delay 1
end try
end repeat
end open
on replace_chars(this_text, _bad, _good)
set AppleScript's text item delimiters to the _bad
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the _good as string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars
--
Laine Lee
More information about the MEncoder-users
mailing list