Exporting a referencing movie...

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mikele
Posts: 8
Joined: Thu Oct 02, 2008 5:30 pm
Location: Paris

Exporting a referencing movie...

Post by mikele » Thu Feb 05, 2009 7:25 pm

Hi everyone,

first I'm new to this forum and to RunRev development though I'm quite seasoned on HyperCard dev.

I want to develop an RR tool that would allow me to easily "chapterize" a long movie (60 to 90 minutes) made of many scenes since the footage comes from an analog Hi8 tape, without any useful time code (captured in DV).

From those chapters breaks, enriched by description and actual shooting date and time, I would like to generate "referencing movies" i.e. which are small in size and essentially point to the start and end point of the original video. Because with appropriate naming of those, I can make them recognized by iMovie'09 with the correct date and time ! :)

FYI, this is done quite easily in QuickTime Player (Pro) through the "Save As..." menu and then selecting the bottom radio button labeled "Save as a reference movie". But it's quite labor intensive.

I have already figured out how to make the chaptering user interface and I'm now looking at the export part.

I understand that applescript code might have to be involved (any help appreciated here ! :wink: ) but do you know whether the nice tool from bluemango folks (EQT External) could be of some use here ? I have installed it but the documentation does not mention this "save as reference" option in their qtSaveAs command.

Thanks in advance for your help
Mikélé

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Thu Feb 05, 2009 9:55 pm

Hi mikele,

I dont quite understand:

you have one long movie which consists of many short sequences. And it is these sequences you want to reference in the alias files that are properly named so you can use them in iMovie. Is that right?

Do you want do do this with just one movie or with many movies?

I looked at the documentation of the quicktime external and did not find a hint that it can create an alias file. But who knows? Klaus Major has a lot of experience with the external and he might shed some light on this.

If I am at all on the right track it would be easier to write an applescript. If you want to use Rev I dont see how you can save as an alias from Rev. What you could do though is that you select the parts of your long movie get the times of the start and end of the selection, store that in a text file, then when done you take that text file, read it into apple script and do it in the Quicktime player. You can then open the original file, select the times you imported, create a new movie, save that a an alias and close the new movie. You do this for the whole list.
This seems a lot of work for one movie, however if you have a couple of them it might be worth the effort to program this.

Then there might be an easier way and then I might not understand exactly what you want
regards
Bernd

mikele
Posts: 8
Joined: Thu Oct 02, 2008 5:30 pm
Location: Paris

Post by mikele » Fri Feb 06, 2009 12:33 am

Thanks Bernd for your reply.

Let's say I have a 90 minutes movie (a full Hi8 tape) which contains 50 distinct sequences.
I'm marking the beginning and end of each with my RR stack.
Now I want to automatically generate for each of those 50 sequences a ".mov" file which is a kind of alias (it's not a MacOS alias) with the beginning and end of the sequence i.e. a reference movie as per Apple's terminology or more precisely a referencing movie.

If you want to do it in QT Player Pro :
1) you select beginning and end of sequence
2) Edit > Trim to selection
3) File > Save as... > reference file radio button in dialog

(do NOT save the original movie !)

That's it. But it's quite time consuming since you have to open the original file and select begin / end 50 times

And yes, I have about 400 GB of video to process like this ! :lol:

Of course I could save the real video instead of the reference to it but
1) it would take longer to process
2) I would like to keep the original footage on a separate hard drive
3) I like this concept !

Cheers - Mikélé

PS: if Applescript is required to drive QT Player Pro, I can do it directly from RunRev.
Last edited by mikele on Fri Feb 06, 2009 9:39 am, edited 1 time in total.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Fri Feb 06, 2009 1:07 am

Hi Mikele,
1) you select beginning and end of sequence
2) Edit > Trim to selection
3) Save as... > reference file radio button in dialog
I would just copy the selection into a new player and then save the new player as a referenced movie, this way you dont have to trim and you can make a new selection right away.

That would be also the aproach to do it by apple script that I propose.

if you mark the start and the end of an episode in Rev in a player you could extract the startTime and the endTime, which gives you the start and end of a selection. You save these as a pair of values in a line then the next selection. You could use this list to trigger an applescript that does essentially what you do manually in the Quicktime Player Pro. You could add to the list of start / end times a third item that will be used for the filename. You wanted the filename to hint at the episodes.
Would this be enough for you?
regards
Bernd

mikele
Posts: 8
Joined: Thu Oct 02, 2008 5:30 pm
Location: Paris

Post by mikele » Fri Feb 06, 2009 2:31 am

Actually Bernd, I figured out all this. :?

What I don't know is how to "save as reference" a movie in a player :
1) using the EQT external
2) using AppleScript to drive QT Player Pro if 1) doesn't work

I may have misled you by mentioning all the context around my project but I thought it would be useful. Sorry for this.

Mikélé

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Fri Feb 06, 2009 12:58 pm

Hi,

ok here is an unpolished apple script that you can run from the script editor as a start. You open one movie, make a selection and then the script takes that selection, makes a new movie and saves it as a referenced movie to your desktop, overwriting any previously saved movie on the desktop of the same name (RevMovie.mov)

Code: Select all

set thePath to (path to desktop as string) & "RefMovie.mov"
tell application "QuickTime Player"
	-- assuming the original movie with the selectioni is frontmost	
	tell document 1
		set origName to name
		set theStart to the selection start
		set theEnd to the selection end
		if theStart = theEnd then -- no selection	
			display dialog "no selection, please select some portion of the movie"
			return -- abort
		end if
		copy
	end tell
	make new document
	set newname to name of document 1
	tell document newname
		paste
		save as alias in file thePath
	end tell
	close document 1
end tell
try this and we can go on from here
regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Fri Feb 06, 2009 3:24 pm

Hi mikele,

I uploaded to RevOnline (in your menubar of rev you have revonline to access it, my username is berndniggemann) a stack 'makereferencemovie' that does what you want. You can select in a Rev player a portion of a movie and via applescript it creates a reference file in Quicktime Player with a name of your choice.
It is just the basics, no batch processing, but that could easily be added.

Please tell me if that is what you have in mind.

If there is any problem, dont hesitate to ask.
regards
Bernd

mikele
Posts: 8
Joined: Thu Oct 02, 2008 5:30 pm
Location: Paris

Post by mikele » Fri Feb 06, 2009 7:06 pm

Thanks a lot Bernd ! :)
I will look at your code shortly i.e. tonight US time.
(I'm currently on the US west coast and not in Europe and it's a busy day) :wink:

Cheers - Mikélé

mikele
Posts: 8
Joined: Thu Oct 02, 2008 5:30 pm
Location: Paris

Post by mikele » Fri Feb 06, 2009 8:40 pm

Actually, I couldn't wait and I already downloaded your proof-of-concept stack... and it works as I expect it !

That's wonderful. Vielen Dank Bernd ! :D

Once finalized, in a month or so, I'll make that tool that I'm building available to everyone
(who uses a Mac, has QT Pro and uses iMovie with old analog footage...).

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Sun Feb 08, 2009 1:56 pm

Hi Mikélé,
I uploaded a new version to revOnline, MakeReferenceMovieII,
It now lets you annotate the reference movies. You annotate the four (of 13 possible) annotations that are shown when you open a .mov file in Quicktime player and get info (command I). Annotations are also indexed by Spotlight so you can find your files from the finder if you search for keywords in the annotation.
I also added a finetune option for the selection, which might come in handy if you have a long movie and the controls of the player are difficult to use for finetuning.
Also, a folder is created on the desktop for all the snippets to go to.
I could not resist to play around with it...

By the way, you DONT need the pro version of the Quicktime Player, apple script works on the non-pro version just as it does on the pro version.
have fun
regards
Bernd

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Exporting a referencing movie...

Post by Klaus » Sat Dec 12, 2009 1:43 pm

Hi friends,

unfortunately one cannot export (parts of) a movie to a referenced movie.

Write a nice mail to Trevor, he is a very nice guy!, and maybe he will implement
this feature in one of the next versions of the external :)


Best

Klaus

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4036
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Exporting a referencing movie...

Post by bn » Sat Dec 12, 2009 4:08 pm

Nally,
what exactly are you trying to do, on a Mac one can often achieve things by using Applescript, on Windows I don't know. Visual basic?

Or are you just trying to drop a link??????

What are the references you cite on the bottom of your post?

2nd Edit: Or are you a reincarnation of Monay, 2 posts above, who also dropped links to the same site?


regards
Bernd

Post Reply

Return to “Multimedia”