Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

I want looping video for digital signage #2

Closed
root-afk opened this issue Jul 29, 2023 · 3 comments
Closed

I want looping video for digital signage #2

root-afk opened this issue Jul 29, 2023 · 3 comments

Comments

@root-afk
Copy link

I am sure someone wants a linux distro that plays a video one time and then stops but I am not that person

@sen-h
Copy link
Owner

sen-h commented Jul 29, 2023

Yes, that is definitely in the pipeline. I suspect I will probably implement a way to pass arbitrary arguments to mpv, with video looping tied to its own special shortcut, or perhaps just enable it by default. time will tell...
In the interim, you have a couple options:

The best solution is to probably just edit the relevant S03Video* script to your liking with the "--loop-playlist" flag.
See: https://mpv.io/manual/stable/#playback-control.

Alternatively, (this is not a very good idea) you could simply create a new larger video that is just the old video on repeat a large number of times.
something like: "ffmpeg -stream_loop 10 -i myvideo.mkv -c copy myvideo_looped.mkv" would create a video that repeats 10 times.
see "-stream_loop" at https://ffmpeg.org/ffmpeg.html#toc-Main-options.
It's worth mentioning the initramfs has a max size of (I think) 2GB, so I would recommend the disk or hybrid build style, not the ram one. Also you might be limited to 4GB files on disk. YMMV.

The last thing I can think of (and this is probably a very, very bad idea) is to simply specify the same video multiple times to vobu with the -v option or by creating a folder full of identical videos/symlinks to one video.
something like:
"vobu.sh -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv -v myvideo.mkv...."

Some things to know however:
When a video file is specified with -v, vobu stores the filename in an array,
When a directory is specified with -v, the find program is used to collect the videos. see: https://en.wikipedia.org/wiki/Find_(Unix)

Using "-v myvideo.mkv" at infinitum the maximum number of videos is probably limited by the max number of elements bash can store in an array... which is apparently an unlimited number?
See: https://www.gnu.org/software/bash/manual/html_node/Arrays.html
I suspect you would be limited by the largest number that the C language supports.
and I reckon you might have similar problems with find as well.

Now it is interesting that: "ISO 9660 filesystems can have up to 2 exp 32 blocks, i.e. 8 TiB" https://wiki.osdev.org/ISO_9660

So you could have (depending on the runtime/encoding/resolution of the video, your disk size, phase of the moon etc.) so many copies of the video on disk so as to be practically infinite.

But again, this most certainly not a good way to do this, I would just edit the S03Video* scripts.

hope that helps.

@root-afk
Copy link
Author

root-afk commented Aug 6, 2023

I am dissatisfied by your suggested workarounds

@sen-h sen-h closed this as completed Aug 9, 2023
@sen-h
Copy link
Owner

sen-h commented Aug 9, 2023

closed by 91f201d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants