I had some videos (actually a folder that one more level of folders and finally video files).
I wanted to generate .xspf
files for the whole folder, where each subfolder became a playlist. i.e I wanted to generate multiple files (one corresponding to each folder)
XSPF files are used by VLC to store a string of videos. You can open the file with VLC and it will play them as a playlist, allowing prev/next video.
tree.js
is used for generating the tree structure of the root folder, as an object.- All leaves are .mp4 videos, values being the duration in ms.
- Set the destination in the function it exports (as an arg).
- Run the file
node tree.js
, then copy the output to a JSON file and run a formatter.
file-gen
- Set the JSON file destination in the function it exports (as an arg).
- Run the file
node tree.js
. XSPF files are generated.
Video courses, especially downloaded ones, like Coursera etc.
I start a server on the download device via npm package http-server, i.e. http-server .
.
Now I can see the video on all devices on my home network. Hope VLC is sandboxed.