I hope you are fine and that the virus does not affect you.
I would like to listen to many music files from several folders, in order to select some of them for my videos. It will be long (I have more than 13 000 music files).
So, is there a media player that can play only the first 10 seconds of a file, then automatically skip to the next track, plays 10 seconds, and so on?
Thanks by advance, and keep safe.
+ Reply to Thread
Results 1 to 14 of 14
VLC go to Add Manager and add Sampler PG. Close and reopen VLC and choose it. Choose Music Sampler profile and it plays 15 seconds of each song. Songs must have metadata I found out unfortunately.
Sampler (PG) 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, ...
Enqueue your audio/video files in the playlist. Then:
1.) Press [ Read playlist ] button to read all playlist tracks with available duration. You will see total tracks and time information next to the button.
2.) Select a desired profile in the drop-down menu and load it by pressing [ Apply profile ] button. All fields will be updated with desired presets.
Feel free to add your own profiles by editing the Lua script in a text editor.
3.) You can set your own values if you are not happy with predefined ones.
Samples per item: how many samples you want to be generated for each playlist item.
Sample duration [s]: in seconds, how long each sample should be.
[ ] random position - tick it if you want samples to have random position rather than ordered sequentionally.
Skip begin/end [s]: - in seconds, how long part of each playlist item should be ignored at the beginning and at the end of it (intro and credits).
4.) Press [ Clear playlist ] button to prepare empty playlist for generated tracks.
5.) Tick [ ] Shuffle track if you want tracks to be shuffled. Tick [ ] Autofeed on last track if you want to automatically generate and enqueue a new batch of tracks when VLC starts to play the last track in the playlist. *The "Autofeed" feature is not reliable on my system (Windows XP).
6.) Finally press [ Feed playlist ] button to generate a batch of tracks in playlist. The generated tracks contain "start-time", "stop-time" VLC options. Press the button again to generate and enqueue another batch.
Start to play.
download portable mpv player
into same folder where mpv.exe is create portable_config folder (if there is not). Locate mpv.conf and add in there:
--end 15 keep-open
then drop as many files onto player and it will play only 15 seconds for each video and jumps into other video automatically
you can open folders as a playlist in mpv.
mpv --end=10 "path/to/yourfolder"
Last edited by butterw; 2nd Mar 2021 at 06:19.
Hello yyou guys,
Thank you for all your informations It is very nice of you.
Your instructions are well done, and I managed to add the "Sampler PG" extension (I needed to go to the "View Menu" to find the new possibility: "Samples playlist generator".
Now, as I am a Frenchman, I don't quite understand a few words, and feel very tired to try to translate all the informations, but never mind, tomùorrow I'll be fresh again!
I am not quite sure about the words "samples per items". What I think is: number of samplers must be equal to number of items"
I am stuck at creating the profile. I don't really know in which order I must process. Here is what I tried:
1. Read playlist
2. Profile "Music collage"
3. Sample duration = 12 (Maybe it should be "00:00:12"?
4. Feed playlist
5. Apply profile
But nothing happened. I'll try again another time.
Thanks for the portable soft. I installed it and created a portable_config folder and the mpv.conf file, in which I put "--end 15
keep-open" before saving it. (See image2)
But no success after loading my files.
I moved the mpv.conf under all the folders, and tried each time with dropped in musics files: I failed each time.
Maybe because all my files are just music files, and not videos.
I do not know how to create a command line with the right path...
Can you please show me an illustration?
See you tomorrow if you want.
mpv --end=10 "path/to/yourfolder"
Start (cmd) the command line from your mpv installation folder.
You get the info on what has played in the console (10s is short !) to copy-paste as required.
Tested on windows, works a treat.
If a GUI is a requirement try mpv.net.
I thank you once again. I tried what you wrote, with a folder containiong mp3 music files, but I got an error message:
What could it refer to? Do you know ?
I modified the path from "/" to "\", but still got the same error message alas.
So I tried another move:
I put my "Ziq" musics folder into the mpv folder and tried those command lines:
mpv --end=10 "E\mpv\Ziq": Failed
mpv --end=10 "mpv\Ziq": Failed
mpv --end=10 "Ziq":SUCESS!!!
Now the cmd lines show something like this (see image below) and the musics are played one after the other during 15 seconds. GREAT!
What I don't understand is why the mpv screen disappears sometimes, and sometimes completely stop. I guess it is because of the META informations. Never mind, I'll read the 267 pdf doc from times to times.
What I will now do is:
copy the mpv portable folder, and put it in every musics folder, to make the same operation (or put my folders into the mpv folder).
You save me a lot of times.
THAN YOU, BUTTERW!
- The path"E:\Ziq"
- using / or \ doesn't matter here and you can use relative paths for subfolders.
Some of the audio files have embedded cover art thumbnails which will be displayed by default. To not display them add --no-audio-display
The mpv manual is also available as a webpage. I suggest you take a look at default hotkeys for playlists such as >.
You're right, I forgot the":" when I wrote the path.
Please butterw, can you tell me if you know why the mpv screen is not visible, while I listen to my list?
I hear the musics, but have no display, except when there is a thumbnail: at this moment, mpv opens during 15 seconds, then shuts. Very strange!
It makes sense not to display a window if you are playing audio-files without cover art, but it can be configured:
- playing audio files in the terminal without displaying cover art: --no-audio-display
- always display the window for audio files: --force-window
You probably also want to force the display size in this case: --geometry=640x640
You're tremendous, thanks a lot
Hello, your solution is surely very good, then I need a little help, please.
I click on Read playlist, and it displays the numbers of musical items with the total time.
In second I choose a profile between 3:
Suppose I choose Music collage, then I Apply profile, numbers appear.
But what can I do know?
If I want to listen to the first 15 seconds of all the files, can you tell me how to fill the fields?
Have you tried yourself or are you just pasted what you read somewhere?