0

I have a script that plays a local video continuously file using mplayer on fullscreen using this command:

mplayer -loop 0 -fs /path/to/movie.mp4

However, movie.mp4 is being downloaded from my webserver when its not available. The movie on my server is going to change every now and then, so I want to compare the size of my video with the video on the webserver. Now that is not a problem, and I have that script already.

What I want is, when there is a new video, that it downloads and removes the old one (got this working), and then replays that video using the same mplayer command.

How would I do this?

Arko Elsenaar
  • 1,689
  • 3
  • 18
  • 33

1 Answers1

0

I need to have mplayer work constantly, and then playing a new video when it is available. I can't think of a way myself to have this go smooth

Downloading the new video to a temporary file and mv temporary /path/to/movie.mp4 should play the new video as soon as the current play is finished.
See also: Is it possible to delete an MP3 file currently played in mplayer?

Community
  • 1
  • 1
Armali
  • 18,255
  • 14
  • 57
  • 171