Feature #794


Add URL streaming option for AutoKiosk system

Added by Hammel about 3 years ago. Updated 5 months ago.

In Progress
Target version:
Start date:
20 Aug 2020
Due date:
% Done:


Estimated time:
05 - Very Low


Ive had a request to allow videofe to stream from a URL. The request also asked for the playback to occur on power cycle, which implies use in AutoKiosk.

The way to do this is:
  1. Add a cli and config file option that specifies the URL to open by omxplayer.
  2. Add support in videofe to prefer the URL option over playing locally. If playing locally, don't use the local db code.
  3. Add support for testing the URL for it's availability.
    1. Add notification that remote url can't be accessed.
That's basically it. I can get fancy and add an option to set the URL but really what this guy wants is the ability to automatically set it. To do that:
  1. On boot, look for USB stick with file: autokiosk.url
    1. That file has one line: the url
    2. if present, update videofe.cfg with the config option and that url.
Actions #1

Updated by Hammel about 3 years ago

For this to work I need to be able to configure the kiosk after installation. The way to do this is with a videofe.db file. If that file exists it will be read first. That file can contain URLs to add to the list of files to play and/or remote .db files to download. The remote .db files must be named <file>.db and they can only contain URLs to play.

Valid URLs for the .db files must start with http:// or https://. If a line in those files starts with anything else it will not be downloaded. All valid lines must also be suffixed with a supported video format, which defaults to one of p4 mkv m4v avi mov. However, to avoid having to fully download the file before playing the file should be in the MP4 format.

Additionally, to allow configuration after the device is installed with PiBox a USB stick can be inserted with files on it. An init script will install files it finds on the USB stick.

If the usb stick has a config file for videofe that should be copied over at boot time.
If the usb stick has a playlist (re: .db) file for videofe that should be copied over at boot time.

Actions #2

Updated by Hammel about 3 years ago

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

I switched the omxplayer build from local ffmpeg to system ffmpeg to get access to tls support, which is required to use an http URI. This also makes omxplayer build much faster. This was just for testing purposes - it's not checked in yet. I need to make sure this change doesn't affect standard Media System or Kiosk operation.

I can play the video stream like so:

./omxplayer.bin --loop -o hdmi -r -s

I cannot play the URL like so, because omxplayer doesn't support an HTML5 parser.

./omxplayer.bin --loop -o hdmi -r -s
If you dig into the HTML you can see there are two urls that get played here:

Lag on the internet causes playback to stutter a little (not terrible, but it happens). This is worse for the "hit_music" video because it's audio stops too. That's more noticable than the video stutter.

If I download these videos to the local network, and I run on wired ethernet, there is almost no stutter. On a closed network I'd expect there would be no stutter at all.

Next step is to verify the omxplayer build changes don't cause any regressions. Status: they didn't. Changes can be committed and pushed.
Then I can look at adding config option changes to videofe to support this type of playback.

Actions #3

Updated by Hammel about 3 years ago

  • % Done changed from 10 to 30

I have the changes implemented to support a videofe.db file. I need to test the following:

  • Add remote urls to videofe.db: These are https:// urls added to /etc/videofe.db. If videofe.db exists then any https:// urls should be ADDED to the list of files to play. That means both remote and local files can be played in kiosk mode. I need to test
    • local urls only (the regression test)
    • remote urls only (new functionality)
    • local and remote urls (mixed functionality)

For these tests I need a USB stick with two videos on it for the local URLs.

  • Add remote dbs to videofe.db: These are https// urls to videofe.db files. If the remote url is a videofe.db file then that file should be parsed for remote urls ONLY (any local files should be ignored). I need to test
    • remote videofe.db with remote URLs only
    • remote videofe.db with invalid URLs (non-http and non-https; these should be ignored)
    • remote videofe.db with mixed remote URLs and invalid local URLs
    • remote videofe.db with videofe.db URLs (these should be ignored)

The remote videofe.db can be placed on my local wiki file archive for testing.

The code for this is currently in my sandbox for videofe (re: vfe cdtools).

Possible remote urls to try:
Actions #4

Updated by Hammel over 2 years ago

  • Severity changed from 01 - Critical to 05 - Very Low
Actions #5

Updated by Hammel almost 2 years ago

  • % Done changed from 30 to 10

The code for this work was lost when my desktop went belly up in August 2021. I'll have to rebuild it from scratch based on these notes.

Actions #6

Updated by Hammel over 1 year ago

  • Severity changed from 05 - Very Low to 02 - High
Actions #7

Updated by Hammel over 1 year ago

  • Severity changed from 02 - High to 01 - Critical
Actions #8

Updated by Hammel about 1 year ago

  • Severity changed from 01 - Critical to 05 - Very Low
Actions #9

Updated by Hammel 5 months ago

  • Target version changed from 2.0 - Harkonnen to 3.0 - Corrino

Moving to 3.0.


Also available in: Atom PDF