
I want to play videos in the center of my screen. I don't want to run them full-screen because for some videos that takes too much CPU time and gets video and audio out of sync and for some other videos the resolution isn't high enough (anything scaled up by more than a factor of 2 looks bad). There are mplayer options for putting the window at a specific position, this would be fine if I had many videos with the same resolution. But I want to play arbitrary resolution videos in the center of the screen. Any ideas on how to do this? -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

On Wed, 29 Feb 2012 22:25:38 +1100, Russell Coker <russell@coker.com.au> wrote:
I want to play videos in the center of my screen. I don't want to run them full-screen because for some videos that takes too much CPU time and gets video and audio out of sync and for some other videos the resolution isn't high enough (anything scaled up by more than a factor of 2 looks bad).
mplayer -geometry 50%:50% video.ogv regards, Glenn -- pool.sks-keyservers.net 0xb1e82ec9228ac090

On Thu, 1 Mar 2012, "Glenn McIntosh" <neonsignal@memepress.org> wrote:
mplayer -geometry 50%:50% video.ogv
Thanks, that works. On Thu, 1 Mar 2012, Robin Humble <robin.humble@anu.edu.au> wrote:
On Wed, Feb 29, 2012 at 10:25:38PM +1100, Russell Coker wrote:
full-screen because for some videos that takes too much CPU time and gets
odd. generally doesn't need much grunt to do full screen. maybe you need a better video card? an old-ish intel g35 with a Q6600 works well via hdmi to my tv.
01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450] Above is the relevant lspci output. When using the built-in Intel video controller I didn't have any performance problems in that regard but I was limited to an X resolution of 2048.
video and audio out of sync and for some other videos the resolution isn't
the latest addition to my ever growing mplayer alias is -autosync 30 which does a pretty good job of keeping audio and video in sync.
this wasn't needed with a previous kernel/x/mplayer version, but for some reason I insist on doing 'yum upgrade' and breaking things :) if it's your video that's slow, you could also try -framedrop
Video is the problem so I'll try -framedrop. Thanks for the suggestion. On Thu, 1 Mar 2012, Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
Seriously? Hardware acceleration for rescaling of video (ie. upsampling so you can display it full-screen) has been supported in X and mplayer for a very, very long time.
I also note that even a low-spec, first-gen core 2 duo from 2006 can play back 1920x1080 h264 video (just); so can the slowest Celeron (E1200) from that era. I know because my last media PC had one.
I've had discussions on this list on similar topics on more than a few occasions, dating back to when a P4-1.5GHz was a reasonably powerful system. It seems that every time I test such things I find that Intel video controllers give better results which is apparently due to having better driver support for scaling. Such discussions usually end up with several people trying to convince me that I should buy better hardware in spite of the fact that my system is mainly used for xterms, email, and web browsing. With playing video being the only task that taxes the display system. I can cope with a small video window centered in my large monitor. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

On 01/03/12 13:09, Russell Coker wrote:
On Thu, 1 Mar 2012, "Glenn McIntosh"<neonsignal@memepress.org> wrote:
mplayer -geometry 50%:50% video.ogv
Thanks, that works.
On Thu, 1 Mar 2012, Robin Humble<robin.humble@anu.edu.au> wrote:
On Wed, Feb 29, 2012 at 10:25:38PM +1100, Russell Coker wrote:
full-screen because for some videos that takes too much CPU time and gets
odd. generally doesn't need much grunt to do full screen. maybe you need a better video card? an old-ish intel g35 with a Q6600 works well via hdmi to my tv.
01:00.0 VGA compatible controller: ATI Technologies Inc Cedar PRO [Radeon HD 5450]
Above is the relevant lspci output. When using the built-in Intel video controller I didn't have any performance problems in that regard but I was limited to an X resolution of 2048.
The Radeon HD 5450 is a modern GPU - it definitely supports hardware decoding of all the common formats, as well as the previously-mentioned hardware image scaling - and you can get it to do hardware filtering to improve the video as well. You want to Google for "VAAPI" and "XvBA" to learn how to enable that on your Linux system.
video and audio out of sync and for some other videos the resolution isn't
the latest addition to my ever growing mplayer alias is -autosync 30 which does a pretty good job of keeping audio and video in sync.
this wasn't needed with a previous kernel/x/mplayer version, but for some reason I insist on doing 'yum upgrade' and breaking things :) if it's your video that's slow, you could also try -framedrop
Video is the problem so I'll try -framedrop. Thanks for the suggestion.
On Thu, 1 Mar 2012, Toby Corkindale<toby.corkindale@strategicdata.com.au> wrote:
Seriously? Hardware acceleration for rescaling of video (ie. upsampling so you can display it full-screen) has been supported in X and mplayer for a very, very long time.
I also note that even a low-spec, first-gen core 2 duo from 2006 can play back 1920x1080 h264 video (just); so can the slowest Celeron (E1200) from that era. I know because my last media PC had one.
I've had discussions on this list on similar topics on more than a few occasions, dating back to when a P4-1.5GHz was a reasonably powerful system.
It seems that every time I test such things I find that Intel video controllers give better results which is apparently due to having better driver support for scaling. Such discussions usually end up with several people trying to convince me that I should buy better hardware in spite of the fact that my system is mainly used for xterms, email, and web browsing. With playing video being the only task that taxes the display system.
I can cope with a small video window centered in my large monitor.

On Wed, Feb 29, 2012 at 10:25:38PM +1100, Russell Coker wrote:
full-screen because for some videos that takes too much CPU time and gets
odd. generally doesn't need much grunt to do full screen. maybe you need a better video card? an old-ish intel g35 with a Q6600 works well via hdmi to my tv. I'm hoping a rasberry pi will do it too for less watts, but seems unlikely it'll have the horesepower and/or codecs and codec support in players...
video and audio out of sync and for some other videos the resolution isn't
the latest addition to my ever growing mplayer alias is -autosync 30 which does a pretty good job of keeping audio and video in sync. this wasn't needed with a previous kernel/x/mplayer version, but for some reason I insist on doing 'yum upgrade' and breaking things :) if it's your video that's slow, you could also try -framedrop cheers, robin

On 29/02/12 22:25, Russell Coker wrote:
I want to play videos in the center of my screen. I don't want to run them full-screen because for some videos that takes too much CPU time and gets video and audio out of sync and for some other videos the resolution isn't high enough (anything scaled up by more than a factor of 2 looks bad).
Seriously? Hardware acceleration for rescaling of video (ie. upsampling so you can display it full-screen) has been supported in X and mplayer for a very, very long time. I also note that even a low-spec, first-gen core 2 duo from 2006 can play back 1920x1080 h264 video (just); so can the slowest Celeron (E1200) from that era. I know because my last media PC had one. So.. it might be worth looking into your X and mplayer configuration, as with some tweaking you should be able to get full-screen working. As for the upsampling looking bad for extremely low resolution videos..there are some filters you can enable that will sharpen/deblock/denoise the video. Those might come in handy for you.
There are mplayer options for putting the window at a specific position, this would be fine if I had many videos with the same resolution. But I want to play arbitrary resolution videos in the center of the screen.
Any ideas on how to do this?
-- .signature

On Thu, 1 Mar 2012, Toby Corkindale wrote:
On 29/02/12 22:25, Russell Coker wrote:
I want to play videos in the center of my screen. I don't want to run them full-screen because for some videos that takes too much CPU time and gets video and audio out of sync and for some other videos the resolution isn't high enough (anything scaled up by more than a factor of 2 looks bad).
I also note that even a low-spec, first-gen core 2 duo from 2006 can play back 1920x1080 h264 video (just); so can the slowest Celeron (E1200) from that era. I know because my last media PC had one.
Just a comment on the above situation. I have always been puzzled by posts that indicate deceoding videos requires significant amount of grunt and have alwasy wondered if enough information describing the problem has been given. Back in the bad old days (10 to 12 years ago) when I first started playing DVD's (which defintely would be defined as videos) I used teh following system. Motherboard Gigabyte 6BXD 2 slot 1 pentium 2's at 350 mhz cannot remember the ram now, this system still is in use and curently has 512 Mbytes of ram. Video Card matrox Millenium 2 Symbios 896 dual channel SCSI controler with 3 40 Mhz scsi drives DVD drive Pioneer scsi Mag MXP17F monitor at 1280x960 This system would success fully play DVD's no problems, no hesitations or sync problems. It took around 80% of 1 cpu to do the decoding and scaling to full screen. It is very likely the SCSI controler had a hand in the performance as I found that with this the transfers from the drives required very little cpu power. At the time the general recomendation was that one required at least a 550 mhz cpu to play DVD's. A minor sort of offtopic point here is that the system used to take a llllllllooooooonnnnnng time to crack the DVD's encription, I cannot now remember the player I used. It not being one of the curent crop. Incedently I recently purhased another monitor (a Samsung 1920x1200, performs well) and while they carried it to my car had a talk with the salesstaff. He said they regularly got customers asking for a high performance 4 core system and graphics card just to play videos. Quite where the idea that playing videos requires such high powers comes from I do not know. Curosity killed the cat, Lindsay

On 06/03/12 09:56, Lindsay Sprinter wrote:
On Thu, 1 Mar 2012, Toby Corkindale wrote:
On 29/02/12 22:25, Russell Coker wrote:
I want to play videos in the center of my screen. I don't want to run them full-screen because for some videos that takes too much CPU time and gets video and audio out of sync and for some other videos the resolution isn't high enough (anything scaled up by more than a factor of 2 looks bad).
I also note that even a low-spec, first-gen core 2 duo from 2006 can play back 1920x1080 h264 video (just); so can the slowest Celeron (E1200) from that era. I know because my last media PC had one.
Just a comment on the above situation. I have always been puzzled by posts that indicate deceoding videos requires significant amount of grunt and have alwasy wondered if enough information describing the problem has been given.
Back in the bad old days (10 to 12 years ago) when I first started playing DVD's (which defintely would be defined as videos) I used teh following system.
[snip: which was a p2 350MHz] Note that back in the old days, videos were encoded in ways that didn't require much grunt to decode. eg. MPEG1 They were also usually only low resolution, eg less than 250k pixels. By the time you get to today, you're looking at video encoded in things which use boatloads more CPU power to decode. Also the videos are higher resolution, just over 2000k pixels. Try downloading some 1920x1080 content encoded in MPEG4-AVC (High 10 profile) with styled subtitles and multi-channel sound, and see how you go playing that back?
Incedently I recently purhased another monitor (a Samsung 1920x1200, performs well) and while they carried it to my car had a talk with the salesstaff. He said they regularly got customers asking for a high performance 4 core system and graphics card just to play videos. Quite where the idea that playing videos requires such high powers comes from I do not know.
Yeah, don't get me started.. one of my parents bought a fairly high-end system with a dedicated high-end graphics card, because they seemed to think that was necessary to watch videos and view photos. Never played a 3D game on it in their life. :(
participants (5)
-
Glenn McIntosh
-
Lindsay Sprinter
-
Robin Humble
-
Russell Coker
-
Toby Corkindale