2019-12-28 EFV fully customizable segment-storage paths
Around months 3 and 4 this year, users requested customizable folders for transcoded videos and segments. I delayed it because it seemed cumbersome, but with improved skills I have now implemented advanced customization so everyone can define their own segment paths.
Features
Replacement variables: {yy} for year 2019, {mm} for month 04, {dd} for day 21, {id} for the unique 24-character ID, {name} for the video name, {random} for random 6 characters separating resolutions, and {hd} for a resolution such as 720.
For example, an EFV segment directory {yy}{mm}/{dd}/{id}/{random} produces /videos/201912/28/5e070410c28c28211c3d6c2c/f57554/index.m3u8.
Here {yy}{mm} becomes 201912, {dd} becomes 28, {id} becomes a unique 24-character identifier and {random} becomes random 6 alphanumeric characters separating resolutions of the same video.
Example
User A wants to build an EFV upload interface that stores segments by uploaded filename and returns the final m3u8 path, usable as soon as transcoding finishes. That m3u8 can be predicted through custom paths.
No endpoint beyond the upload API is needed. Set the path to {yy}{mm}{dd}/{name}/{hd}.
For uploaded aishangni.mp4, the frontend can immediately construct /videos/20191228/aishangni/720/index.m3u8 and return it to the user. Any path can be customized conveniently.


