Video files

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
dalkin
Posts: 176
Joined: Wed Jul 04, 2007 2:32 am
Location: Blackheath, Australia
Contact:

Video files

Post by dalkin » Thu Jul 05, 2007 6:52 am

As part of a standalone app, I want to play a 48 minute QT video file. By using a referenced move, the controller shows up during development and the movie plays fine, allowing users to control the action with a slider, which is useful over 48 minutes to quickly go to a specific part of the movie.

The problem is though, when building the standalone app, the referenced file doesn't play because there is no provision to embed the path to the movie. The path to the referenced movie, used during development, can't be specified during the build, even though non-stack files (ie. the movie) can be added during the build dialogue.

By embedding the movie into the stack, no controller is visible (known issue), the only options being to create buttons that pause and resume playing, not go to specific points in the movie. Embedding the movie is therefore not a realistic option.

Is there a workaround for this?

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

Post by Klaus » Thu Jul 05, 2007 11:53 am

Hi dalkin,

the solution: Use a relative pathname for your video!

Example:

You have your standalone in a folder "Standalone folder" and in there is another folder named "Video" or whatever which contains your video file.

Then you can use the relative (to the current folder!) pathname:
"Video/your_video.mov" for the filename of the necessary player which is always correct as long as the video is in that subfolder "Video"!

I would a nice function to always get the correct path in your standalone.

To set the correct path for you player object:

...
set the filename of player "xyz" to standalone_folder() & "Video/your_video.mov"
...

function standalone_folder
put the filename of this stack into I_am_here
set itemdel to "/"
delete item -1 of I_am_here
put "/" after I_am_here
return I_am_here
end standalone_folder

On OS X systems the syntax is a bit different, but only if you put the subfolder "Video" somewhere inside the application package.


Best

Klaus

dalkin
Posts: 176
Joined: Wed Jul 04, 2007 2:32 am
Location: Blackheath, Australia
Contact:

Post by dalkin » Fri Jul 06, 2007 7:18 am

Hmm, I think I can do that. Many thanks Klaus.

Post Reply

Return to “Multimedia”