-
Notifications
You must be signed in to change notification settings - Fork 245
/
Copy pathvideo_looper.ini
309 lines (248 loc) · 13.7 KB
/
video_looper.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# video_looper.ini
# Main configuration file for video_looper.
# The video_looper works right out of the box by playing any video files that
# are in the root directory of an attached USB drive.
# In this file you can change a lot of the video_looper's behavior, like what
# video player is used or where it looks for media files.
# Lines that begin with # are comments that will be ignored.
# Uncomment (=activate) a line by removing its preceding # character.
# Use ./reload.sh to restart the video_looper with any changed settings.
# Video_looper configuration block follows.
[video_looper]
# Set which video player will be used to play media files. Can be either omxplayer,
# hello_video or image_player. omxplayer can play common formats like avi, mov, mp4, etc. and
# with full audio and video, but it has a small ~100ms delay between videos.
# If there is only one video omxplayer can also loop seamlessly.
# hello_video is a simpler player that doesn't do audio and only plays raw H264
# streams, but loops videos seamlessly if one video is played more than once.
# The image_player only displays images and for the duration configured in this file under the "image_player" section.
# The default is omxplayer.
video_player = omxplayer
#video_player = hello_video
#video_player = image_player
# File Reader Location
# Where to find media files. Can be usb_drive, directory or usb_drive_copymode.
# When using usb_drive any USB stick inserted in to the Pi will be automatically
# mounted and searched for media files (only in the root directory).
# Alternatively the directory option will search only a specified directory on the SD
# card for media files.
# You can change the directory to be used in the [directory] section below.
# The default is usb_drive.
file_reader = usb_drive
#file_reader = directory
#file_reader = usb_drive_copymode
# Note on usb_drive_copymode:
# If you enable this mode, media files are copied from the USB stick to the path
# specified in the [directory] section below.
# see additional settings for copy-mode in the [copymode] section
# On Screen Display (OSD)
# Control whether informative messages about the current player state are
# displayed, like the number of media files loaded or if it's waiting to load them.
# Default is true to display these messages, but can be set to false to disable
# them entirely.
osd = true
#osd = false
# for how many seconds should the OSD and countdown be shown after files are found
countdown_time = 5
# Below you can set a wait time (in seconds) that is waited between each video.
# wait time is not honored for the first video that plays after starting a new playlist (e.g. after plugging in usb drive)
# when using a self looping player like hello_video wait_time is not waited between each repeat of one video but between different videos
# with omxplayer wait_time will also happen between every repeat of a video
wait_time = 0
# This option enables the display of the current date/time while waiting between the videos
# Please note that the RPi is not good at keeping the time so you need to setup NTP time sync or install a RTC module
datetime_display= false
#datetime_display = true
# This controls the format the date/time is displayed: (see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes)
# The below datetime_display can be on two lines if required. The top line is much bigger than the bottom line and suits the time better. The bottom line is more suited to the date. 'Thursday 13th February 2023' for example.
# If the bottom line not required just leave bottom_datetime_display_format empty.
# If the suffix is required after the day then %d{SUFFIX} should be put in the *_datetime_display_format.
# Some different examples of time and date are shown below with an example. (Only one pair of *_datetime_display_format should be without #)
# 24Hour:Minutes:Seconds on the top line, Day of week, day of month followed by the suffix (st, nd, rd etc), Month, Year ion the bottom line.
top_datetime_display_format = %H:%M:%S
bottom_datetime_display_format = %A %d{SUFFIX} %B %Y
# 24Hour:Minutes:Seconds on the top line, Year on the bottom line.
#top_datetime_display_format = %H:%M:%S
#bottom_datetime_display_format = %Y
# 24Hour:Minutes:Seconds on the top line, no bottom line.
#top_datetime_display_format = %H:%M:%S
#bottom_datetime_display_format =
# To play files in random order set this to true
is_random = false
#is_random = true
# resume last playlist item after restart
resume_playlist = false
#resume_playlist = true
# stop playback after each file
one_shot_playback = false
#one_shot_playback = true
# play videos on startup
# it is usefull to disable this if you want to trigger videos only by e.g. gpio
play_on_startup = true
#play_on_startup = false
# Set the background to a custom image
# This image is displayed between movies or images
# an image will be scaled to the display resolution and centered. Use i.e.
# bgimage = /home/pi/loader.png
bgimage =
# Change the color of the background that is displayed behind videos (only works
# with omxplayer and the image_player). Provide 3 numeric values from 0 to 255 separated by a commma
# for the red, green, and blue color value. Default is 0, 0, 0 which is black.
bgcolor = 0, 0, 0
# Change the color of the foreground text that is displayed with the on screen
# display messages. Provide 3 numeric values in the same format as bgcolor
# above. Default is 255, 255, 255 or white.
fgcolor = 255, 255, 255
# Output program state to standard output if true.
# Useful for debugging to see whats going on behind the scenes
console_output = false
#console_output = true
[control]
# In this section all settings to interact with the looper are defined
# Control the program via keyboard
# See the readme for the complete list of keyboard commands.
keyboard_control = true
#keyboard_control = false
# you can disable the keyboard control while a video is playing - in case of a looping video keyboard control will never work
# is meant to be used with one_shot_playback
keyboard_control_disabled_while_playback = false
#keyboard_control_disabled_while_playback = true
# This setting defines which Raspberry Pi GPIO pin (BOARD numbering!) will jump to which file in the playlist (first file has index 0)
# See: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#gpio for info about the pin numbers
# the pins are pulled high so you need to connect your switch to the selected pin and Ground (e.g. pin 9) - there is some debouncing done in software
# The accepted settings are like this: "pinnumber" : videoindex or "pinnumber" : "filename" or "pinnumber" : "-1" or "pinnumber" : "+1"
# its also possible to send "keyboard commands" like shutdown or pause (see readme for available keyboard commands)
# the format follows the pygame key list (https://www.pygame.org/docs/ref/key.html) see example below. "keyboard_control" needs to be enabled for this to work
# to enable GPIO set a gpio_pin_map like in the example below or just enable all the example mappings.
gpio_pin_map =
#gpio_pin_map = "11" : 1, "13": 4, "16": "+2", "18": "-1", "15": "video.mp4", "19": "K_SPACE", "21": "K_p"
# Example:
# Pin 11 starts the 2nd video in the playlist,
# pin 13 starts the 5th video,
# pin 16 jumps 2 videos ahead,
# pin 18 jumps one video back,
# pin 15 plays a file with name "video.mp4" (if it exists),
# pin 19 sends the "spacebar" to the looper, pausing the current video
# pin 21 sends the "p" key and thus triggers the shutdown of the Raspberry Pi
# you can disable the gpio control while a video is playing - in case of a looping video gpio control will never work
# is meant to be used with one_shot_playback
gpio_control_disabled_while_playback = false
#gpio_control_disabled_while_playback = true
# USB drive file reader configuration follows.
[usb_drive]
# The path to mount new USB drives. A number will be appended to the path for
# each mounted drive (i.e. /mnt/usbdrive0, /mnt/usbdrive1, etc.).
mount_path = /mnt/usbdrive
# Whether to mount the USB drives as readonly (true) or writable (false). It is
# recommended to mount USB drives readonly for reliability.
readonly = true
# Directory file reader configuration follows.
[directory]
# The path to search for movies when using the directory file reader.
# (see the file_reader section above to enable it)
path = /home/pi/video
# Copy-mode file reader configuration follows.
[copymode]
# this setting controls what happens when a USB drive is plugged in while in copymode
# (see the file_reader section above to enable it)
# the default setting "replace" deletes any files in the video directory and then copies the files from the USB drive
# You can 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 are always overwritten
mode = replace
#mode = add
# with this setting you can control if a file named "loader.png" should be copied from the drive to be used eg as a background
# the file is copied to /home/pi/loader.png
copyloader = false
#copyloader = true
# this setting defines a "password" that has to exist as a file (with the password as a filename) (extension does not matter)
# on the USB drive for the videolooper to accept videos from the USB drive
# default is videopi - you should consider changing it -
# if it is empty no check will be performed
# for maximum compatibility use only ascii characters
password = videopi
[playlist]
# This setting allows for a fixed playlist. See the example.m3u file in assets for the syntax.
# Path to the playlist file.
# If you enter a relative path (not starting with /) it is considered relative to the selected file_reader path (directory or USB drive).
# Leave empty to not use a playlist and play all the files in the file_reader path (directory or USB drive).
path =
#path = playlist.m3u
# ALSA configuration follows.
# This only applies when using omxplayer with sound = alsa.
[alsa]
# ALSA hardware device to use for sound output. This consists of the card
# number and subdevice number separated by a comma, e.g. '1,0'. Run
# 'aplay -l' to list available devices. If empty, the default output device is
# used.
hw_device =
#hw_device = 1,0
# Volume of the hardware device can be set using a text file provided with the
# video files. If the file does not exist, the hardware volume will remain
# unchanged. This setting specifies the name of the text file.
# The file should contain a single line with an amixer-compatible volume value,
# such as '50%' or '-10db'.
hw_vol_file =
#hw_vol_file = alsa_volume
# Name of the ALSA control to use for adjusting volume. Typically this will be
# 'PCM'. Run 'amixer -c N scontrols' (where N is the card number of your output
# device) to list available controls.
hw_vol_control = PCM
# omxplayer configuration follows.
[omxplayer]
# List of supported file extensions. Must be comma separated and should not
# include the dot at the start of the extension.
extensions = avi, mov, mkv, mp4, m4v
# Sound output for omxplayer, either hdmi, local, both or alsa. When set to
# hdmi the video sound will be played on the HDMI output, and when set to local
# the sound will be played on the analog audio output. A value of both will
# play sound on both HDMI and the analog output. A value of alsa will play
# sound through ALSA, using the device specified in the [alsa] section above.
# The both value is the default.
sound = both
#sound = hdmi
#sound = local
#sound = alsa
# Specify a sound volume output for the video player.
# The volume will be read from a file near the
# video files. If the file does not exist, a default volume of 0db will be used.
# To use this feature create a file in the same directory as the videos and name
# it the value defined below (like 'sound_volume' by default), then inside the
# file add a single line with the volume value in text to pass to omxplayer (using
# its --vol option which takes a value in millibels).
# NOTE: This may introduce audible quantization error. Using hw_vol_file will
# generally give better sound quality.
sound_vol_file = sound_volume
# Fixed playlists may embed titles, which can be shown. See playlist section above.
# If no fixed playlist is given, titles are simply filenames without extensions.
show_titles = false
#show_titles = true
# Title duration in seconds. -1 means endless.
title_duration = 10
# Any extra command line arguments to pass to omxplayer. It is not recommended
# that you change this unless you have a specific need to do so! The audio and
# video FIFO buffers are kept low to reduce clipping ends of movie at loop.
# Run 'omxplayer -h' to have the full list of parameters or see
# https://github.com/popcornmix/omxplayer#synopsis for all available options
# on Raspberry Pi 4 and 5 you can choose the HDMI output with --display 7 or --display 2
# without specifing --display both hdmi ports have the same output
extra_args = --no-osd --audio_fifo 0.01 --video_fifo 0.01 --align center --font-size 55
# hello_video player configuration follows.
[hello_video]
# List of supported file extensions. Must be comma separated and should not
# include the dot at the start of the extension.
extensions = h264
# image player configuration follows
[image_player]
# List of supported file extensions. Must be comma separated and should not
# include the dot at the start of the extension.
extensions = jpg, jpeg, gif, png
# Seconds an image is displayed
duration = 5
# Controls if images should be scaled to fit (shrink or enlarge) the display resolution. Default: true
scale = true
#scale = false
# Controls if images should be displayed centered. Default: true
center = true
#center = false