Re: video decoding and playback in OpenBSD

2019-03-26 Thread Mihai Popescu
On Mon, Mar 25, 2019 at 7:46 PM Alexandre Ratchov  wrote:

> This surprises me, your CPU doesn't seem that slow.

I decided to do more tests after your opinion and I had a nice surprise too.
My desktop with video VGA and DP outputs is connected to an 1680x1050
display, with VGA and DVI inputs only.
My TV is 1920x1080 and it has HDMI inputs only. A DP to HDMI passive
cable arrived yesterday and I was able to do test on the TV.
Youtube plays 1080 fine in chromium when connected to TV: less than 1%
frame drops, max 38% cpu load for chromium in top. This is not
happening when I connect the desktop to the display ( VGA or DP-DVI
adapter): almost 10% frame drop and aprox. 89% cpu load.
My thinking is CPU is used a lot to do that crop from 1920x1080 to 1680x1050.

> I'd suggest to check where is spent most of the CPU time, in mpv or in
> Xorg? You could try different mpv "-vo" options, there are machines
> where "-vo x11" is faster than the default one.

If I use mpv to play youtube link, the results on TV and display are
the same or better, looking like youtube in chromium on TV. Using -vo
x11 is using almost 55% on cpu and I get mpv complaints in console
about performance.

Is there a way to replace HTML player from chromium with mpv and play
the stream inside the chromium page on OpenBSD?

Thank you.



Re: video decoding and playback in OpenBSD

2019-03-26 Thread Dumitru Moldovan

On Mon, Mar 25, 2019 at 06:05:58PM +0200, Mihai Popescu wrote:

Hello,

I am trying to find some hardware for an OpenBSD multimedia computer.
I plan to attach it on a HDMI TV and play youtube on it, 1080p@30fps
or more. No 4K involved.

My thinking is to go for an AMD A8-6500 processor, but I am not sure
if this is enough.Right now I am using and AMD Athlon II X2 B26 which
drops some frames on youtube 1080p. I've read that ffmpeg, mpv and
chromium do not use GPU in any way for decoding in OpenBSD.
I could not afford to go for performance hardware like Intel Core
I7-4770, so if you please could you make some suggestion about what
you run as a minimum requirements? Am I on the right track thinking
that more powerful CPUs will speed up decoding?


Your AMD Athlon II X2 should play 1080p @30 fps on YouTube with no
dropped frames.  I know because I have a slightly slower X2 processor,
the green edition at 2800MHz.  I suspect the dropped frames are caused
by your browser disabling some acceleration for your video card.  Do you
use the integrated graphics of your motherboard?  I do and that gave me
similar issues.

But it's possible to force-enable the acceleration in Firefox, with
little issues (freezes sometimes for a few seconds with 6.4 and even got
a couple of X.org crashes over the last months, hoping for a better
outcome with the updated drivers in 6.5, as 6.3 was smooth).  On
Chromium-based browsers I don't think there's a way to force enable 3D
acceleration for these old chipsets.  There's a flag that used to work,
but not any more.

An alternative is to play YouTube videos with mpv using the GL output,
which should be the default (not x11, not xv).  That works out of the
box for my setup.  As a general rule for these old chipsets, the
decoding is not GPU-accelerated, it's the screen rendering that needs
the acceleration.  In Linux I had the option for accelerated H264
decoding too in mplayer/mpv (with VDPAU?), but I still preferred
software decoding, as it gives more flexibility (eg. for deinterlacing).

On a related note, try this in the MPV config file to prevent sound
skips when listening to radio: ao=sndio.  For 5.1 videos you might also
want: audio-channels=downmix.  FFMPEG's ffplay is an alternative to try,
for radio listening I use: ffplay -loglevel quiet -autoexit -nodisp.



Re: video decoding and playback in OpenBSD

2019-03-25 Thread Alexandre Ratchov
On Mon, Mar 25, 2019 at 06:05:58PM +0200, Mihai Popescu wrote:
> Hello,
> 
> I am trying to find some hardware for an OpenBSD multimedia computer.
> I plan to attach it on a HDMI TV and play youtube on it, 1080p@30fps
> or more. No 4K involved.
> 
> My thinking is to go for an AMD A8-6500 processor, but I am not sure
> if this is enough.Right now I am using and AMD Athlon II X2 B26 which
> drops some frames on youtube 1080p. I've read that ffmpeg, mpv and
> chromium do not use GPU in any way for decoding in OpenBSD.

This surprises me, your CPU doesn't seem that slow.

> I could not afford to go for performance hardware like Intel Core
> I7-4770, so if you please could you make some suggestion about what
> you run as a minimum requirements? Am I on the right track thinking
> that more powerful CPUs will speed up decoding?

I'd suggest to check where is spent most of the CPU time, in mpv or in
Xorg? You could try different mpv "-vo" options, there are machines
where "-vo x11" is faster than the default one.

HTH



video decoding and playback in OpenBSD

2019-03-25 Thread Mihai Popescu
Hello,

I am trying to find some hardware for an OpenBSD multimedia computer.
I plan to attach it on a HDMI TV and play youtube on it, 1080p@30fps
or more. No 4K involved.

My thinking is to go for an AMD A8-6500 processor, but I am not sure
if this is enough.Right now I am using and AMD Athlon II X2 B26 which
drops some frames on youtube 1080p. I've read that ffmpeg, mpv and
chromium do not use GPU in any way for decoding in OpenBSD.
I could not afford to go for performance hardware like Intel Core
I7-4770, so if you please could you make some suggestion about what
you run as a minimum requirements? Am I on the right track thinking
that more powerful CPUs will speed up decoding?

Thank you.