Log in

View Full Version : Video Player using Pixel Shaders for Linux


Deshi
4th January 2011, 17:00
Hi everyone !

First, Happy new year !

Second,
I'm looking for a video player capable of using Pixel Shaders like MPC-HC on Windows. Now that vdpau works well that would be nice to use some PS, especially those http://forum.doom9.org/showthread.php?t=157634&page=9
There's already some nice postprocessing using the vdpau/gpu like denoise, deinterlace and sharpen but nothing as advanced as those above...

Does anyone have any idea ?
Does MPC-HC runs well with Wine ?
Does it have the same capabilities ?
Is it even possible without DirectX ?

nm
4th January 2011, 17:42
There's already some nice postprocessing using the vdpau/gpu like denoise, deinterlace and sharpen but nothing as advanced as those above...

What specific filters would you like to have?

Does MPC-HC runs well with Wine ?

Haven't tried recently, but probably not very well.

Is it even possible without DirectX ?

Sure. For example MythTV has some OpenGL filters.

Deshi
5th January 2011, 08:44
Hi nm,

thanks for the quick reply.

My problem is that I'm rather limited by my cpu so I would like to have as much postproccessing as possible made by the gpu.

Shaders such the "gamma conversion" and "chroma upscaling" give some good results with mpc-hc.
Especially the shader with sharpen + deband + denoise, is very interesting because deband (aka gradfun in my mplayer config) is a cpu killer.

I'm using XBMC with mpc-hc (win) or mplayer (ubuntu) as external players. I want in a rather short period of time to use only my ubuntu config so I'm looking for video results as good as what I have with win.

nm
5th January 2011, 15:02
Especially the shader with sharpen + deband + denoise, is very interesting because deband (aka gradfun in my mplayer config) is a cpu killer.
Strange. I only notice a 5 % CPU load increase with gradfun on a Core 2 Duo when playing 1080p video. Are you using current SVN?

But GPU filters would certainly be nice, especially when using hardware decoding. I'm not sure where they should be put though, since GPU filtering is tied to the renderer and FFmpeg doesn't touch that part of the chain. MPlayer and VLC are the most capable players and it would be good if both could benefit from the filters. Then there are XBMC and MythTV that also have a large number of users.

Deshi
6th January 2011, 08:40
Hi,

5% is not that high but it depends on how strong you configure your gradfun (1.2:16 is minimal) and it also depends on how high was already your cpu when you add those 5%.

Deband is mostly useful for my old SD files and those are decoded by the cpu unless I transcode all my old divx/xvid to x264 and thus damaging the video even more but decoding it with the gpu.

When you're already using avisynth filters like the LSF sharpen (much better than any PS), reencoding sound on the fly... those 5% matters if you want your fans to stay quiet.

So in the end it's a matter of testing which filters to put where.

The deband PS I tested, with my humble eyes and my humble installation, seems as effective as the ffmpeg one.
Huge differences are visible between PS sharpen and even the simplest sharpen of ffmpeg...

nm
6th January 2011, 11:12
5% is not that high but it depends on how strong you configure your gradfun (1.2:16 is minimal)

I also tried heavier settings and didn't see much of a difference.

and it also depends on how high was already your cpu when you add those 5%.

But then it's not gradfun that's the CPU killer. I find the filter very fast.

When you're already using avisynth filters like the LSF sharpen (much better than any PS), reencoding sound on the fly... those 5% matters if you want your fans to stay quiet.

Well, realtime LSF requires a lot more CPU time so you should blame it instead.

But you're not going to use LSF natively on Linux anyway. At least not without reimplementing it in MPlayer or libavfilter, or without porting AviSynth to Linux.

Huge differences are visible between PS sharpen and even the simplest sharpen of ffmpeg...

To FFmpeg's advantage? (Or are you talking about ffdshow?)

Deshi
7th January 2011, 10:09
Hi,

my CPU killer remark is not directly tied to gradfun (deband) particularly but rather centered on the fact that stacking filters (managed by the CPU), especially with my modest config, is a problem for me. 5% extra makes a difference mostly when it's possible to put that load on the GPU without any noticeable difference, to me...

Regarding LSF, as far as I know for now I couldn't make it work on my ubuntu config you're right.

Yes, I feel like ffmpeg sharpen(s) are better than those running by PS or vdpau. And yes I'm confused between ffdshow and ffmpeg :rolleyes:

Another thing,
Is it right that all the postprocessing parameters implemented in mplayer config, such as the gradfun filter etc, are working on the input video (aka before upscalling if needed) ?

Is it right that all the params for vdpau such as :
vo=vdpau:deint=4:chroma-deint:pullup:colorspace=0:denoise=1:sharpen=0.7
will be processed on the output (aka at the end of "everything" (postprocessing filters, upscalling...), when transfered to the screen) ?
Meaning that those filters (vdpau) work on a "heavier" image : in terms of resolution and frequency.

nm
7th January 2011, 10:35
Another thing,
Is it right that all the postprocessing parameters implemented in mplayer config, such as the gradfun filter etc, are working on the input video (aka before upscalling if needed) ?
Yes. You can also use the scale filter at any position in the chain to resize and then continue working on the resized video. If you resize to full screen by the software filter, the hardware scaler does nothing.

Is it right that all the params for vdpau such as :
vo=vdpau:deint=4:chroma-deint:pullup:colorspace=0:denoise=1:sharpen=0.7
will be processed on the output (aka at the end of "everything" (postprocessing filters, upscalling...), when transfered to the screen) ?
Yep, except that upscaling is normally done last by VDPAU itself.

Meaning that those filters (vdpau) work on a "heavier" image : in terms of resolution and frequency.
Well, those frame properties are rarely changed at the CPU side unless you have interlaced video that must be deinterlaced with yadif before further processing with software filters.