Before getting the MiSTer, my primary source of emulation was using RetroPie on the RPi3 with my PVM. I was able to do this using Pi2SCART with a SCART to RGB cable. This gave good quality RGB output and decent latency. But the biggest benefit was using MPV to play VHS rips and old school TV broadcasts using MPV. Using it along with sshfs would allow an inverse share to be setup on the RPi and from that directory run video from SSH.
It's tricky because the Linux that's being used with the MiSTer is seemingly missing tools to get MPV and sshfs installed: apt, make, dpkg, git, etcera. I'm curious to get it running, not just for the ability, but also to see if the Linux that's on the MiSTer can handle it. If so, it would make a pretty good way for everyone to play video on a CRT.
With those tools, it was pretty easy to setup. Not so much without them. I'm looking for guidance/collaboration; is this something that can be done? If so, where should I start? Attack installing the programs directly? Get it apt/git running? It's daunting because I'm not sure where to start. I don't have a lot of experience installing without a package manager, and I'm not sure if it's going to be possible without those tools.
I can't imagine this'll work out too well, tbh - it uses shaders, which...well, to be honest, I'm not sure how in hell you'd pull that off in Verilog or VHDL in an API-sane way. MPV very clearly expects a host OS, and I don't think you're likely to get anywhere on the FPGA side. The ARM side of MiSTer is just too slow for this.
Re: MPV on MiSTer?
Posted: Sun Aug 09, 2020 1:44 am
by OneEightZero
That's what I was curious about, if the ARM side could handle it. Is the ARM side as powerful as the RPi3?
Re: MPV on MiSTer?
Posted: Sun Aug 09, 2020 6:27 pm
by rhester72
OneEightZero wrote: ↑Sun Aug 09, 2020 1:44 am
That's what I was curious about, if the ARM side could handle it. Is the ARM side as powerful as the RPi3?
The Cortex V is paired with a dual-core Cortex-A9, an ARM v7a processor at 925MHz with no dedicated GPU. The RPi 3 is a quad-core Cortex-A53, an ARM v8a processor at 1.2GHz with a Broadcom Videocore IV GPU.
They aren't anywhere near being the same class.
Re: MPV on MiSTer?
Posted: Mon Aug 10, 2020 1:49 am
by ARCADEAGES
I know this is not the same solution, but it does solve the "play old videos on CRT" problem.
Could be possible to use an iPad (USB C) --> To HDMI --> to RCA conversion chain.
It's not RGB, but it's cheap. Not sure about any latency, but as it's not interactive, that's a moot point. It does make possible to play any files and streams via an iPad or other similar device without a lot of fuss.
Makes me wonder if it's possible to create a VCR or Laser Disc core for MiSTer...
Re: MPV on MiSTer?
Posted: Mon Aug 10, 2020 3:00 am
by OneEightZero
ARCADEAGES - What I want to avoid is using a second device. I want to see how far the Mister can go. It would be easy to just setup the RPi again, but having that capability on the Mister would be one less thing to have laying about.
rhester72 - How does the Mister output video using the Linux GUi Sorgelig released? I'm curious how that's pulled off without a GPU.
Re: MPV on MiSTer?
Posted: Mon Aug 10, 2020 3:02 am
by rhester72
Simple direct framebuffer output.
Re: MPV on MiSTer?
Posted: Wed Sep 02, 2020 9:03 am
by boogermann
OneEightZero wrote: ↑08 Aug 2020, 20:44
That's what I was curious about, if the ARM side could handle it. Is the ARM side as powerful as the RPi3?
It never cease to amaze me how you can always find people that simply claim that something doesn't work or can't be done without trying or even provide any reasonable logical evidence one why it wouldn't.
MiSTer can use FFPlay and handle videos even with newer codecs like x264 at 720p without a hitch. 1080p will get some dropped frames. Although playable widescreen videos get a little blocky when scaling down to a CRT but 4:3 content scale well. I haven't optimized the swscaler nor the yuv converter yet. Both can be accelerated by NEON, but I just didn't had time to work on it.
So you might ask, what is NEON again?
NEON is an advanced SIMD architecture for ARM processors. Effective use of NEON through assembly, intrinsic functions, or automatic vectorization by the compiler can lead to tremendous performance gains for multimedia applications.
Neon technology is intended to improve the multimedia user experience by accelerating audio and video encoding and decoding, user interface, 2D/3D graphics or gaming. It can also accelerate signal processing algorithms and functions to speed up applications such as audio and video processing, voice and facial recognition, computer vision and deep learning.
So basically you can turn the VFPU into a 2D graphic card.
Here's is an example of a sprite test running at 640x480@32-bits
Screen is at 8 bits per pixel
Screen is in system memory
Sprite is in system memory
Sprite blit uses RLE acceleration 722.31 frames per second
by ARCADEAGES » 09 Aug 2020, 20:49
Makes me wonder if it's possible to create a VCR or Laser Disc core for MiSTer...
Possible, yes. Willing of people to implement, more difficult. ElectronAsh was looking into it on how to bridge the FPGA and the HPS into a Hybrid Core. I actually play tested the MPEG2 file from the Dragon's Lair Laserdisc https://www.youtube.com/watch?v=_diVSzNRauc
OneEightZero wrote: ↑08 Aug 2020, 20:44
That's what I was curious about, if the ARM side could handle it. Is the ARM side as powerful as the RPi3?
It never cease to amaze me how you can always find people that simply claim that something doesn't work or can't be done without trying or even provide any reasonable logical evidence one why it wouldn't.
MiSTer can use FFPlay and handle videos even with newer codecs like x264 at 720p without a hitch. 1080p will get some dropped frames. Although playable widescreen videos get a little blocky when scaling down to a CRT but 4:3 content scale well. I haven't optimized the swscaler nor the yuv converter yet. Both can be accelerated by NEON, but I just didn't had time to work on it.
So you might ask, what is NEON again?
NEON is an advanced SIMD architecture for ARM processors. Effective use of NEON through assembly, intrinsic functions, or automatic vectorization by the compiler can lead to tremendous performance gains for multimedia applications.
Neon technology is intended to improve the multimedia user experience by accelerating audio and video encoding and decoding, user interface, 2D/3D graphics or gaming. It can also accelerate signal processing algorithms and functions to speed up applications such as audio and video processing, voice and facial recognition, computer vision and deep learning.
So basically you can turn the VFPU into a 2D graphic card.
Here's is an example of a sprite test running at 640x480@32-bits
Screen is at 8 bits per pixel
Screen is in system memory
Sprite is in system memory
Sprite blit uses RLE acceleration 722.31 frames per second
by ARCADEAGES » 09 Aug 2020, 20:49
Makes me wonder if it's possible to create a VCR or Laser Disc core for MiSTer...
Possible, yes. Willing of people to implement, more difficult. ElectronAsh was looking into it on how to bridge the FPGA and the HPS into a Hybrid Core. I actually play tested the MPEG2 file from the Dragon's Lair Laserdisc https://www.youtube.com/watch?v=_diVSzNRauc
I am immensely interested in this. If you ever need a tester to make a more permanent core/implementation, let me know.
I think this would be valuable for the community, especially for 480p or less video playback on CRT.
Re: MPV on MiSTer?
Posted: Sat Sep 19, 2020 3:28 pm
by mrtomato
Maybe will be possible to port some audio players like Moode od Volumio is could be great addition to Mister.
Re: MPV on MiSTer?
Posted: Fri Oct 02, 2020 1:02 pm
by ashvinau
I wonder if it would be possible to use the HPS like an API instead of the main cpu. Have a raspberry pi 4 or whatever sending draw calls to the de-10 via gigabit ethernet? It seems like the theoretical throughput is similar to standard pci.
Re: MPV on MiSTer?
Posted: Fri Mar 08, 2024 2:18 pm
by OneEightZero
I wonder if this could be possible now with GroovyMAME. Could a MPV video stream be dumped directly into GroovyMAME?
Re: MPV on MiSTer?
Posted: Fri Mar 08, 2024 5:01 pm
by AngelicLiver
You can display whatever you want from the desktop via MiSTerCast.
Re: MPV on MiSTer?
Posted: Fri Mar 08, 2024 5:20 pm
by Bas
This thread is the first time I heard of MPV, but I've been twiddling bits on the Linux end of MiSTer for a while now. Cross-compiling is often easier to arrange, even emulating an armv7 machine using QEMU on an x86 PC, than it is to turn a functioning MiSTer into a developer workstation. The OS simply isn't made to support that and it shows.