Sampler PG Original

VLC Extensions

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

3
7 .8
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:
DOWNLOAD:
- 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:

6 years ago

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

ralf

1 month ago

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)

Report

C

mederi

23 days ago

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

Report

jmaia45

2 months ago

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.

Report

C

mederi

2 months ago

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

Report

jmaia45

2 months ago

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

Report

10

vorticaland

5 months ago

10 10 the best

Report

10

newbie67

5 months ago

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?

Report

C

mederi

5 months ago

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

Report

10

newbie67

5 months ago

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

Report

C

mederi

5 months ago

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.

Report

10

newbie67

5 months ago

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

Report

C

mederi

5 months ago

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.

Report

10

newbie67

4 months ago

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.

Report

C

mederi

5 months ago

I mean the Sampler PG is messy.

Report

10

newbie67

5 months ago

10 10 the best

Report

9

almilion

1 year ago

9 +100

Report

catdaddy

1 year ago

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?

Report

C

mederi

1 year ago

Just search Google: how to run windows applications on android. You could try to run a portable VLC (no installation, just a decompressed VLC with manually created "portable" folder in VLC folder near vlc.exe) in Wine https://www.winehq.org/
I am not VLC developer, I have just written this Lua script for VLC. You can file your bug reports & feature requests at https://trac.videolan.org/vlc/

Report

C

mederi

1 year ago

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.

Report

catdaddy

1 year ago

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

Report

catdaddy

1 year ago

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.

Report

petkos01

2 years ago

Thanks for plugin. It works well. I have related issue. When I play created playlist, for a split of the second it shows beginning of the video and then jump into required start time. I know it must be VLC issue but may be you know how to deal with the issue. I tried it on recent VLC and Windows 10 x64.

Report

C

mederi

2 years ago

I cannot reproduce the issue in VLC 3.0.2 (Vista 32-bit). There is just a black screen only in some films for a split of a second. There is really nothing I can do about it. Perhaps it depends on a video format you are playing. You can report the :start-time VLC option issue and provide a video samples at https://trac.videolan.org/vlc

Report

phygal

5 years ago

Many thanks for this handy extension!

Report

jippjapp

5 years ago

Thanks for this plugin, it's a godsend.

I'll regularly get stability issues if I "overload" VLC (cache size? playlist parsing?) but the latest playlist generator functionality is a really elegant and stable compromise.

Thanks again!

Report

6 years ago

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

12345678910
62
product-maker vorticaland May 06 2020 10 the best
10 the best
product-maker newbie67 May 01 2020 10 the best
10 the best
product-maker almilion Mar 04 2019 9 excellent
+100
product-maker Kuchik Jun 23 2017 9 excellent
product-maker Nikk_ Jun 22 2017 9 excellent
product-maker cadewallace Jun 18 2014 9 excellent
product-maker pnon10s Jun 10 2014 9 excellent
product-maker colinhk124 Nov 03 2012 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
phygal
Feb 19 2015
jippjapp
Jan 14 2015
colinhk124
Nov 03 2012
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
GPLv2 or later
version
updated May 22 2014
added Mar 24 2012
downloads 24h
1
mediaviews 24h 0
pageviews 24h 22
System Tags addon gplv2-later