Video on Windows
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Video on Windows
Hi Everyone,
I have an issue with a cross platform program being developed on a Mac.
I know this has been covered already but I was wanting to find the best solution to getting video to play on Windows. The file type I'm using is mpeg1.
My program has 6 videos being called using the Media Player. I read the documentation and put the dontuseQT command before the videos come in. However, all I get is a black screen and nothing playing. Windows is obviously recognising a video file and putting it in the right place but just not playing it.
I don't want to use Quicktime Alternative simply because I don't want the people using the program to install anything if I can help it.
Would using the AVI format make any difference? I'm thinking not since mpeg1 is Windows friendly enough.
Is my only option to put a link for the user to download Quicktime for Windows?
Thanks
I have an issue with a cross platform program being developed on a Mac.
I know this has been covered already but I was wanting to find the best solution to getting video to play on Windows. The file type I'm using is mpeg1.
My program has 6 videos being called using the Media Player. I read the documentation and put the dontuseQT command before the videos come in. However, all I get is a black screen and nothing playing. Windows is obviously recognising a video file and putting it in the right place but just not playing it.
I don't want to use Quicktime Alternative simply because I don't want the people using the program to install anything if I can help it.
Would using the AVI format make any difference? I'm thinking not since mpeg1 is Windows friendly enough.
Is my only option to put a link for the user to download Quicktime for Windows?
Thanks
Hi Klaus
No I'm not using that script. I'm using 'set the fileName of last player to..'
(I set the location of my mpg into the variable myPath)
set the fileName of last player to myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
end if
This works fine on a mac or Windows machine with Quicktime but not without Quicktime. Is this the wrong script?
Thanks
No I'm not using that script. I'm using 'set the fileName of last player to..'
(I set the location of my mpg into the variable myPath)
set the fileName of last player to myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
end if
This works fine on a mac or Windows machine with Quicktime but not without Quicktime. Is this the wrong script?
Thanks
Hi Stormy1,
you should "set the dontUseQT to true" as early as possible!
In the "preopenstack" handler preferrably, since once QT has been loaded (or any attempt to do so) you cannot get rid of it again until you restart your app!
So maybe this line "set the filename of player ..." in your script already loads QT and then you cannot go back some lines later!
Please try to set this in the "preopenstack" handler and see if that works.
BTW, you should check if a file exists BEFORE you set e.g. the filename of a player to that non existing file
Best
Klaus
you should "set the dontUseQT to true" as early as possible!
In the "preopenstack" handler preferrably, since once QT has been loaded (or any attempt to do so) you cannot get rid of it again until you restart your app!
So maybe this line "set the filename of player ..." in your script already loads QT and then you cannot go back some lines later!
Code: Select all
...
set the fileName of last player to myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
## Too late, QT already loaded and "sticking"!
if the platform is "Win32" then set the dontUseQT to true
...
BTW, you should check if a file exists BEFORE you set e.g. the filename of a player to that non existing file

Code: Select all
...
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
set the fileName of last player to myPath
...
Klaus
Hi Klaus
Thanks for your advice.
I set the preOpenStack handler but nothing changed. This is my script in the stack script:
on preOpenStack
set the loc of this stack to the screenLoc
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
pass preOpenStack
end preOpenStack
I still get the black screen as if something has loaded but nothing plays.
Should I use the 'play vc' command instead? Would that make a difference?
Thanks for your advice.
I set the preOpenStack handler but nothing changed. This is my script in the stack script:
on preOpenStack
set the loc of this stack to the screenLoc
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
pass preOpenStack
end preOpenStack
I still get the black screen as if something has loaded but nothing plays.
Should I use the 'play vc' command instead? Would that make a difference?
Hi stormy1,
No idea otherwise.
Best
Klaus
OK, looks good.Stormy1 wrote:Hi Klaus
Thanks for your advice.
I set the preOpenStack handler but nothing changed. This is my script in the stack script:
on preOpenStack
set the loc of this stack to the screenLoc
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
pass preOpenStack
end preOpenStack
Sure, at least check if that makes a difference!Stormy1 wrote:I still get the black screen as if something has loaded but nothing plays.
Should I use the 'play vc' command instead? Would that make a difference?
No idea otherwise.
Best
Klaus
Hi Klaus
Got myself a new problem now. How to stop the videos playing!!
At the moment, the user selects from a dropdown menu of 6 clips. Each time they select a new clip, it updates the player and plays the selected clip. Heres my script for one of the 6 videos:
on menuPick pItemName
switch pItemName
case "blah blah blah"
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
set the itemDel to slash
put item 1 to -2 of the effective filename of this stack into myPath
put "blah blah blah" after myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
play videoClip myPath at 449,317
end if
break
However, I now can't stop the videoClip or the player. In other words, when you make a new selection, it plays over the last clip and flickers. I have tried 'stop player "name of player", plus 'stop playing videoClip myPath' and neither work.
I tried to put a button on the page which simply had the 'stop player "name of player" and that didn't work either!
Am I missing something?
Got myself a new problem now. How to stop the videos playing!!
At the moment, the user selects from a dropdown menu of 6 clips. Each time they select a new clip, it updates the player and plays the selected clip. Heres my script for one of the 6 videos:
on menuPick pItemName
switch pItemName
case "blah blah blah"
if the platform is "Win32" then set the dontUseQT to true
if the platform is "Win64" then set the dontUseQT to true
set the itemDel to slash
put item 1 to -2 of the effective filename of this stack into myPath
put "blah blah blah" after myPath
if not (there is a file myPath) then
beep
answer error "Can't find file" && myPath
else
play videoClip myPath at 449,317
end if
break
However, I now can't stop the videoClip or the player. In other words, when you make a new selection, it plays over the last clip and flickers. I have tried 'stop player "name of player", plus 'stop playing videoClip myPath' and neither work.
I tried to put a button on the page which simply had the 'stop player "name of player" and that didn't work either!
Am I missing something?
Stormy1,
you can test whether the clip is still playing:if you issue a play pause command you can resume the movie or another play command.
If you issue a play stop command the movie dissapears.
regards
Bernd
you can test whether the clip is still playing:
Code: Select all
on mouseUp
if the movie is not done then
play stop videoclip myPathToVideoClip
-- play pause videoclip myPathToVideoClip
end if
end mouseUp
If you issue a play stop command the movie dissapears.
regards
Bernd
Hi C.
"play vc ..." uses a slightly different sayntax
Check the Rev Dicitonary for "play" for more info about controlling audio- and video clips started with "play"!
play stop...
play pause...
play resume...
play step...
Best
Klaus
"play vc ..." uses a slightly different sayntax

Code: Select all
...
on menuPick pItemName
play stop vc
## Wil stop any playing videoclip stated withj "play vc xyz"!
...
play stop...
play pause...
play resume...
play step...
Best
Klaus