Automatic Looping of Short Media

Discuss your Lua playlist, album art and interface scripts.
IDAIS
New Cone
New Cone
Posts: 1
Joined: 20 May 2015 06:04

Automatic Looping of Short Media

Postby IDAIS » 20 May 2015 06:15

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).

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Automatic Looping of Short Media

Postby mederi » 22 May 2015 20:47

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.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 13 guests