movie issues

how to get the lenght of a flv-movie, (best in seconds) using shell scripts?
how to rotate a movie for 90 degrees, using free software or better using shell scripts?


System events can get the movie length. If you want to run it from the shell then just use osascript.

set movie_file to (choose file) as text
tell application "System Events"
	set theMovie to movie file movie_file
	set time_scale to time scale of theMovie
	set movie_duration to duration of theMovie
end tell
set theSecs to movie_duration / time_scale

Offhand I don’t know how to rotate a movie. Probably quicktime 7 can do it and again osascript can run the command from the shell.

thanks Hank. quite interesting tip, i never thought that “system events” is capable of much of versatile.

i’ve a tecnical issue too.
Since when, 10 comes before 2? Part 10 should come after Part 9.

set frw to list folder (choose folder with prompt "seach a folder containing film strips" as text) without invisibles

i get an output like:
{“botanic garden Part 1 of 10.flv”, “botanic garden Part 10 of 10.flv”,“botanic garden Part 2 of 10.flv”, “botanic garden Part 3 of 10.flv”, “botanic garden Part 4 of 10.flv”, “botanic garden Part 5 of 10.flv”, “botanic garden Part 6 of 10.flv”, “botanic garden Part 7 of 10.flv”, “botanic garden Part 8 of 10.flv”, “botanic garden Part 9 of 10.flv”}