Hi guys!
Im currently creating a Automator service.
THE GOAL:
1. Right click on a random folder containing videofiles, and run the service.
2. Automator sends only the videofiles (not subtitles ++) from the selected folder to VisualHub for convertion.
3. VisualHub loads presets and decides output location and exports .m4v files ready to play on iphone.
4. Automator copies the subtitle files from the folder (from step 1) to the same output location as VisualHub exports the videoes.
5. Both videoes and subtitles are sent to Subler for soft coding the subtitles on to the videos, and exported again.
6. The finished files are sent to itunes.
THE STATUS:
I have already come a long way. With that i mean people have done a lot of work for me
You see i have found most of the scripting on the web and put it together in automator.
So i have a complete workflow running step 1-4.
This is my current workflow.
1. A script searches through my selected folder, and finds all movie files inside that folder
(script name: "Extract_Movies_Workflow" found on apples sites)
View Script
2.A second script sends this files to VisualHub for convertion, load settings and selects output location
View Script
3. A "Get selected finder items" action choose files from the selected folder in step 1.
(This action does not get its input from the previous actions.)
4. A copy of the "Extract_Movies_Workflow" script, searches through the selected folder,
only this time it looks for subtitle files like .srt, .sub, .idx and .ssa
View Script
5. A "Copy Finder-objects" action copies the subtitle files to the same folder as VisualHub exports its videoes.
THE QUESTION:
Okey so here is where im at. The thing is, im REALY noob at programming.
So i have searched the web for clues on how to code the part where subler loads first a video,
then the subtitle with the same name as the video, exports it and repeats the prosess for all the files in that folder.
Can anyone help me?
Subler has also a CLI version, and their is a help file showing the commands for the CLI version here.
Does this help?
I think i need some part of this code for repeating the action for the whole folder but i can't understand all of what it does?
(of course needs to change finder application, but i mean the "setList" and "repeat" code)
tell application "Finder"
set theList to every file of folder (path to desktop folder as string)
set i to 1
repeat the count of theList times
set theItem to item i of theList as string
--then manipulate it.
set i to i + 1
end repeat
end tell
One of my problems is that i mix bash scripting (which is in Terminal, right?) and apple script. This two languages can't be mixed right?
I realy want to learn the programming stuff, not just copy other peoples work, but its so damn difficult. Can't get my head around it.
Anyway. Hope some of you can help me, I would realy appriciate it!
Thanks alot!
-Kris
Im currently creating a Automator service.
THE GOAL:
1. Right click on a random folder containing videofiles, and run the service.
2. Automator sends only the videofiles (not subtitles ++) from the selected folder to VisualHub for convertion.
3. VisualHub loads presets and decides output location and exports .m4v files ready to play on iphone.
4. Automator copies the subtitle files from the folder (from step 1) to the same output location as VisualHub exports the videoes.
5. Both videoes and subtitles are sent to Subler for soft coding the subtitles on to the videos, and exported again.
6. The finished files are sent to itunes.
THE STATUS:
I have already come a long way. With that i mean people have done a lot of work for me
You see i have found most of the scripting on the web and put it together in automator.
So i have a complete workflow running step 1-4.
This is my current workflow.
1. A script searches through my selected folder, and finds all movie files inside that folder
(script name: "Extract_Movies_Workflow" found on apples sites)
View Script
2.A second script sends this files to VisualHub for convertion, load settings and selects output location
View Script
3. A "Get selected finder items" action choose files from the selected folder in step 1.
(This action does not get its input from the previous actions.)
4. A copy of the "Extract_Movies_Workflow" script, searches through the selected folder,
only this time it looks for subtitle files like .srt, .sub, .idx and .ssa
View Script
5. A "Copy Finder-objects" action copies the subtitle files to the same folder as VisualHub exports its videoes.
THE QUESTION:
Okey so here is where im at. The thing is, im REALY noob at programming.
So i have searched the web for clues on how to code the part where subler loads first a video,
then the subtitle with the same name as the video, exports it and repeats the prosess for all the files in that folder.
Can anyone help me?
Subler has also a CLI version, and their is a help file showing the commands for the CLI version here.
Does this help?
I think i need some part of this code for repeating the action for the whole folder but i can't understand all of what it does?
(of course needs to change finder application, but i mean the "setList" and "repeat" code)
tell application "Finder"
set theList to every file of folder (path to desktop folder as string)
set i to 1
repeat the count of theList times
set theItem to item i of theList as string
--then manipulate it.
set i to i + 1
end repeat
end tell
One of my problems is that i mix bash scripting (which is in Terminal, right?) and apple script. This two languages can't be mixed right?
I realy want to learn the programming stuff, not just copy other peoples work, but its so damn difficult. Can't get my head around it.
Anyway. Hope some of you can help me, I would realy appriciate it!
Thanks alot!
-Kris