Page 1 of 1

Automatic Looping of Short Media

Posted: 20 May 2015 06:15
by IDAIS
I was wondering if it would be possible to create a plugin for VLC to automatically activate single-file looping for media (audio/video) under a certain duration (let's say, a minute).

This is, in particular, for short files intended for looping such as ambient noises, or "GIF" like videos (such as webms).

Re: Automatic Looping of Short Media

Posted: 22 May 2015 20:47
by mederi
Extensions needs manual activation in VLC menu, so Lua cannot help you when you play individual files.
If you use playlist and you do not mind manual activation of extension, then you could write an extension script, that will check duration when starting to play a media and activate the repeating within input_changed() or meta_changed() functions. Then it will need your interaction to disable the reapeating to go to play next file in playlist.
Or you can manually prepare playlist where short files will have "input-repeat=x" VLC option.
Playback control:
--input-repeat=<integer [-2147483648 .. 2147483647]>
Input repetitions
Number of time the same input will be repeated
VLC Extension Lua script could help you to generate it from your files loaded in VLC playlist (Sampler (PG) reads the VLC playlist and generates (feeds) new playlist with items having advanced VLC options: start-time, stop-time).
If VLC plugin, then C++, not Lua.