Videoclips

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Videoclips

Post by Timothy » Wed Sep 26, 2007 7:29 pm

Thanks again Lynn and Klaus,

With your kind assistance, I seem to have understood working with images in scripts. I thought videoclips would the be same, but apparently they are not.

Videoclips seem to "belong" to the stack, not to any card.

I've been able to import videoclips into my stack, in two different formats, .mov and .mp4. I can't get them to play, though. Actually, typing "play videoclip 1" seems to freeze the stack, if the clip is an .mp4.

I suppose I need to put a player on a card to play the videoclip. I see how to reference the clip in the player if it's an external video file.

But how do I reference the clip in the player if the clip has been imported into the stack?

Or, maybe I'm on the wrong track here... Please advise, in any case.

Thanks once more.

Tim
It's better to be happy and rich than poor and sad -- W. C. Fields

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

Post by Klaus » Wed Sep 26, 2007 8:20 pm

Hi Timothy,

yes, that's a bit strange, videoclips "belong" to the stack :-)

But you have to choose, either use imported videos and play them with "play vc XYZ" or use external videofiles inside a player object.

The player object uses QuickTime (means QT MUST be present on the target machine!) and thus can play all formats supported by QT.

Internal/imported videofiles are very limited as well in the usable format as in videocontrol.

I am not sure what internal formats are supported, you will have to test a bit, especially if you want to use them crossplatform.


Best

Klaus

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Wed Sep 26, 2007 9:49 pm

Hi Klaus,

Okay, I get it.

If you import an .mp4 and try to play it, it freezes RR.

.mov works. I'm not sure what other formats.

It seems odd. I can import a move, but don't get a controller, or play an external move, with a controller.

What's wrong with "play vc 1 with controller" ?

Or maybe that's a feature that's been requested before.

It works now, anyway.


Cheers,


Tim

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

Post by Klaus » Thu Sep 27, 2007 8:44 am

Hi Timothy,

a "controller" is a QuickTime feature!

You will have to create your own if you use "play vc XYZ" :-/



Regards

Klaus

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Fri Sep 28, 2007 10:16 pm

Hi Klaus,

I understand a controller is a quicktime feature.

Is it possible to emulate player controls with standard RR objects, commands and functions? I know about "play" and "stop." What about fast forward, rewind, pause and the progress bar?

If not, it would be nice if RR would make that possible. Like by offering a controller object. It seems like only a matter of time before I lose track of the external video files. I'd prefer to save them in the stack, if I could.

Cheers,


Tim

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Sat Sep 29, 2007 11:19 pm

Timothy wrote:Is it possible to emulate player controls with standard RR objects, commands and functions? I know about "play" and "stop." What about fast forward, rewind, pause and the progress bar?
Look in the documentation (check out all the "see also" entries too):

set the paused property to pause
currentTime and currentTimeChanged can be used with a slider/progress bar (also usefull: duration and timeScale)
PlayRate is for fast (or slow) fore and back playing

There are also various messages like playStopped etc. that can be of use
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Mon Oct 01, 2007 3:42 am

Okay, great. Thanks. I can handle it from here.

The docs are still forbiddingly terse, at least to me. Once I get a hint or two, I can deal.

Cheers,

Tim

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Mon Oct 01, 2007 4:09 am

RR's scripting language is "English-like."

Ironically, the documentation isn't.

Tim

neiljmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1
Joined: Thu Aug 23, 2007 9:09 am

Video playback examples request

Post by neiljmac » Fri Nov 02, 2007 11:53 am

Hi folks.

Does anyone know where I might find an example or two of how to seek through video clips please?

My task is that I will have two videos playing simmultaneously and when video 1 reaches a particular time, video 2 must play a segment, then pause. Video 1 will then reach another time and will trigger video 2 to play another segment. The video segments in video 2 will not necessarily be linear.

I hope I haven't been too confusing.

Many thanks in advance for advice.

Bets regards,

Neil.

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Fri Nov 02, 2007 8:52 pm

Hi Neil,

take a look at callback in the dictionary and / or download Klaus Majors great fun with callbacks stack to tear apart.

Hope that helps,

Malte

Post Reply

Return to “Talking LiveCode”