video

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

video

Post by pmc » Wed Mar 16, 2011 9:02 pm

i have made a stack with one player object and set the path to the movie. When I create it into a standalone and execute it in another computer, the player doesn't show up even with the quicktime player already installed. Why is this so and how to go about this?
Thanks in advance.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: video

Post by bn » Wed Mar 16, 2011 10:08 pm

Hi pmc,

could you post the relevant code? How did you set the player to the file, did you hard-code it into the the filename of the player. What is the other computer's operating system, and what is your computer's operating system. Where is the movie? Did you enclose it in the standalone?

Lot of questions.

Kind reagards

Bernd

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 2:03 am

There's no code for the player. All I did is drag it into the card and set the path using 'property inspector'. Please see attached image. Path is set to C:/Users/desktop/project/ChoongYangJin/... I have a file exactly the same at the other computer. Both computers are running MS vista business.
The problem is that on the other computer, the player on the card is not even there. It is just an empty box. Both computers are set to use quicktime as the default player.

Thanks
PMC

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 5:47 am

attached is the image. FYI, once I clicked on the radio button "Balance" on card "Frequent Pair Letters", it will open card "Balance" from Stack "Movies". The "stop"and "play" button is to stop and play the movie, obviously, and "close"is to close the card.
Do I need to link the QuickTime player to the Player object itself?
What would be a better way to play movies?
Thanks
Attachments
Capture.GIF
Capture.GIF (95.92 KiB) Viewed 9320 times

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 6:08 am

OK...I got it, the link was wrong. Another question....the card seems to load very slow....how to I make it load faster?
I have a code on the "Movies" stack:

on preopenStack
load "OTVersion 7.6.9"
end preopenStack

It is still taking 4-5 seconds to load.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: video

Post by bn » Fri Mar 18, 2011 9:29 am

Hi PMC,

if you put in an openstack handler

Code: Select all

get qtVersion()
this will load Quicktime at the start. See the dictionary.

from the dictionary
Tip: It can take LiveCode a second or two to load the code needed to use QuickTime, depending on the machine speed. Since this code is only loaded into memory once per session, you can speed up the first occurrence of a QuickTime-related action by calling the qtVersion function during otherwise dead time--for example, during startup of your application--to preload the code.
this should speed up the time it takes to play a video. That should be almost instantaneous.

Kind regards

Bernd

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 1:26 pm

On which card should I put this code into? The main stack card or the movies stack card?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: video

Post by bn » Fri Mar 18, 2011 1:31 pm

Hi PMC,

since you want it to happen when the stack starts I would put it into a openstack handler in the stack script of the first stack that opens. It just makes shure that QT is loaded. It needs to do it only once. It loads Quicktime on the host machine.

Kind regards

Bernd

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: video

Post by Klaus » Fri Mar 18, 2011 1:37 pm

Hi Choong,

Code: Select all

on preopenStack
   load "OTVersion 7.6.9"
end preopenStack
Please do yourself a favour and look up everything in the docs/Rev Dictionary
if you are not sure what it means!

-> "load" will load something from the internet!
So your handler will try to load the internet url "OTVersion 7.6.9" which does not exist of course!

-> "qtversion" is a function, that will return the currently installed version of QuickTime!
You cannot load a specific version of QuickTime, you must use what is present! :-)

So put this somewehre in the "openstack" handler of your mainstack:
...
get qtversion()
...

Best

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 1:51 pm

I use the code on the "splash stack" but QT still load very slow.

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 2:02 pm

Sorry, I code it as

get QTVersion()

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Fri Mar 18, 2011 2:18 pm

Can we put a slider to control the volume? Adjusting the volume with the player default slider is impossible.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: video

Post by Klaus » Fri Mar 18, 2011 6:58 pm

Hi Choong,

I just made a quick test on Windows XP and I had no problems with
loading time and controlling the volume with the QuickTime controller.

What format is your movie?


Best

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: video

Post by pmc » Sat Mar 19, 2011 2:27 am

The format is mpeg 1. Actually, originally they are .flv format ripped from youtube. I use a converter to convert them to mpeg1 as these are the files that can be play on QT.
The slider blinks when clicked on and it's impossible to grab the knob of the slider.
Thanks

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: video

Post by Klaus » Sat Mar 19, 2011 12:41 pm

Hi Choong,

no problem here with an MPEG 1 video file!
Can you send me your stack and I will take a look?


Best

Klaus

Post Reply