4

I watch most of my TV news on my computer. The videos are downloaded by my RSS reader and stored on disk until I decide to watch them.

The files look like this:

130704_hjo_446k_p20v11.mp4
130706_hjo_446k_p20v11.mp4
130708_hjo_446k_p20v11.mp4

The thing is I don't watch them daily, but whenever I feel like it. So sometimes I watch one sometimes three in a row.I watch them normally with mplayer2 by executing the following:

mplayer *hjo*.mp4

My problem is I always forget to delete the already watched files and then I have to remember when I last watched or I have to rewatch until I find the new files.

Now I am looking for a script or program which marks the completely watched files. As far as I know mplayer2 can't do this, since there is no hook to check if the video was watched to the end.

slm
  • 363,520
  • 117
  • 767
  • 871
Raphael Ahrens
  • 9,701
  • 5
  • 37
  • 52
  • As variant: `for file in *hjo*.mp4; do mplayer $file && rm -f $file; done` – Eddy_Em Jul 10 '13 at 05:47
  • As an option you can use `rm -i` to get user confirmation before deletion. – rush Jul 10 '13 at 05:49
  • 1
    The problem is when I need to stop watching and quit mplayer the exit code is also 0 and since sometimes I have 3 hours or more of news I want to be able to quit watching. – Raphael Ahrens Jul 10 '13 at 05:58

1 Answers1

5

You might want to install the package mplayer-resumer. This will allow you to resume a video from where you left off. When you're done watching the videos using this wrapper script, you can then safely delete them.

$ mplayer-resumer options path/to/file

excerpt from main site on rationale

Watching 90 % of a video and stopping causes you to return to the beginning again the next time you watch it. Remembering where you were in the video and resuming at that position is a much nicer behavior for the user. By default, mplayer spits out timecode information that tells you where you are in the video, to the tenth of a second. Mplayer also supports a seek feature on the command-line. We can make use of these features to write an mplayer wrapper that will remember the last position in a video file and resume to it on playback.

slm
  • 363,520
  • 117
  • 767
  • 871