omxplayer icon indicating copy to clipboard operation
omxplayer copied to clipboard

OSD on RPi 4

Open gkreidl opened this issue 5 years ago • 13 comments

I have seen that OSD has been disabled for RPi 4 (or when using the OpenGL driver). Without OSD omxplayer is almost useless for many things I'm doing with it. @popcornmix: Do you see a possible future solution to make it work again?

gkreidl avatar Jun 27 '19 03:06 gkreidl

omxplayer's OSD can be rewritten to use a dispmanx overlay rather than OpenVG overlay.

But the focus here is improving VLC which has more functionality (e.g. software video decode, ability to run in an X window as well as fullscreen, better subtitle support, DVD playback etc)

VLC can be run in a similar way to omxplayer (from command line with fullscreen video output).

popcornmix avatar Jun 27 '19 11:06 popcornmix

So this means it could be done but you are busy with other projects which are more important for the Foundation. Perhaps one of the other committers here could help implementing OSD with dispmanx.

I've invested a lot of work into projects using omxplayer. Just a few months ago I published rpiotrtool, a program to decode and cut videos from onlinetvrecorder.com. I use omxplayer for cut-preview and cut-control after cutting (subtitles are required for this) and an extended version of omxplayerGUI as cut-editor (create cut points or cut lists for cutting the videos). This software would greatly profit from the RPi 4, because of much faster HDD speed via USB 3. I've already done some tests with VLC, but it cannot correctly play the original AVIs from onlinetvrecorder.com and so I cannot use it for cut-preview. And there is no way of implementing a cut editor into VLC.

gkreidl avatar Jun 28 '19 05:06 gkreidl

Yes. In fact the original subtitle/osd code was written by a user of omxplayer (torarin) and submitted as a PR. I'd be happy to accept a PR to switch to a non-VG renderer.

I did make a start on this a while back, (http://paste.ubuntu.com/p/SM965qhyYc/) but it needs more work and it's not high on my list of priorities.

popcornmix avatar Jun 28 '19 13:06 popcornmix

Is the OSD supposed work with the raspberry pi 4 & legacy non-GL driver? I cant get it to work at all...

deadbeef84 avatar Jul 03 '19 00:07 deadbeef84

VLC can be run in a similar way to omxplayer (from command line with fullscreen video output).

I did try this without much success, do you have a command-line example or any link to docs?

deadbeef84 avatar Jul 03 '19 09:07 deadbeef84

Let me get back to you. I've asked the question of the guy working on VLC. Possibly it's not currently working, but support is planned.

popcornmix avatar Jul 03 '19 14:07 popcornmix

I believe if you run:

vlc --vout mmal_vout <file>

you can launch vlc in a similar way to omxplayer. If you want to control vlc with keyboard then add -I ncurses

popcornmix avatar Jul 05 '19 11:07 popcornmix

There is a version of vlc with HEVC support available for testing: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=257395

popcornmix avatar Nov 21 '19 15:11 popcornmix

Just in case anyone's interested, I've been working on a replacement osd using dispmanx and cairo at my fork of omxplayer at https://github.com/mjfwalsh/omxplayer. I think it should work on the rpi4 but I've only been able to test it on my rpi3. If anyone is interested in volunteering...

mjfwalsh avatar Jul 30 '20 16:07 mjfwalsh

@mjfwalsh: I would like to test it but ran into lots of difficulties:: git-core libva1 are not available on Buster, libssl1.0-dev reqires to remove lots of other packages. Making ffmpeg ends with an error: smbclient not found (it is installed) make throws an error: OMXReader.cpp: In function ‘int dvdread_file_read(void*, uint8_t*, int)’: OMXReader.cpp:124:19: error: ‘pFile’ was not declared in this scope

gkreidl avatar Jul 30 '20 17:07 gkreidl

@mjfwalsh: I would like to test it but ran into lots of difficulties:: git-core libva1 are not available on Buster, libssl1.0-dev reqires to remove lots of other packages. Making ffmpeg ends with an error: smbclient not found (it is installed)

I'm afraid I not sure about these. I'm assuming the official build of omxplayer works on your device? The ffmpeg build stuff is the same as popcornmix's.

make throws an error: OMXReader.cpp: In function ‘int dvdread_file_read(void*, uint8_t*, int)’: OMXReader.cpp:124:19: error: ‘pFile’ was not declared in this scope

Sorry about that. I've pushed a bugfix. If you have any other compile errors you can make an issue request on my fork. That way we can save popcornmix having to read them all!

mjfwalsh avatar Jul 30 '20 18:07 mjfwalsh

Did you ever try to compile it on a Raspberry Pi running Buster? You have to update the prepare script to match Buster dependencies. You have to do something about the ffmepg building. And I got another bug now when running make. Before you publish code, you should at least compile and test it on your own (Raspberry Pi) computer. And I don't see any "issues" link on your repository. That's why I'm posting here.

gkreidl avatar Jul 30 '20 19:07 gkreidl

https://github.com/mjfwalsh/omxplayer/issues/1

(I'd forgotten that you have to enable issue pages.)

mjfwalsh avatar Aug 11 '20 17:08 mjfwalsh