Enhancing video capabilities of Mplayer

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

Enhancing video capabilities of Mplayer

#1 Post by nic007 »

Many/most youtube videos are only available in 640x360 format which is not only a small screen size but which video quality also tends to be a bit dull/fuzzy. So I experimented a bit and found that increasing the size by a third or even 50% and sharpening the image by a small factor gives a better viewing experience. 480P videos also benefit with the sharpening factor and looks good if you enhance the size by a third (for a larger picture). I made a script and put it in the send to menu so I can access these effects with right-clicking on a video I want to play. The following is an example of increasing the size of a 360P video by one-third and applying a sharpness factor of 0,8:

Code: Select all

gmplayer -vf-add unsharp=lc:0.8 -zoom -x 854 -y 480 "$@"

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

Ah interesting.

You tube vids are usually rencoded using fast and crappy ffmpeg settings....though i used to get the original source with the right link which helped I dont think thats possible any more. My sone mainly uses you tube for music and bass tutorials.

From other sources I often find dvd format videos expanded to HD which look blocky and splodgy...resizing in video convertor to dvd again often produces a sharper cleaner result.

Mike

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#3 Post by nic007 »

All depends on the original quality of the upload of course. Youtube will always convert any upload to 360P as one of the watching/download options. I also guess many old videos people upload has its origin from VHS tapes so the original quality is crappy for starters (won't be better than 480P) and even the old DVD's weren't much better quality either. I download many sport videos, many of them uploaded in HD which is available for download at say 720P which makes it a big download. In the latter case, the original upload is good quality and with 360P as download option, it still has good quality at the cost of much smaller size. Increasing the video size of these by say 50% and applying the sharpen effect is definitely worthwhile (especially for 640x360 video).

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#4 Post by mikeb »

Tested it and yes a subtle but noticeable difference. :) Nice find.
I just tried a few older videos I had around not just you tube. Original Addams family and a VHS eighties film for example.

There is deblocking filtering available but I find it just smears and uses much cpu to do so.

You could probably leave out the -zoom...the video window can resize to whatever you want really or full screen and the benefit of sharpening is still there.

I am also assuming it could be used when re-encoding with mencoder or mplayer.

mike

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#5 Post by nic007 »

I find that zooming by more than 50% tends to be too much and the deterioration in quality quite obvious. Zooming by only a third really gives good results. Also - the sharpen effect is very delicate so just enough should be used otherwise the picture will distort. I've also noticed that the sharpen effect goes heavy on CPU processing when using Mplayer. VLC does much better in this regard. The setting for the sharpen effect when using VLC should be around 0.12

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#6 Post by mikeb »

Fair enough.

In which case I was thinking in terms of a mini script that first obtained the original dimensions and then calculated a suitable zoom factor so different size videos could be handled automatically.

mike

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#7 Post by nic007 »

mikeb wrote:Fair enough.

In which case I was thinking in terms of a mini script that first obtained the original dimensions and then calculated a suitable zoom factor so different size videos could be handled automatically.

mike
Yes, VLC does that what you are asking. For instance with VLC one can factor in the zoom by 1.33, 1.5, etc. I have scripts like that for VLC. MPlayer does not seem to make it that easy (well, I couldn't find a way as easy as VLC). In VLC one can also zoom in factors of 10(%) with alt+o. Don't know if Mplayer has the equivalent. I only use 3 zoom sizes, ie. One-third, 50% and 75% so not really a problem or me.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: Enhancing video capabilities of Mplayer

#8 Post by greengeek »

nic007 wrote:Many/most youtube videos are only available in 640x360 format which...tends to be a bit dull/fuzzy. So I experimented a bit and found that increasing the size by a third or even 50% and sharpening the image by a small factor gives a better viewing experience. ... I made a script and put it in the send to menu so I can access these effects with right-clicking on a video I want to play.
Hi, can you offer some clarification of this please? Do you mean that you can rightclick on a YT vid (in browser?) and download/convert it with this script?

cheers!

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

Re: Enhancing video capabilities of Mplayer

#9 Post by nic007 »

greengeek wrote:
nic007 wrote:Many/most youtube videos are only available in 640x360 format which...tends to be a bit dull/fuzzy. So I experimented a bit and found that increasing the size by a third or even 50% and sharpening the image by a small factor gives a better viewing experience. ... I made a script and put it in the send to menu so I can access these effects with right-clicking on a video I want to play.
Hi, can you offer some clarification of this please? Do you mean that you can rightclick on a YT vid (in browser?) and download/convert it with this script?

cheers!
No. This is for applying effects to videos you are playing off-line (downloaded videos).

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#10 Post by nic007 »

Made a little script for VLC media player. Select zoom options. Also disables the screensaver and applies sharpen effect to video (if applicable). Useful for low resolution videos. Place in the right-click "send to" menu or run the script from defaultmediaplayer in /usr/local/bin.

Edit: Improved application a bit, better spacing and more compact.
Attachments
VLCZoom.zip
(669 Bytes) Downloaded 34 times
Last edited by nic007 on Tue 25 Sep 2018, 12:35, edited 1 time in total.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#11 Post by mikeb »

this could be my shortest post... cheers :)

Post Reply