Use screen
to play it in the background
- Fork screen process and detach it and enjoy the borderless video
- OR run the video player and keep the terminal window open
- Let it play and monitor the progress :)
I was looking for borderless youtube video player and didn't find anything that worked on linux.
- some suggested to use VLC and tweak the WM to remove the border. I tried it but didn't work for me.
- compiz doesn't seem to work with application window border so well.
I already knew about the mplayer and also I already knew about the youtube-dl. After thinking and playing around for a while with mplayer settings I got the borderless video. I just had to tweak around the settings that worked for me. The size of video window and the display settings. After I found the settings that worked for me, the remaining thing was to pull the videos from youtube and play it in the desktop :)
application | usage |
---|---|
youtube-dl | downloads the youtube videos and lets you stream directly from stdin |
mplayer | play the borderless video |
jq | used to parse the json, and extract youtube video links |
$ sudo apt install -y jq mplayer youtube-dl
$ git clone git@github.com:samundra/youtube-player.git
$ cd youtube-player
$ chmod +x youtubeplayer.sh
$ ./youtubeplayer.sh {youtube-playlist-link}
$ ./youtubeplayer.sh 'https://www.youtube.com/watch?v=AnBQXaC1ulQ&list=PL51x_HtQrp9Fei1JgRHdBz4DG2ARkNlT0'
$ ./youtubeplayer.sh 'https://www.youtube.com/watch?v=tLyw7jytykE'
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing -.
Reading from stdin...
libavformat version 56.40.101 (external)
[youtube] tLyw7jytykE: Downloading webpage
[youtube] tLyw7jytykE: Downloading video info webpage
[youtube] tLyw7jytykE: Extracting video information
[youtube] tLyw7jytykE: Downloading MPD manifest
[download] Destination: -
[download] 0.1% of 12.22MiB at 4.91MiB/s ETA 00:02libavformat file format detected.
[download] 1.0% of 12.22MiB at 1.75MiB/s ETA 00:06[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f0d97902d80]Protocol name not provided, cannot determine if input is local or a network protocol, buffers and access patterns cannot be configured optimally without knowing the protocol
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO: [H264] 640x360 24bpp 25.000 fps 544.0 kbps (66.4 kbyte/s)
Clip info:
major_brand: mp42
minor_version: 0
compatible_brands: isommp42
creation_time: 2015-04-07 05:35:39
Load subtitles in ./
Opening video filter: [scale w=320 h=240]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 96.0 kbit/3.40% (ratio: 12002->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
...
...
... will keep going on while video is still playing
Sit back and enjoy the video.
- There are two ways you can exit the current video.
- Click on the currently playing video window then hit
q
OR - Terminate the script by hitting
Ctrl + C
on the terminal where it was executed.
- The video window is mplayer window. That means, you can click on it and the use the shortcuts that you use in mplayer.
Shortcuts | What it does |
---|---|
q | quit the currently playing video, as soon as the current video finishes the next on the playlist will start to play automatically |
space | Pause the video |
shift + T | Enable/Disable Stick on Top option |
m | Mute the video |
- Display title of the currently playing video
- When current video is finished and it starts to play next video, it steals focus to itself, which is annoying when we are focused on doing other tasks.
- Please feel free to
fork it
make changes to your heart's content when you are happy send a PR to this repository. - Please send PR against
develop
branch. Themaster
branch will always remain stable and safe to use. - It's a bash script, so there's no specific guidelines other than the bash script guidelines.