The question is completely formulated in the title.

However, to make it more presize, I am making presentations for lectures. The presentations are done in Mma. I have some illustrative material to show in a form of movies (avi and gif). It is possible to remove Mma from the screen, open a file with the movies and play one. I would like, however, to be able to call a movie from Mma just for the sake of speed. In addition it is aestetically better.

I tried to embed a hyperlink into the presentation notebook to call the movie file. This does not work. It opens an empty notebook with the title of the movie-file in question, and after a rather long waiting the notebook becomes filled by some symbols. Evidently, it opens the file rather than plays it.

So, can I do anything?

  • $\begingroup$ I don't think you can include most movies, so the best solution might be what Yves said. But if the movie is simple (like most animated gifs), it's not high resolution, it has a low framerate, and not too many frames, then you can use ListAnimate with the list of its frames to include it directly. The notebook size will increase quite quickly with the number of frames though. $\endgroup$ – Szabolcs Mar 16 '14 at 16:35
  • $\begingroup$ @Szabolcs I think my movies satisfy the conditions you formulated. I succeeded to run it using the way offered by Yves. Could you please kindly show, how you can do it by ListAnimate, given the movie is external and I have no access to its creation or format. $\endgroup$ – Alexei Boulbitch Mar 16 '14 at 17:10
  • 2
    $\begingroup$ You can include movies like I did in this example: Style[Dynamic[Refresh[Import["http://pages.uoregon.edu/noeckel/computernotes/StopMotion.mov", "Animation"], None]], DynamicEvaluationTimeout -> 60] which is from this answer. $\endgroup$ – Jens Mar 16 '14 at 17:11
  • $\begingroup$ @AlexeiBoulbitch Jens's solution is better. Did you manage to get it to work according to his suggestion? $\endgroup$ – Szabolcs Mar 16 '14 at 17:32

You can use SystemOpen to open the link with system-wide standard browser/application:


You can also use it to open files stored on the local hard drive using the default applications (i.e. the default movie player for movie files).

E.g. in conjunction with Button:

Button["Chicken", SystemOpen["https://www.youtube.com/watch?v=yL_-1d9OSdk"], 
   BaseStyle -> "Hyperlink", Appearance -> "Frameless"]

Mathematica graphics

| improve this answer | |
  • $\begingroup$ I edited this a bit, hope you don't mind. $\endgroup$ – Szabolcs Mar 16 '14 at 16:26
  • $\begingroup$ @Szabolcs thanks! Was editing (more chicken!), too, but no harm done :D $\endgroup$ – Yves Klett Mar 16 '14 at 16:27
  • $\begingroup$ My parrot is only stable against rotations but not translations (even though she does have a long neck). $\endgroup$ – Szabolcs Mar 16 '14 at 16:29
  • $\begingroup$ @Szabolcs hehe - I just changed the link to something non-commercial, yet still sufficiently poultry. But the gyro spot is still great. Parrots can fly, perhaps relevant? $\endgroup$ – Yves Klett Mar 16 '14 at 16:31
  • 2
    $\begingroup$ conbtinuation: ´Button["Play", SystemOpen[NotebookDirectory[] <> "filename.avi"]]´ $\endgroup$ – Alexei Boulbitch Mar 16 '14 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.