Giter Site home page Giter Site logo

adafruit / pi_video_looper Goto Github PK

View Code? Open in Web Editor NEW
436.0 38.0 236.0 180 KB

Application to turn your Raspberry Pi into a dedicated looping video playback device, good for art installations, information displays, or just playing cat videos all day.

License: GNU General Public License v2.0

Python 96.43% Shell 3.57%

pi_video_looper's Introduction

pi_video_looper

An application to turn your Raspberry Pi into a dedicated looping video playback device. Can be used in art installations, fairs, theatre, events, infoscreens, advertisements etc...

Works right out of the box, but also has a lot of customisation options to make it fit your use case. See the video_looper.ini configuration file for an overview of options.

If you miss a feature just post an issue here on Github. (https://github.com/adafruit/pi_video_looper)

Currently only the Legacy version of Raspberry Pi OS Lite is supported.
The last working image is this one: https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2022-01-28/2022-01-28-raspios-buster-armhf-lite.zip

For a detailed tutorial visit: https://learn.adafruit.com/raspberry-pi-video-looper/installation
There are also pre-compiled images available from https://videolooper.de (but they might not always contain the latest version of pi_video_looper)

Changelog

new in v1.0.17

  • GPIO pins can now be used to send "keyboard commands", i.e. to pause playback or shut down the system

new in v1.0.16

  • send previous/next chapter commands to omxplayer (o/i on keyboard)

new in v1.0.15

  • one shot playback: option to enable stopping playback after each file (usefull in combination with gpio triggers)

new in v1.0.14

  • control the video looper via RPI GPIO pins (see section "control" below)

new in v1.0.13

  • Additional date/time functionality added. Allows you to add a second smaller line to display things like the date correctly.
  • pressing spacebar will pause/resume omxplayer and image_player

new in v1.0.12

  • date/time display option allows you to display the current date and time between the videos
  • added "back" keyboard shortcut to play previous file

v1.0.11

  • fixed skip bug with image_player
  • fixed possible dependency issue

new in v1.0.10

  • NEW PLAYER: "Image Player" (beta)
    Displays images in a slideshow instead of playing videos. Display duration and other options can be controlled via the "image_player" section in video_looper.ini
    All other settings, like background image, color, wait time, copy mode, keyboard shortcuts, etc. should work as expected
    Currently tested formats: jpg, gif, png (others might work also - you need to adapt the extensions setting)

new in v1.0.9

  • fixed: background image is reloaded in copymode without restart

new in v1.0.8

  • playlist resume option
    when enabled will resume last played file on restart
  • console output now has a timestamp for easier event tracking
  • Keyboard key for shutdown added ("p")

new in v1.0.7

  • huge improvements to CPU utilisation with keyboard_control enabled
  • better randomness for random playback

new in v1.0.6

  • Support for omxplayer ALSA sound output.
    Enabled by setting sound output for omxplayer to alsa in video_looper.ini. A new config key alsa.hw_device can be used to specify a non-default output device.
  • Support for ALSA hardware volume control.
    The new config keys alsa.hw_vol_file and alsa.hw_vol_control can be used to set the output device volume in a text file provided with the videos.
  • The sound_vol_file functionality can now be disabled by leaving the config value empty.

new in v1.0.5

  • Support for M3U playlists.
    To be enabled by specifying a playlist path in config key playlist.path. It can be absolute, or relative to the file_reader's search directories (directory: path given, usb_drive: all USB drives' root).
    Paths in the playlist can be absolute, or relative to the playlist's path.
    Playlists can include a title for each item (#EXTINF directive); see next point. If something goes wrong with the playlist (file not found etc.) it will fall back to just play all files in the file_reader directory. (enable console_output for more info)

  • Support for video titles (omxplayer only).
    Can display a text on top of the videos.
    To be enabled by config key omxplayer.show_titles. Without a playlist file, titles are simply the videos' filename (without extension).
    If an M3U playlist is used, then titles come from the playlist instead.

    An easy way to create M3U files is e.g. VLC. For an example M3U file see assets/example.m3u

new in v1.0.4

  • new keyboard shortcut "k"
    skips the playback of current video (if a video is set to repeat it only skips one iteration)
  • new keyboard shortcut "s" stops the current playback. pressing s again starts the playback
  • reworked shortcut handling

new in v1.0.3

  • major new feature: copymode
    files will be copied from the usb stick to the player (with fancy progress bar)
    you can choose if the current files should be deleted beforehand (replace mode is default) or if files from the stick should be added (add mode)
    the copymode is protected with a "password" which is represented with a file on the drive (set it via the video_looper.ini for more infos see "copymode explained below"

  • advanced playlist feature: add _repeat_Nx to any filename (N is a positive integer) and file will be looped that many times (additional infos see below)

  • added reload.sh to restart the looper and reload the settings from the ini

new in v1.0.2:

  • in directory mode the directory is now monitored; if the number of files changes the playlist is regenerated (useful if the folder is filled e.g. via a network share)
  • some defaults have changed
  • new option for the countdown time (default is now 5 seconds)
  • new option for a wait time between videos (default is 0 seconds)
  • tweaks to the install script (skip the build of hello_video by using (sudo ./install.sh no_hello_video))
  • cleanup of the directory structure
  • added enable.sh analogous to disable.sh
  • added ntfs and exfat support for the usb drive

new in v1.0.1:

  • reworked for python3
  • keyboard control (quitting the player)
  • option for displaying an image instead of a blank screen between videos

How to install

sudo apt-get install git
cd ~
git clone https://github.com/adafruit/pi_video_looper
cd pi_video_looper
sudo ./install.sh

Default player is omxplayer. Use the no_hello_video flag to install without the hello_video player (a bit faster to install):
sudo ./install.sh no_hello_video

How to update

An update is always like a fresh installation so you will loose custom changes made to the /boot/video_looper.ini

For backing up the current ini:
sudo cp /boot/video_looper.ini /boot/video_looper.ini_backup

For the update:
cd ~
sudo rm -rf pi_video_looper
git clone https://github.com/adafruit/pi_video_looper
cd pi_video_looper
sudo ./install.sh

Features and settings

To change the settings of the video looper (e.g. random playback, copy mode, GPIO control, advanced features) edit the /boot/video_looper.ini file, i.e. by quitting the player with 'ESC' and logging in to the Raspberry with an attached keyboard, or remotely via ssh. Then edit the configuration file with sudo nano /boot/video_looper.ini.

Alternatively insert the SD card into your computer and edit it with your preferred text editor.

copymode explained:

By default, the looper plays any video files from a USB drive in alphabetical order. With copymode, you only need a USB drive once, to copy the video files directly onto the RPi's SD card. Once enabled in the video_looper.ini, all files from an attached USB drive are copied onto the RPi. A progress bar shows you, well, the progress of the operation.

To protect the player from unauthorised access you need to create a file on the drive called "videopi". The extension doesn't matter. This file acts as a password. (The wording of this "password" can be changed in the video_looper.ini)

You might also want to decide if new files on the drive should replace existing files or get added. "Replace" means that any existing videofiles on the RPi get deleted, and only the new files remain.
This setting can be overruled by placing a file named "replace" or "add" on the drive.
The default mode is "replace".

Note: files with the same name always get overwritten.

notable things:

  • you can have one video repeated X times before playing the next by adding _repeat_Nx to the filename of a video, where N is a positive number

    • with hello_video there is no gap when a video is repeated but there is a small gap between different videos
    • with omxplayer there will also be a short gap between the repeats
  • if you have only one video then omxplayer will also loop seamlessly (and with audio)

  • to reduce the wear of the SD card and potentially extend the lifespan of the player, you could enable the overlay filesystem via raspi-config and select Performance Options->Overlay Filesystem

Control

The video looper can be controlled via keyboard input or via configured GPIO pins. Keyboard control is enabled by default via the keyboard_control setting in the video_looper.ini file.

keyboard commands:

The following keyboard commands are active by default (can be disabled in the video_looper.ini):

  • "ESC" - stops playback and exits video_looper
  • "k" - sKip - stops the playback of current file and plays next file
  • "b" - Back - stops the playback of current file and plays previous file
  • "s" - Stop/Start - stops or starts playback of current file
  • "p" - Power off - stop playback and shutdown RPi
  • " " - (space bar) - Pause/Resume the omxplayer and imageplayer
  • "o" - next chapter (only omxplayer)
  • "i" - previous chapter (only omxplayer)

GPIO control:

To enable GPIO control you need to set a GPIO pin mapping via the gpio_pin_map in the control section of the video_looper.ini. Pins numbers are in "BOARD" numbering - see: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html. Bridge a mapped pin with a Ground pin to trigger it.

The pin mapping has the form: "pinnumber" : "action”. The action can be one of the following:

  • a filename as a string to play
  • an absolute index number (starting with 0)
  • a string in the form of +n or -n (with n being an integer) for a relative jump
  • a keyboard command (see above) in the form of a pygame key constant (see list: https://www.pygame.org/docs/ref/key.html)

Here are some examples that can be set:

  • "11" : 1 -> pin 11 will start the second file in the playlist
  • "13" : "4" -> pin 13 starts the 5th video
  • "16" : "+2" -> pin 16 jumps 2 videos ahead
  • "18" : "-1" -> pin 18 jumps one video back
  • "15" : "video.mp4" -> pin 15 plays a file with name "video.mp4" (if it exists)
  • "19" : "K_SPACE" -> pin 19 sends the "space" keyboard command, pausing the current video
  • "21" : "K_p" -> pin 21 sends "p" keyboard command and thus triggers the shutdown of the Raspberry Pi

For your convenience, these exact mappings can be easily enabled by uncommenting the example line in the video_looper.ini. You can also define your own mappings.

Note: to be used as an absolute index the action needs to be an integer not a string. Note 2: "keyboard_control" needs to be enabled in the ini for gpio to utilise keyboard commands.

Troubleshooting:

  • nothing happening (screen flashes once) when in copymode and new drive is plugged in?
    • check if you have the "password file" on your drive (see copymode explained above)
  • log output can be found in /var/log/supervisor/. Enable detailed logging in the video_looper.ini with console_output = true.
    Use sudo tail -f /var/log/supervisor/video_looper-stdout* and sudo tail -f /var/log/supervisor/video_looper-stderr* to view the logs.
  • It’s currently doubtful if the pi_video_looper (which requires the legacy Raspberry Pi OS because of its omxplayer dependency) runs on the new Raspberry Pi 5.

pi_video_looper's People

Contributors

adafruit-mike-stone avatar ahihi avatar brennen avatar christiansievers avatar danbaigo avatar jezek avatar kajin41 avatar lyptik avatar pujan14 avatar redacted99 avatar subicura avatar tdicola avatar tofuschnitzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pi_video_looper's Issues

Random play order

I'm in love with your project here and thank you so much.
I do wish there was a random ordering to the videos played.
I used this for digital decoration effects for halloween and having the files play in the same order as they are on the usb storage makes it lose some of it's affect. Would love to be able to randomize the play order.
Like making an array of filenames that are possible to play and using the python random.choice() function.

NTFS usb possible

I have files that are over 4gb in size is it possible to let the raspberry read ntfs format usb's?

Aspect Ratio

Trying to change the aspect ratio of the video looper to 4:3. I can't find any methods to change it. Is it possible to change the aspect ratio?

Installing hello_video: Stuck at unpacking objects 60%

  • Platform/operating system: Raspbian Stretch -latest#

  • Error message you are receiving, including any Python exception traces:

pi@raspberrypi:~/pi_video_looper $ sudo ./install.sh
Installing dependencies...
==========================
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.3).
git is already the newest version (1:2.11.0-3+deb9u4).
python3 is already the newest version (3.5.3-1).
python3-dev is already the newest version (3.5.3-1).
supervisor is already the newest version (3.3.1-1+deb9u1).
omxplayer is already the newest version (20180905+git061425a-1).
python3-pip is already the newest version (9.0.1-2+rpt2).
python3-pygame is already the newest version (1.9.3+dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Installing hello_video...
=========================
Cloning into 'pi_hello_video'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (6/6), done.
Unpacking objects:  60% (25/41) 

I don't know why, but the setup seems to be stuck at unpacking pi_hello_video.
Can anyone confirm the error? What could be the cause?
Any suggestions on how can I fix this?

omxplayer keys not working

I've seen this reported a couple times on the AdaFruit forums, but no-one seems to have a solution. I'm opening this issue simply as a means of tracking the issue. OmxPlayer on its own responds to keyboard commands (play/pause/rew/etc.) just fine, but not when being run through the looper script. It seems that keys have no effect when looping. For the most part, the looper is meant to run unattended, but there are times when something goes wrong, the power goes out, or something else happens that's outside of your control, and restarting the playlist from the beginning is not always appropriate. The ability to fast forward and "catch up" with where the video should be is sometimes very important.

Whatever is wrong seems to be in the interaction between the looper script and omxplayer.

scheduled playlist

hi is it possible to ad more directory sources, for example /home/pi/videos runs from 12-00 to 13-00 an than from 1301-1400 run videos from /home/pi/videos2

hello_video not working

On a fresh install on raspbian, on B+ model, the option to use Hello_Video is not working for me.
After boot, I can see the terminal window flick 5 times (exactly the number of .h264 videos I have on videos folder) As if the player tries to play 'em but fails instantly.

Omxplayer option works fine (with .mp4 videos) but I am looking for gapless transition between videos.

And just to make sure, I can call hello_video.bin from command line, and play every single .h264 video there is on the videos folder, so they are proper files, and hello_video.bin is compiled and working. It gotta be something very easy to fix.

Change messages into another language

Hi,
how (where !) can I change the messages like "Insert USB drive with compatible movie..." ?
I want to use the videolooper in another language.
I didn´t find the file, where I have to change the messages.
Thanks for your help!

Playlist

Hi.
Thanks for the great job on this video looper.

Is it possible to have a playlist of videos, and functions like next, previous, go-to-video-number-5, mute, etc !?

works for debian?

Not an issue but rather request or question.
I have computer with debian (not raspberry pi) that I would like to use for video looping. Would this script work for regular debian?

Open terminal window issue

Good afternoon,

I would like to know how can I open a terminal window when videos are playing. Is there any key combination?

Thanks in advance

Files on Sd card

I have this set up on a pi zero with a network share on the SD card once files are uploaded the video play doesn't see the files until the pi reboots. any help would be awesome.
Class photos via a network share that my class mates can add to!

Feature Request: Do not automatically start program after installation

this program essentially bricks your raspbian installation if you don't have ssh server enabled OR if you do but don't have access to a LAN. Following the running the install script the program just starts automatically. There is no way to stop it locally because keyboard control is disabled by default.

2 extremely simple solutions: Either don't automatically start the program after installation or at least enable keyboard control by default. If neither of these solutions are acceptable I think at the bare minimum a warning should be in the instructions letting the user know the only way to stop this program is via an ssh command

Increase gpu_mem to avoid hangs

Video playback was hanging for me after a few minutes and I was able to resolve it by increasing the GPU memory in /boot/config.txt. This could be added to the install script. gpu_mem=128 seems to work fine for me, but 256 also seems recommended (http://kodi.wiki/view/Raspberry_Pi_FAQ#Memory_Usage)

Issue: video hanging after a few minutes of playback
OS: Raspbian Jessie Pixel
HW: RPi 3
Fix: add "gpu_mem=128" to /boot/config.txt

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

location of video_looper.ini

How do I change the location of video.looper.ini from /boot to other dir?

I tried creating a symlink but it seems boot partition is vfat, and vfat dont support symlinks..

Playlist feature

When will the playlist feature be added for videos and pictures for the load screen??

Run in RO mode

Hi

Are there any instructions for running this in on a RO operating system?
Any log files that need to be moved elsewhere?

Thx.

Onboard screen solution? waveshare

Hello,

How do I get the video looper running with a waveschare screen that is directly mounted on the raspberry pi. Not thru HDMI?

If managed to get the player running more than often on hdmi but never on an onboard screen.

Hi has anyone found a way of looping each video for a set amount of time without increasing video length? eg. A one minute loop cycle for 30mins then proceed to next clip.

Thank you for opening an issue on an Adafruit Python library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:

    • If you are receiving an ImportError: No module named... error then a
      library the code depends on is not installed. Check the tutorial/guide or
      README to ensure you have installed the necessary libraries. Usually the
      missing library can be installed with the pip tool, but check the tutorial/guide
      for the exact command.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and power in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING
    SYSTEM HERE

  • Python version (run python -version or python3 -version): INSERT PYTHON
    VERSION HERE

  • Error message you are receiving, including any Python exception traces: INSERT
    ERROR MESAGE/EXCEPTION TRACES HERE
    *

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): LIST REPRO STEPS BELOW

debug mode?

Is there a simple way to get debug mode, to custom easily each module? not in fullscreen but windowed?

aspect mode distortion with Raspberry Pi 4

Using a Raspberry Pi 4, with the latest 2019-07-10-raspbian-buster-lite, omxplayer distorts videos to always fill the entire space of the screen. (normal behavior would be to display black bars around the video if the aspect ratio doesn't match)

This happens with versions 1.0.3 and the latest v.1.0.4 of this script. The same SD card when booted on a Raspberry Pi 3b+ doesn't do that.

I wonder if maybe the Pi 4 hardware has problems recognizing the screen size, so I've tried various screens, using both HDMI-to-HDMI cables as well as HDMI-to-DVI cables (when using a desktop screen that only has DVI input).
This is the result of /opt/vc/bin/tvservice -s, which fits the hardware specs, so I'm thinking it's correctly identifying the screen:
state 0x6 [DVI CUSTOM RGB full unknown AR], 1920x1200 @ 60.00Hz, progressive

[help wanted] Composite Output playing severely slower than HDMI output.

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.):
    Raspbian OS
    Raspberry Pi 3B
    installed & config edits made through both Win10 64-bit & MacOSX 10.13.4, no differences.

  • Python version (run python -version or python3 -version):
    python -version : 2.7.13
    python3 -version: 3.5.3

  • Error message you are receiving, including any Python exception traces:
    **I don't receive any error message; the issue I have is that when I output video through composite NTSC (sdtv_mode=0) the video plays back at approximately 1/5th of the supposed speed (audio included, so I don't think it's a frame rate issue).

This issue only happens when I boot up the Pi with a composite cable connected only, if I am only using the composite output for audio, (HDMI as video output) the composite audio output works at the proper speed (but there is no image being sent).

I've tried this with a few different pi's (the issue occurred after I did a wipe and re-install on all of our 27 pis in rotation)

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): **
  1. install pi_video_looper
  2. verify that sound is sent to both Composite & HDMI in video_looper.ini
  3. edit the config.txt file:
    a. disable hdmi_force_hotplug=1 (comment out or delete)
    b. Add sdtv_mode=0 to output to composite NTSC
  4. connect to composite TV (disconnect HDMI cable, otherwise it'll only output sound through composite)
  5. insert USB with compatible video.

the config file including the above edits: config.txt

Issue plugging usb

Good afternoon all,

I am quite begginer on this, I have installed video looper without a problem. The problem comes when I plug the pen drive and does not play the content. I have realised when I plug it, RPI recognised the pendrive but does not read it?

When I stop the application, there is an Authentication windows to authenticate the USB DISK. Is there any where to disable this option?

Looking forward to hear from you guys.

Many thanks in advance :)

P.S I've Raspberry Pi 3 (Model B).

Exfat usb read

I've followed the lines of htpcguide to properly mount an exfat usb on a raspberry pi.

But when I install the video looper. The raspberry flickers between a black screen and the os ui.
If I then pullout the usb it shows the screen to put the usb in to play a movie.

So it reads the usb but from there on out it doesn't work. Tried HFS+ , NTFS and none works.

I need to get a file bigger than 4.3 gig on the video looper.

no files found in home/pi - when using hello_video

Hello,

when I try to use video-looper with the hello_video option, it says no files found in home/pi, although there is a .h264 video file (I normally can play this with hello_video- its te test.h254 from the hello_video folder...*)- what can I do to make video_looper play this file with hello_video?

I already tried to remove the volume parameter as proposed in #6 but that did not help.

Best regards

Adriana

*when doing hello_video.bin ./myfile.h264 directly

Shutting Down

Hi,
I want to use the pi_video_looper for a project, but I am not sure how will be the best way to shut down, because on the installation I just have the pi connected directly to a TV with the HDMI. And I read that if I yank out the power cord as will corrupt the Pi's SD card and require a full operating system and video looper reinstallation.

Thanks!

TCP status calls?

Hi!

Could it be possible to add a feature for this project so that there's a tcp shouting playing data about the current playback?

Would be handy for my project!

Videlooper.ini not found on boot

I'm installing 30 raspberry pi's and using 2 pi's to install them all.

1 pi is using a hdmi monitor standard and everything is installing very well.

2 pi is using a 7inch display and the first 3 loopers installed fine. From then on, it says installation finished. But when I try to put the sd card in to my computer to change the directory then the 2th pi doesn't show the videolooper.ini.
Would be nice to find a solution, because this one installs the fastest.

Frame not being filled

Is there another way of forcing my screen to give the full video, because at the moment I got full black borders. Tried all overscan possibilities. force hdmi. gave the correct mode and group for what edid gave me as anwser but nothing.

Image is still to small to fill the screen

What GPIO pins are in use Pi 2 model b for this looper?

Thank you for opening an issue on an Adafruit Python library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:

  • Do not use GitHub issues for troubleshooting projects and issues. Instead use
    the forums at http://forums.adafruit.com to ask questions and troubleshoot why
    something isn't working as expected. In many cases the problem is a common issue
    that you will more quickly receive help from the forum community. GitHub issues
    are meant for known defects in the code. If you don't know if there is a defect
    in the code then start with troubleshooting on the forum first.

  • If following a tutorial or guide be sure you didn't miss a step. Carefully
    check all of the steps and commands to run have been followed. Consult the
    forum if you're unsure or have questions about steps in a guide/tutorial.

  • For Python/Raspberry Pi projects check these very common issues to ensure they don't apply:

    • If you are receiving an ImportError: No module named... error then a
      library the code depends on is not installed. Check the tutorial/guide or
      README to ensure you have installed the necessary libraries. Usually the
      missing library can be installed with the pip tool, but check the tutorial/guide
      for the exact command.

    • Be sure you are supplying adequate power to the board. Check the specs of
      your board and power in an external power supply. In many cases just
      plugging a board into your computer is not enough to power it and other
      peripherals.

    • Double check all soldering joints and connections. Flakey connections
      cause many mysterious problems. See the guide to excellent soldering for examples of good solder joints.

If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:

  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.): INSERT PLATFORM/OPERATING
    SYSTEM HERE

  • Python version (run python -version or python3 -version): INSERT PYTHON
    VERSION HERE

  • Error message you are receiving, including any Python exception traces: INSERT
    ERROR MESAGE/EXCEPTION TRACES HERE
    *

  • List the steps to reproduce the problem below (if possible attach code or commands
    to run): LIST REPRO STEPS BELOW

random playback

Hi,
Thanks for the good work. How can I play videos in a folder randomly? I tried "is_random = true" and "#is_random = false" but non worked! what would be your suggestion?
thanks,

Monitor blank after 15min

I've did a lot of test before I put this issue on here.

But following still occurs, this being that after 15 ish minutes the monitor on my raspberry pi goes blank.
The green light then stops blinking on the raspberry and only the red light is on. I can still connect to ssh.
Changed adapter, sd card, raspberry Pi.

So my guess is that the screens goes black due to the monitor or due to the raspberry pi that can't get the screen back on the monitor.

Help is needed 👍

Issue during ./install.sh (pyudev)

I'm trying to build another Raspberry Pi with the video looper, and it seems the install is having issue under the Installing video_looper program... section, and remains stuck at installing pyudev.

Installing dependencies...
==========================
Hit:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.3).
git is already the newest version (1:2.11.0-3+deb9u2).
python-dev is already the newest version (2.7.13-2).
supervisor is already the newest version (3.3.1-1+deb9u1).
omxplayer is already the newest version (20170330~134343-2).
python-pip is already the newest version (9.0.1-2+rpt1).
python-pygame is already the newest version (1.9.3+dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Installing hello_video...
=========================
Cloning into 'pi_hello_video'...
remote: Counting objects: 32, done.
remote: Total 32 (delta 0), reused 0 (delta 0), pack-reused 32
Unpacking objects: 100% (32/32), done.
make: Entering directory '/home/ladmin/pi_video_looper/pi_hello_video/libs/ilclient'
for i in ilclient.o ilcore.o; do (if test -e "$i"; then ( rm $i ); fi ); done
make: Leaving directory '/home/ladmin/pi_video_looper/pi_hello_video/libs/ilclient'
make: Entering directory '/home/ladmin/pi_video_looper/pi_hello_video/hello_video'
for i in video.o; do (if test -e "$i"; then ( rm $i ); fi ); done
make: Leaving directory '/home/ladmin/pi_video_looper/pi_hello_video/hello_video'
make: Entering directory '/home/ladmin/pi_video_looper/pi_hello_video/libs/ilclient'
cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c ilclient.c -o ilclient.o -Wno-deprecated-declarations
cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c ilcore.c -o ilcore.o -Wno-deprecated-declarations
ar r libilclient.a ilclient.o ilcore.o
ar: creating libilclient.a
rm ilcore.o ilclient.o
make: Leaving directory '/home/ladmin/pi_video_looper/pi_hello_video/libs/ilclient'
make: Entering directory '/home/ladmin/pi_video_looper/pi_hello_video/hello_video'
cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c video.c -o video.o -Wno-deprecated-declarations
cc -o hello_video.bin -Wl,--whole-archive video.o -lilclient -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L../libs/ilclient -L../libs/vgfont -Wl,--no-whole-archive -rdynamic
rm video.o
make: Leaving directory '/home/ladmin/pi_video_looper/pi_hello_video/hello_video'
cp hello_video.bin /usr/local/bin/
Installing video_looper program...
==================================
running install
running bdist_egg
running egg_info
writing requirements to Adafruit_Video_Looper.egg-info/requires.txt
writing Adafruit_Video_Looper.egg-info/PKG-INFO
writing top-level names to Adafruit_Video_Looper.egg-info/top_level.txt
writing dependency_links to Adafruit_Video_Looper.egg-info/dependency_links.txt
reading manifest file 'Adafruit_Video_Looper.egg-info/SOURCES.txt'
writing manifest file 'Adafruit_Video_Looper.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/usb_drive_mounter.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/model.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/directory.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/hello_video.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/video_looper.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/usb_drive.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/__init__.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
copying build/lib.linux-armv7l-2.7/Adafruit_Video_Looper/omxplayer.py -> build/bdist.linux-armv7l/egg/Adafruit_Video_Looper
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/usb_drive_mounter.py to usb_drive_mounter.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/model.py to model.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/directory.py to directory.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/hello_video.py to hello_video.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/video_looper.py to video_looper.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/usb_drive.py to usb_drive.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_Video_Looper/omxplayer.py to omxplayer.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_Video_Looper.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_Video_Looper.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_Video_Looper.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_Video_Looper.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_Video_Looper.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/Adafruit_Video_Looper-1.0.0-py2.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing Adafruit_Video_Looper-1.0.0-py2.7.egg
Removing /usr/local/lib/python2.7/dist-packages/Adafruit_Video_Looper-1.0.0-py2.7.egg
Copying Adafruit_Video_Looper-1.0.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adafruit-Video-Looper 1.0.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/Adafruit_Video_Looper-1.0.0-py2.7.egg
Processing dependencies for Adafruit-Video-Looper==1.0.0
Searching for pyudev
Reading https://pypi.python.org/simple/pyudev/
Download error on https://pypi.python.org/simple/pyudev/: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:661) -- Some packages may not be found!
Couldn't find index page for 'pyudev' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/

Video Looper incompatibilities with Adafruit read only filesystem scripts

It seems that there are incompatibilities between the video looper and read only filesystem solutions provided kindly by Adafruit.

To me, these two should be able to go together, as a video looper should be able to have its plug pulled at any point without needing a keyboard etc to shut down.

The video looper appears to run using the systemctl service, however this breaks when the read only filesystem is introduced for some reason. As well as this, once the filesystem is read-only, the mountpoint also cannot be created

Perhaps an addition to the scripts could be the option of having the method of startup happen through a different method, as well as adding to the read only filesystem scripts to have /mnt exist as a tmpfs.

Here are the two things I did to solve the video looper not working after the read only filesystem scripts were implemented (I know they could be more elegant, but they work):

  1. Added startup of the video looper to /etc/rc.local with this line added before "exit 0":
    python3 -u -m Adafruit_Video_Looper.video_looper &

  2. Added a mountpoint to /etc/fstab to allow /mnt to exist in ram, and therefore be writeable:
    tmpfs /mnt tmpfs nodev,nosuid 0 0

I now have a fully functioning read only video looper that can be plugged and unplugged without worry for our installations.

Unable to mount the usb key RW

I modified the folloing line in /boot/video_looper.ini from:

readonly = true

to:

readonly = false

But the key is still set readonly.

issue with setting window size to pass into omxplayer

So I have been trying to use your video_looper on a Square 960x960 Samsung monitor for art installation, and when I edit the video_looper.ini to try set the --win '0 0 960 960' arguments into the section for them they don't seem to pass over into omxplayer, and the video is squished vs play fullscreen properly.

extra_args = --win '0 0 960 960' --no-osd --audio_fifo 0.01 --video_fifo 0.01

If I use omxplayer alone to play a single video that is formatted at 960x960 with those arguments it displays the videos correctly at the correct aspect ratio and is not squished my on my monitor.
But when I play them using video_looper they get squished.

Been racking my head around it and would love some help with this issue, if at all possible, not sure if I am doing something wrong.
Thanks.

Audio level output is low, how can I increase

Quick question before halloween where we are using the looper.
The audio feedback from the Py audio jack is low.

I read in the ini file that this can be adjusted. just no clue how.

Sound volume output for the video player will be read from a file near the

video files. If the file does not exist, a default volume of 0db will be used

sound_vol_file = sound_volume

Do I need to create a file on the USB drive where my movie is that has a specific name and content to set the audio output level?
Please advise as this will be a key feature in our setting.

Many thanks in advance

Loop Once

Hi,

Thanks for your great work. Is there option to play the list only once? If not, I would suggest adding this feature.

Check for file change in directory mode

I see you already thought about this one,

Why not use stat on the folder?

Store the output of "stat -c %y /path/to/folder/" and compare it at every loop, if it changes you know the content of the folder was modified and it hardly takes any time:

real 0m0.043s
user 0m0.010s
sys 0m0.000s

Now, I know what your thinking... but I don't know KungFu... er I mean Python and when I tried modifying a simple text string in usb_drive_mounter.py to change the message that is displayed on screen saying "insert usb key etc..." the video looper wouldn't start anymore... So not much luck there :(

Had to undo the change to get it going again.

playlist

Instead of scanning a directory for videos, could you make an option to input a playlist in whatever format. For the thing I need, in one sequence, I'd replay one of the videos several times, and having several copies of the same video is not so cool. I'd like to fork it and do it myself, but I haven't used python before, so I'd need a couple of days at least to get a hang of it and I haven't got them. Rather than making an option, could you tell me the idea here? I've read the code a bit, found where it scans for files, but getting just the file list without the rest of the parameters you're getting from the files themselves is not gonna work.
Thanks in advance

Can't exit pi_video_looper with ESC

I have a pi that will be off the network and need to control config settings with a keyboard and mouse. So, I need to be able to exit the looper.

I looked at the many threads and added to one, but we were unable to resolve the issue (https://forums.adafruit.com/viewtopic.php?f=8&t=143884&p=735884#p735884).

Steps so far:

  • verified the correct version of the looper, and that it has the ESC code for exiting the program
  • verified the .ini file had keyboard control turned on
  • checked keyboard and locale settings
  • replaced physical keyboard

Note that I do not see the "press escape" notice.

Any help would be much appreciated!

20s Single Video

I have a couple of video clips that are 20s long with a time code burn. When I place them on a flash drive with multiple clips they play through. The issue is when they are the only clip on the drive, they loop at the 16s point. The Product is a Raspberry Pi 2B. It has had every update except firmware. Any ideas on how to correct this?

I am using omxplayer, It has not been tested on hello_video.

BTW - Great Program!!

Thanks, Chad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.