LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-03-2021, 06:36 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
insert video filter


i would like to find out if this is possible and how to do it if so. i want to create (in C) a video filter that goes between Firefox or maybe even Mplayer and the library calls or kernel interface to fix some poor quality (dark, bad color temp., bad white balance) while i am watching the video. or maybe it is better to write or mod a player to do this. several websites have these issues (so, solution cannot be website specific). any ideas?
 
Old 05-04-2021, 10:49 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
copy link from firefox and use a player which can do what you need.
 
Old 05-04-2021, 05:26 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Quote:
Firefox or maybe even Mplayer
...
to fix some poor quality (dark, bad color temp.
Make video lighter

~/.mplayer
Code:
vf=eq=10
Or
Code:
mplayer -vf eq=10 file.mp4
Change the sound, example:
Code:
mplayer -af equalizer=-5:-5:-5:0:0:0:0:0:12:12 file.mp4
[brightness|contrast|hue|saturation]=<-100-100>
 
Old 05-13-2021, 08:31 PM   #4
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by pan64 View Post
copy link from firefox and use a player which can do what you need.
i looked for such a player and found nothing. ffmpeg and friends can make such changes but they need the user to have the URL. maybe this should be a firefox feature. it would mean being able to set all the color parameters (at least 27 of them, how every color affects every color in several ways).

or maybe it should be a standardized user API/ABI for video drivers, though it would be nice to have web sit specific parameter sets to pick.
 
Old 05-13-2021, 08:34 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
mplayer is lousy at web browsing. do you know of anyone that uses it for such like on YouTube?
 
Old 05-14-2021, 09:46 AM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
ffmpeg and friends can make such changes but they need the user to have the URL
Code:
a=$(youtube-dl -g -f 18 https://m.youtube.com/watch?v=3IJ2ZwaCvE8) 
ffprobe "$a"
...
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Google
  Duration: 00:58:46.37, start: 0.000000, bitrate: 545 kb/s
  Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 447 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]
Quote:
mplayer is lousy at web browsing
I don't know what you mean by that. Mplayer won't browse the web at all. You need to feed it something.

Quote:
do you know of anyone that uses it for such like on YouTube?
Yes, for about 15 years now. Not by itself, you need to make a script to automate it.
 
Old 05-14-2021, 01:22 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Skaperen View Post
i looked for such a player and found nothing.
mplayer obviously can, as teckk showed you.
mpv can too, even in real time (1234567890 keys).
 
Old 05-14-2021, 07:22 PM   #8
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
i think you guys did not catch on to the fact that i want to teak video color correction while viewing a video as part of browsing the web. downloading a video a fixing it to view is already doable. i want to do it while view the video in the web browser. i prefer Firefox but i am open to try another web browser (except Chrome). the idea way to do this might be a right click (on the video) menu and select color correction which brings up a color correct menu. it would include options to apply to videos, images, and/or HTML. another option would be to save it for this object URL, this page URL, this site host name, this site domain name, everything. and another option would be to give it a custom name to choose when to use that one (among others).
 
Old 05-15-2021, 12:06 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Skaperen View Post
i think you guys did not catch on to the fact that i want to teak video color correction while viewing a video as part of browsing the web. downloading a video a fixing it to view is already doable. i want to do it while view the video in the web browser. i prefer Firefox but i am open to try another web browser (except Chrome). the idea way to do this might be a right click (on the video) menu and select color correction which brings up a color correct menu. it would include options to apply to videos, images, and/or HTML. another option would be to save it for this object URL, this page URL, this site host name, this site domain name, everything. and another option would be to give it a custom name to choose when to use that one (among others).
Well, you have a nice outline there for how to design that browser plugin.
Because I doubt something like that exists already, being so specialised and inflexible.
I mean, WHY does it have to be in the browser...

Also I assume you already searched browser addon/plugin sites, otherwise you wouldn't be asking this question, right?
 
Old 05-18-2021, 06:22 PM   #10
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by ondoho View Post
WHY does it have to be in the browser
it doesn't. that's just the first common place where the video content goes through. and it's still userland. the next place is the kernel (unless the browser sends it somewhere else but i don't know of any place like that for video. if i was doing just audio, pulse audio would be the next place. but i wand to keep this in userland.
 
Old 05-20-2021, 12:20 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Skaperen View Post
it doesn't. that's just the first common place where the video content goes through. and it's still userland. the next place is the kernel (unless the browser sends it somewhere else but i don't know of any place like that for video. if i was doing just audio, pulse audio would be the next place. but i wand to keep this in userland.
I think you are deeply confused about how some things work on your system - maybe you don't understand that streaming does not require a browser?
Combined with an unwillingness to lay bare your situation in full detail. Your descriptions are always somewhat - wary?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ctrl-Insert and Shift-Insert don't work val3xiv Linux - General 2 06-30-2011 05:17 PM
insert lines into a file after calculating where to insert xonar Programming 13 12-24-2009 04:37 AM
Dansguardian - Won't filter new addresses added to filter list TechnoBod Linux - Software 1 01-08-2008 01:40 AM
problem with insert video in soffice cowens Linux - Software 0 11-08-2004 08:29 AM
Spam filter to external mail filter deadlock Linux - Software 1 06-16-2004 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:23 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
Open Source Consulting | Domain Registration