Pre: Optional
Download your movie to have an offline solution. youtube-dl
is one of several tools which allow downloading videos from Youtube.
Example:
youtube -t https://www.youtube.com/watch?v=FCp1_XQbiwc
Package requirements:
youtube-dl
Main Task - Bash-Script
Create a new textfile fire.sh
, make it executable via chmod +x fire.sh
and insert the following
#!/bin/bash
#
# offline version:
MOVIE_PATH="${HOME}/path/to/local/youtube/movie.extension"
#
# online version:
#MOVIE_PATH="https://www.youtube.com/watch?v=FCp1_XQbiwc"
#
# start video using vlc
/usr/bin/vlc --loop --fullscreen "$MOVIE_PATH"
Package requirements:
vlc
Keep in mind:
- There is no real need in moving this commandline call to a script,
while i stilll prefer it as you might want to pimp it overtime (.i.e.
picking a random clip from a selection or whatever else).
vlc
should be replaceable with mplayer
for example, while you would need to check the needed parameters for loop and fullscreen.
Post: Optional
In case you really need or want a dash icon to start this script consider checking out the package alacarte
- while double-clicking the fire.sh
in your fileexplorer (assuming nautilus) should offer an execute dialog as well.
--loop
and--fullscreen
as commandline parameters which could be handy for a script. – dufte Dec 20 '16 at 14:05