LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-27-2018, 06:54 AM   #1
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Rep: Reputation: 16
how to scale image size in full screen mode on youtube.


Hi all,

Since I only have a small, 11 inch display, I need to get the best out of it.

With some youtube content, (eg CNN live stream) the video is now being displayed as a small inset on a non relevant background. In full screen mode the content of interest occupies at most half the screen area.

I have been trying to work around this by using xrandr to scale and shift the output so that the actual picture would occupy the whole screen.

A command like:

xrandr --output eDP-1 -- transform .6,0,0,0,.6,0,0,0,1

works to blow up the screen image in normal mode, but after clicking the "full screen" button, the image on the screen is the same as it was before.

It seems that the full screen mode is mapping whatever is in the video window onto whatever the physical screen is, regardless of the applied transformation.

Is there a command that will modify (scale and shift) what is displayed on the screen when youtube is in full screen mode so that a designated rectangular area can be scaled up to occupy the whole screen?

Many thanks in advance.

Andrew.
 
Old 01-27-2018, 07:19 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,018
Blog Entries: 5

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
This page - https://ubuntuforums.org/showthread.php?t=1409491 - suggests that a combination of compiz and the compiz ezoom plugin might do the trick.
 
Old 01-27-2018, 07:44 AM   #3
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
Hi hydruga,

Thanks for that. I have a few doubts/questions (Will it chew too much CPU? Will it operate in the "windowless" full screen mode?), but I better look into your suggestion a bit more first.

Andrew.
 
Old 01-28-2018, 01:00 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
You could just download the video and view it in a player.
 
Old 01-28-2018, 02:17 AM   #5
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
Hi Awesome machine,

This is only an issue on live streams. But, as a separate matter, I would certainly like to be able to download youtube content sometimes, rather than having to stream it. Didn't know that was possible? I'm aware of a website where you can download basically any music .mp3 that's on the main YT site, but is there some option for video too?

Cheers.....

Andrew.
 
Old 01-28-2018, 02:23 AM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,313
Blog Entries: 11

Rep: Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283Reputation: 3283
Get youtube-dl and it is simple to download any video from youtube.

Run youtube-dl --help to see all options, but unless you want to specify size or quality you can simply find the youtube URL of the video you want to grab and do something like this:

Code:
youtube-dl -oMarley_Three_Little_Birds.mp4 https://www.youtube.com/watch?v=zaGUr6wzyT8
...where -o assigns a local file name.

Then play in your player of choice.
 
Old 01-28-2018, 05:46 AM   #7
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
NICE!!
 
Old 01-28-2018, 06:07 AM   #8
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
And looking att the documentation:

youtube-dl -o - "https://www.youtube.com/watch?v=BaW_jenozKcj" | vlc -

It seems it can stream directly to my favourite media player. I then just transform the screen with xrandr and all should be fixed. Will report back.

Cheers.....

Andrew.
 
Old 01-28-2018, 06:43 AM   #9
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
Okay,

This is (almost) working:

youtube-dl -f 92 -o - "https://www.youtube.com/watch?v=9wr1SoGQCWM" | vlc -

The main problem is that I'm in Tanzania at the moment and it's kind of breaking the local mobile network. Specifically, around 200KB/sec are being downloaded to get the video running in vlc. Even if it worked, it would cost too much like that.

Usually, with youtube, I get good enough results by selecting a format (240 or 360) that's running on about 25 KB/sec. The network can do that and the cost is very reasonable.

I saw that youtube-dl defaults to the best quality available, which is why I added the -f 92 at the front of the command above. However, it did not make any difference. The result is that the video runs for a few seconds then falls over for 30 seconds then I get a bit more and so on.

I suppose I am missing something about the format option, but I can't see what it is. Any ideas?


Cheers....

Andrew.
 
Old 01-28-2018, 08:30 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 13,229
Blog Entries: 9

Rep: Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617Reputation: 3617
aal, i think your original issue requires some information:

- are you using flash or html5 to view the videos?
- what GPU and driver do you use?

for the latter:
Code:
lspci -k | grep -iEA5 'vga|3d|display'
 
Old 01-28-2018, 09:52 AM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,336

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
This is the command I use to get a 1311x768 scaled screen on my netbook with a native 1024x600 screen.
Code:
xrandr --fb 1311x768 --output LVDS1 --mode 1024x600 --panning 1311x768 --scale 1.28x1.28
and this is the command I use to revert.
Code:
xrandr --fb 1024x600 --output LVDS1 --mode 1024x600 --panning 0x0 --scale 1x1
I see no problems with youtube.
I also use a 1280x1024 panned display.
Code:
xrandr --fb 1280x1024 --output LVDS1 --mode 1024x600 --panning 1280x1024 --scale 1x1
 
Old 01-28-2018, 10:08 AM   #12
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
Hi Ondoho,

I am not using flash. Don't know about html5, but it is firefox rev 52.5.2. As for the GPU, better to just give the output of suggested command:

andrew@debian:~$ lspci -k | grep -iEA5 'vga|3D|display'

00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21)
Subsystem: Dell Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller
Kernel driver in use: i915
Kernel modules: i915
00:0b.0 Signal processing controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller (rev 21)
Subsystem: Dell Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller
andrew@debian:~$

Thanks in advance for all insights!

Andrew.
 
Old 01-28-2018, 08:47 PM   #13
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,511

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
Video DownloadHelper

Quote:
Originally Posted by aal View Post
Hi Awesome machine,

This is only an issue on live streams. But, as a separate matter, I would certainly like to be able to download youtube content sometimes, rather than having to stream it. Didn't know that was possible? I'm aware of a website where you can download basically any music .mp3 that's on the main YT site, but is there some option for video too?

Cheers.....

Andrew.
I use video downloadhelper add-on for firefox.
 
Old 01-29-2018, 12:35 AM   #14
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
Hi allend,

Quote:
This is the command I use to get a 1311x768 scaled screen on my netbook with a native 1024x600 screen.
Code:

xrandr --fb 1311x768 --output LVDS1 --mode 1024x600 --panning 1311x768 --scale 1.28x1.28
Thanks. This style of xrandr command does work in full screen mode. I wish I understood why, but I can now play with modes and scales to get the result that I want.

Cheers...

Andrew.
 
Old 01-29-2018, 01:46 AM   #15
aal
Member
 
Registered: Jul 2006
Location: Qld
Distribution: Debian sid, Ubuntu
Posts: 205

Original Poster
Rep: Reputation: 16
Hi all,

I think this is now solved, although I have only done it for a pre-recorded video and so I still have to find a live stream with the content in a box, but there is no reason I know of why it should not work.

xrandr --fb 1981x1114 --output eDP-1 --mode 1366x768 --panning 1981x1114 --scale 1.4x1.4

is what made the most sense for the particular content (AM joy). Different content streams have different box sizes, so this is the process I ended up following to design the command:

1. choose output mode as the best mode available on the physical screen, 1366x768 here.
2. choose scale factor needed to get the inset box up to the full screen size. 1.4 here.
3. choose frame buffer (and panning) slightly larger than the product of output mode and scale factor.

The only tiny glitch is that a scale factor 1.45 should work with that fb size but it did not. 1.45x1366=1980.7 , 1.45x766=1110.7. There was no error and I fail to understand why.

Thanks allend and to all who responded. I've learned a lot on this.

Will mark thread solved once I confirm with live stream working.

Cheers.....

Andrew.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Youtube says full screen is unavailable. stf92 General 9 12-20-2016 01:26 PM
YouTube full screen not working in latest Chrome v 23 pbradaric Linux - Software 3 11-26-2012 06:20 AM
Slackware current goes to KDE login screen when I Esc from full-screen youtube videos Robert.Thompson Slackware 2 04-11-2011 05:43 PM
[SOLVED] xsane reduces size of image of scanned page - how to get back to full size? taylorkh Linux - Software 7 11-12-2010 05:37 PM
scale to full paper size in kpdf printing Snigger Linux - General 0 05-05-2010 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration