Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Oct 2018, 20:02
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Enhancing video capabilities of Mplayer
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
nic007


Joined: 13 Nov 2011
Posts: 2656
Location: Cradle of Humankind

PostPosted: Sun 23 Sep 2018, 08:56    Post subject:  Enhancing video capabilities of Mplayer  

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:
gmplayer -vf-add unsharp=lc:0.8 -zoom -x 854 -y 480 "$@"
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11176

PostPosted: Sun 23 Sep 2018, 11:43    Post subject:  

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
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2656
Location: Cradle of Humankind

PostPosted: Sun 23 Sep 2018, 12:18    Post subject:  

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).
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11176

PostPosted: Sun 23 Sep 2018, 14:49    Post subject:  

Tested it and yes a subtle but noticeable difference. Smile 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
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2656
Location: Cradle of Humankind

PostPosted: Sun 23 Sep 2018, 17:38    Post subject:  

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
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11176

PostPosted: Mon 24 Sep 2018, 04:03    Post subject:  

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
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2656
Location: Cradle of Humankind

PostPosted: Mon 24 Sep 2018, 04:24    Post subject:  

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.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5240
Location: Republic of Novo Zelande

PostPosted: Mon 24 Sep 2018, 04:57    Post subject: Re: Enhancing video capabilities of Mplayer  

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!
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2656
Location: Cradle of Humankind

PostPosted: Mon 24 Sep 2018, 05:31    Post subject: Re: Enhancing video capabilities of Mplayer  

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).
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2656
Location: Cradle of Humankind

PostPosted: Mon 24 Sep 2018, 09:56    Post subject:  

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.
VLCZoom.zip
Description 
zip

 Download 
Filename  VLCZoom.zip 
Filesize  669 Bytes 
Downloaded  12 Time(s) 

Last edited by nic007 on Tue 25 Sep 2018, 08:35; edited 1 time in total
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11176

PostPosted: Mon 24 Sep 2018, 14:06    Post subject:  

this could be my shortest post... cheers Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1140s ][ Queries: 13 (0.0246s) ][ GZIP on ]