Project

General

Profile

Actions

Feature #322

closed

Create video display app

Added by Hammel over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
05 May 2014
Due date:
% Done:

100%

Estimated time:
Severity:
03 - Medium

Description

This is just a stop-gap measure until I think of a better way to deal with the requirement. I need an application that runs on the Media Server that will show the list of available files mounted from the SD card and then play one using omxplayer. After it plays it will need to restart X because omxplayer takes over the framebuffer and X won't be able to update.

The media server should only allow this if the HDMI is plugged in. The app will launch from Matchbox's side panel. The side panel will send a notice to appmgr to launch the video player.

Actions #1

Updated by Hammel over 7 years ago

  • Description updated (diff)
Actions #2

Updated by Hammel over 7 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

You must run omxplayer under X to get key-controls to work. To run under X:

xterm -display :0.0 -fullscreen -fg black -bg black -e omxplayer -o hdmi -r <file>

This works, but it doesn't resolve the problems with the screen staying blank. Rumor has it xrefresh -d :0.0 should refresh the X display when omxplayer exits, but that doesn't seem to help when run via ssh. I'll have to try it as a shell script and run it directly from the desktop.

Even with xrefresh working I still need a special app for this because I need something to display the list of available videos (not to mention possibly tying omxplayer into watching TV, if possible/necessary).

Actions #3

Updated by Hammel over 7 years ago

It may be possible to user a Java app (or python) to generate an index or mini-db on the SD card (user would do this on their desktop or lapotp) that can be read and displayed in an Gtk+ app on the target. Here are some links for libs that support TheMovieDB for just such a purpose.

Actions #4

Updated by Hammel over 7 years ago

  • % Done changed from 10 to 20

One additional thing: omxplayer can play a TV stream if I do the following.

  1. Load the xc5000/au0828 drivers (happens automatically if the WinTV HVR 950Q is plugged into the usb hub)
  2. Run the following w_scan to get local stations OTA: w_scan -fa -A1 -c US -X > ~/.azap/channels.conf
  3. Run the following to tune to a channel: azap <channel name> (where channel name is the first field in the channels.conf and should be enclosed in double quotes)
  4. Run the following to make omxplayer play the stream: omxplayer /dev/dvb/adapter0/dvr0

This only works if I have an mp2 license from the RPi store.

So now I know how to play a movie from the SD card (or SMB mount point) and even watch TV. I just need to create an app that lets me do either and still takes me back to the main UI after its done.

Actions #5

Updated by Hammel over 7 years ago

  • Priority changed from Urgent to Immediate
Actions #6

Updated by Hammel over 7 years ago

A working version of VideoLib now generates a database that can be read by a video display app. The app needs to be GTK+ and allow browsing the db, launching the omxplayer for the selected video.

The first version of this doesn't need to be fancy. Just list the available movies in a list. Click on an entry to see its poster and other db data. A button is provided to play the video for that entry.

Actions #8

Updated by Hammel over 7 years ago

The app for showing the list of movies is taking shape. The app can read the VideoLib databases from under /media (either local or smb mounted) and then display a list. It doesn't show the poster for the selected video yet because the the videolib db name (.videolib.db) is in the path. That needs to be stripped. Then it should show the poster.

After that, clicking on the drawing area should launch the xterm with omxplayer. When omxplayer is killed it should kill off the xterm and the app should refresh itself, though I'm not sure how to have it do that.

Actions #9

Updated by Hammel over 7 years ago

  • % Done changed from 20 to 70

Completed first version of the application that will launch the omxplayer. It's been tested with mplayer on my desktop. It still needs to be tested on PiBox.

Actions #10

Updated by Hammel over 7 years ago

  • % Done changed from 70 to 90

Verified working under PiBox UI. However omxplayer leaves a blank or corrupted frame buffer when it exits.

I'm adding a "xfresh -display :0.0" to the end of the command that the xterm runs. This should get run after omxplayer exits. Hopefully that will fix the problem.

I did notice some videos didn't play. Not sure why. I'll write those up as separate bugs later.

Actions #11

Updated by Hammel about 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

videofe now properly runs omxplayer and then returns to X via a vt switch. While there are still some bugs in the omxplayer playback, videofe effectively works. It was tested on our recent roadtrip to the northwest and were able to select movies and play them. The vt switch hack is fairly transparent and works well to return the user to the matchbox UI.

Videofe is checked in and currently up to date. This issue can be closed. Bugs in it or with the omxplayer it calls will be tracked separately.

Actions

Also available in: Atom PDF