Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

Original
3
Become a Fan
7.6

Description:
Sampler (PG).lua - is modified and improved sampler. Now it works as a playlist generator (PG) also in VLC-2.1+.
It is VLC Lua Extension that generates samples of playlist items of desired duration. Now you can create a music collage, automatically preview your film collection, skip intro and credits in series, shuffle tracks, ...

sampler.lua - The extension works in VLC-2.0.x. VLC archive: http://download.videolan.org/vlc/
It plays samples of playlist items of desired duration.
With this extension you can automatically preview your film collection or play interesting sound collage from your music files.

Automatic DOWNLOAD & INSTALLATION of the extension is now (VLC-2.2) available through the Addons Manager in VLC menu (Tools > Plugins and extensions).

Manual DOWNLOAD & INSTALLATION:
DOWNLOA
- click the download button below
- save the .zip file
INSTALLATION:
- extract (unzip) the .lua file and put it in the VLC subdir /lua/extensions, by default:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\VLC\lua\extensions\
* Linux (all users): /usr/lib/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
(create directories if they don't exist)
- restart the VLC.
USAGE:
Then you simply start the extension by going to the "View" menu or "Vlc > Extensions" on Mac OS X.
Last changelog:

Sampler (PG) 1.0 (22.5.2014)
- modified sampler now works as a playlist generator also in VLC-2.1+
- [Read playlist], [Clear playlist], [Feed playlist] buttons
- set 0 "Samples per item" or "Sample duration" to play all between "Skip begin/end" (intro/credits).
- "Shuffle tracks" and "Autofeed on last track"

Sampler 1.1 (26.5.2013)
- applied "go to time" workaround; now the extension works also in VLC 2.0.x
- randomization of pseudo-random generator
- minor changes in the code

Sampler 1.0 (23.3.2012)
- initial release; works in VLC1, does not work properly in new VLC2
- Ticket #6527: http://trac.videolan.org/vlc/ticket/6527


Ratings & Comments

36 Comments

userunbug

8 Almost perfect addon! But I am missing something. Let's say someone is watching the samplers and there is a great music video in it. Now the one who wants to watch this one music video in full length. He presses any key, the sampler mode is exited, the music video is played in full length. After That the samplers continue, until another great song comes up which you want to see in full length. Can you improve that as feature?

mederi

The Sampler (PG) is already a compromise/workaround solution. The extension generates a static playlist. Lua scripting is quite limited in VLC. There is only pause/play (Space key) event available in extensions. Then it is possible to add and play a full length item in the playlist. Some cumbersome solution is really possible.

icarus

I've been using this little gem for a long time. Only one of its kind.Any plans to update or have you worked on something similar? I keep thinking how nice something like this would fair with potplayer or mpc.

mederi

I will check whether the extension works in new VLC 4 and it will be a good opportunity to improve something, too. What do you expect from update of this VLC Extension?

icarus

I was actually just seeing if you were still active on this or had forked off to something else. Its not your plugin its VLC's lack of hardware acceleration and plugins that make other media players so much better. There are only minor things i run into with Sampler that may or may not be my setup. Things like videos always starting at the same spot ( usually in a playlist ). Seeking causes the plugin to stop and play rest of video. But i've been looking for years for something similair for other media players and the best i can find are things like a bookmark jumper or playlist shufflers , so props for the unique plugin.

ralf

When I try to load the plugin by going to the "View" menu or "Vlc > Extensions", I get the error-messag: lua info: [Sampler] duration > 308.928215 lua info: [Sampler] samples_number > 1 lua info: [Sampler] skipper > 0 lua info: [Sampler] set_position #1 > 0 lua info: [Sampler] samples_positions > 1 lua info: [Sampler] actual_sample > #1 lua info: [Sampler] new position > 0 lua warning: Error while running script C:\Program Files\VideoLAN\VLC\lua\extensions\sampler.lua, function activate(): ...rogram Files\VideoLAN\VLC\lua\extensions\sampler.lua:76: attempt to call field 'add_callback' (a nil value) lua error: Could not activate extension! main warning: playback too early (-62246): down-sampling main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 1000 ms)

mederi

Use "Sampler (PG).lua" instead of "sampler.lua" (for old VLC 2) in current VLC version (3.0.11). Read the description here.

jmaia45

Ive been using this software for some time and it works great, but on some videos if I try to randomly sample very small pieces of the video (for example 1 second or less) it does not work as intended, playing for several seconds instead of only 1 second before changing sample. Like I said, this only happens to some videos, and I would like to know if i can do something to those videos to make them work properly with this addon.

mederi

It is out of control of this extension. You can either avoid formats that do not work well with very short durations or better do not use such short times. Try following setting in VLC preferences: Tools > Preferences > Show settings=All > Input/Codecs: Fast seek

jmaia45

woa, actually disabling the fast seek option works perfectlly, thanks you so much

vorticaland

10 10 the best

newbie67

thanks mederi for developing such a useful add-on. I have a question, is it possible to shuffle the items when "Samples per item" is more than 1. say I have 10 files/tracks and I have "Samples per item" as 5 this would create 50 items currently the 5 items in every file/track/sample are next to each other I want items within the sample to be shuffled as well in the same way you shuffle the tracks/files is this possible?

mederi

There is the "Random position" option. Do you want something like "Shuffle samples" when not in random position? |---S1---S2---S3---S4---| => S3, S1,S4,S2

newbie67

With shuffle tracks ON and random position ON, 3 tracks and 3 samples per track, the playlist would be like this, T3(S1-S2-S3)-T1(S1-S2-S3)-T2(S1-S2-S3) I am after T3S1-T1S3-T2S2-T3S3-T1S1-T2S3-T3S2..........

mederi

O.K. I have already written the "Mix playlists" script you can find around. The algorithm can be reused in Sampler(PG). Todo: - The option could be called "Mix samples" placed next to the "Shuffle tracks". - Another new option "Shuffle samples" could be placed next to the "Random position". - Skipper [s] (vs Samples per item). - rework, improve and polish the messy code.

newbie67

thanks mederi, It would be great to have those features built into the plug-in. Could you please let me know where I can find this "Mix playlists" and how to integrate this into this plug-in to get this working? I have tried a serach but could not find "Mix playlists".

mederi

https://addons.videolan.org/p/1167844/ I do not tell you how-to now. I remember the code is a bit messy - a rework with minimal effort, a prototype. Probably it requires more work to implement the feature. I will check it later.

mederi

I mean the Sampler PG is messy.

newbie67

thanks mederi. I could not get it to work. I would be happy to test it if you ever get a moment to do a prototype. Let me know.

newbie67

10 10 the best

almilion

9 +100

catdaddy

Would love to have this available for Android Samsung tablet? Was trying to download on my Android is this possible? Can't figure it out or is it only available on PC? If so can it be available on Android Samsung tablet?

mederi

VLC Extension Lua scripts are not supported in VLC for Android. You could try whether it is possible to run VLC for PC on Android (I have Googled a bit: Wine for Android?). You should try the extension in VLC on PC. The Sampler (PG) generates a playlist with playlist items containing star-time/stop-time advanced VLC options. Then you can save such a playlist with relative paths (VLC 3+) if you save it in the same local folder. Then you could try to run such a playlist with the same folder of media files in VLC for Android. You could let me know, whether VLC for Android supports playlists with advanced VLC options.

catdaddy

Thank You Mederi for reply so quickly! I am computer savvy, but not as savvy as to know what Wine for Android is or what it could do? Also, I am fine with using this script on my PC, but do not use my PC as much as my mobile Android Tablet device. Would be very cool and nice for it to be made into an Google Play App for Android device (Pleeeeease!?) I've looked EVERYWHERE and cannot find any similar app to play portions of random videos anywhere, seems very rare. Is frustrating because i would love to do this since i host multiple events and have work and house party events, which i would love to play my music and multiple video portions along with this. Can this be accomplished somehow one way or another? Even if it's a separate piece of software or integrated? I am not "programming language" literate, only computer savvy and very literate when it comes to integration, research, etc. This type of software is just NOT out there and available for anything. The only thing that comes close is "styxar video randomizer" which is both outdated and confusing to use. Could you check this piece of software out and replicate it or make something similar to use with Android and VLC devices etc? Thanks for the input, i will definitely try what you recommended and let you know what happens. I'm very much appreciated for your prompt and generous and informational reply. This is a wonderful piece of software you have developed and just needs research and developing. Heck, i'd pay for it. I'm sure others would too if so was elaborated, made for multiple devices, and simplified. Thanks & Cheers

catdaddy

PS. Plus the Styxar Video Randomizer software is both outdated and the developer is no longer available to purchase or contact for software key updates etc.

Pling
0 Affiliates
Details
license GPLv2 or later
version
updated
added
downloads 24h 1
mediaviews 24h 0
pageviews 24h 7

More VLC Extensions from mederi:

Time v3.2
mederi
last update date: 4 years ago

Score 8.4

txt subtitles loader
mederi
last update date: 6 years ago

Score 5.7

Jump to time Previous frame v3
mederi
last update date: 7 years ago

Score 5.7

Subtitler lite mod v1.3
mederi
last update date: 7 years ago

Score 6.4

WIP collection
mederi
last update date: 7 years ago

Score 6.8

Volume Reset to 100
mederi
last update date: 13 years ago

Score 6.5

Other VLC Extensions:

Multiple VLC enhancments
tubh
last update date: 13 years ago

Score 4.9

TUNE IN RADIO
willyboy63
last update date: 12 years ago

Score 5.0

Etevaldo Scopel
etevaldo
last update date: 12 years ago

Score 4.7

VLsub 0.9
nonkelleo
last update date: 12 years ago

Score 4.1

IP Webcam
manonlatramee62
last update date: 12 years ago

Score 5.1

TandN Co LLC
tandnone23
last update date: 10 years ago

Score 5.7



System Tags