Play Video

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

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

Re: Play Video

Post by Klaus » Wed Nov 21, 2018 7:17 pm

FourthWorld wrote:
Wed Nov 21, 2018 6:45 pm
Klaus wrote:
Wed Nov 21, 2018 12:16 pm
Just repeated the test, but put the video into a folder named "VideoFolder", changed the buttons script to:

Code: Select all

on mouseUp 
   set the filename of player 1 to (specialfolderpath("resources") & "/VideoFolder/testvideo.mp4")
end mouseUp 
And it also worked as advertized.
Now try that on Linux. ;)
Why should I? I don't run or need Linux.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6210
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Play Video

Post by FourthWorld » Wed Nov 21, 2018 9:12 pm

Klaus wrote:
Wed Nov 21, 2018 7:17 pm
FourthWorld wrote:
Wed Nov 21, 2018 6:45 pm
Klaus wrote:
Wed Nov 21, 2018 12:16 pm
Just repeated the test, but put the video into a folder named "VideoFolder", changed the buttons script to:

Code: Select all

on mouseUp 
   set the filename of player 1 to (specialfolderpath("resources") & "/VideoFolder/testvideo.mp4")
end mouseUp 
And it also worked as advertized.
Now try that on Linux. ;)
Why should I? I don't run or need Linux.
The smiley face indicates that the post is not too be taken too seriously.

It's just my ongoing envy with LiveCoders to can be content with only two of the three desktop platforms LiveCode supports, as video stopped working in LiveCode on Linux about the time it became robustly reliable in all the other apps I use there.

Carry on....
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 2373
Joined: Sat Feb 25, 2017 10:45 pm

Re: Play Video

Post by bogs » Wed Nov 21, 2018 10:46 pm

FourthWorld wrote:
Wed Nov 21, 2018 9:12 pm
...as video stopped working in LiveCode on Linux about the time it became robustly reliable in all the other apps I use there.
I think for 'nix (provided your using a distro the latest Lc works on) you just need mplayer, but I could be off on that since the last fully working edition here was 8.0.1.

Having re-read that, it might come off as sounding bitter, but take it for what it says instead, as I don't actively use any editions past 6.6x for coding, and won't be switching up anytime soon.
Image

chelling
Posts: 95
Joined: Tue Mar 06, 2007 3:14 am

Re: Play Video

Post by chelling » Fri Nov 23, 2018 6:49 pm

I think I have the codec issue working. I was staying in development mode and issuing the play command from the message box. Once I change to run mode, it was fine.

I did have "specialfolderpath("resources") & "/VideoFolder/<video name>")" originally, but ran into problems. I will check it again. It works perfectly in Mac. I am porting this to iOS and not have any issues at all.

I also copied the VideoFolder to the Copy Files pane of the standalone settings. Just to clarify, when I do this, is the resource folder automatically created? On the Mac side, I can see the resource folder with the VideoFolder folder containing all the videos. Does this somehow happen on Windows builds? If so, does that mean that the app is no longer dependent on having VideoFolder in the same folder as the .exe?

Also, two additional issues in Windows...Transitions are not always working, and there are intermittent screen flashes. The videos are full screen. Could that the problem? The screen flashes could have implications for persons with seizure disorders. Does anyone have any input?

Thanks again for everyone's input and help. @FourthWorld if I could move this to any platform other than Windows I would in an instant :)

chelling
Posts: 95
Joined: Tue Mar 06, 2007 3:14 am

Re: Play Video

Post by chelling » Sat Nov 24, 2018 1:46 am

I don't think there is anything I will be able to do about the screen flashes; apparently visual effects don't have any effect on player objects and buffering no longer is a work-around to prevent screen flickers. The last thing.... under Windows 10, the videos stop within a second or two of starting. There is no play stop message being sent. Any ideas? Ironically, it only happens with mouse input. If I select the scanning option (used for persons who are not able to use their hands) the videos play through as expected.

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

Re: Play Video

Post by Klaus » Sat Nov 24, 2018 11:02 am

Hi chelling,

1. on Windows, there is no folder "resources" being created by the standalone builder.
You will end with everything in the folder that contains the EXE file, which of course a bit confusing.
See my screenshot in an earlier post. Or look at your hd after creating the standalone. 8)

2. If you add your "VideoFolder" then you will find it in the folder with the EXE file after creating the standalone.
To make this work:
...
put specialfolderpath("resources") & "/VideoFolder/video.mp4" into tVideoFile
set the filename of player XYZ to tVideoFile
...
You need of course the folder "VideoFolder"!

3. specialfolderpath("resources") will point to that folder with the EXE file on Windows although there is in fact no folder named "resources". This is just a parameter to the specialfolderpath codes!.
On the Mac this is another story.

4. How did you script your visual effects for the player objects?
Usually they do not work with players, as you have experienced.


Best

Klaus

Post Reply

Return to “Windows”