• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting VLC?'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting VLC?'


  • Subject: Scripting VLC?'
  • From: Maik Waschfeld <email@hidden>
  • Date: Tue, 12 May 2015 09:43:44 +0200

Hi List,

Anyone scripting VLC?

The following folder actions-script don’t works, in a way that it opens VLC, but then it waits for VLC to end the conversion, which never happens, so the error happens in the shell script-part, that should handle the VLC-part..

——————————————————————————snip——————————————————————————
on adding folder items to this_folder after receiving these_items
set the_ConvFolder to this_folder


set the_shortTimestamp to ""
set the_ConvDone to "0"
set the_newPath to ""


set userBitDepth to "24"
set userSampleRate to "48000"
set shortSampleRate to „48k"

set the_DestFLD to choose folder with prompt "Bitte das Ziel-Verzeichnis auswählen!" without multiple selections allowed and invisibles
set the_shortTimestamp to (do shell script "date '+%y%m%d %H%M%S‘")
set the_ConvTimeStamp to ("_Converted " & the_shortTimestamp)

set theFiles to paragraphs of (do shell script "find " & POSIX path of the_ConvFolder & " -iname '*.wav' -or -iname '*.aif' -or -iname '*.mp3' -or -iname '*.m4a' -or -iname '*.mov' -or -iname '*.ogg' -or -iname '*.raw'")
tell application „Finder"
if (count items of theFiles) is greater than 0 then
make new folder at (the_DestFLD) with properties {name:the_ConvTimeStamp}
repeat with anItem in theFiles
set userShortFormat to ("_" & shortSampleRate & userBitDepth)
set the_newPath to (the_DestFLD & the_ConvTimeStamp)
set the_ItemInfo to info for anItem
set the_oldFileName to name of the_ItemInfo
set the_newFileName to (the_oldFileName & userShortFormat & ".wav“)
set the_newFile to (the_newPath & ":" & the_newFileName) as string
set the_uBD to ((userBitDepth * userSampleRate * 2) / 1000) do shell script "/Applications/VLC.app/Contents/MacOS/VLC" & " '" & quoted form of POSIX path of anItem & "' --sout='#transcode{vcodec= none,acodec=wav,ab=" & the_uBD & ",channels=2,samplerate=" & userSampleRate & "}:standard{mux=wav,access=file,dst=" & quoted form of POSIX path of the_newFile & "}‘"
set the_NewInfo to info for the_newFile as alias
set the_ConvDone to the_ConvDone + 1
delete (anItem) as POSIX file
end repeat
else
display dialog „No file to convert!“
end if
end tell
end adding folder items to
——————————————————————————snip——————————————————————————

Any hints?


With kindest regards…
…Maik Waschfeld

(sent from my MBAir11)




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: re: ISO Dates
  • Next by Date: Osascript: Portable Path to Icon
  • Previous by thread: re: ISO Dates
  • Next by thread: Osascript: Portable Path to Icon
  • Index(es):
    • Date
    • Thread