ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.31k stars 637 forks source link

Separate directory between source stream storage and Record file storage #4700

Open pigsmall01 opened 1 year ago

pigsmall01 commented 1 year ago

Hello, Regarding saving playback files, currently we see playback (.mp4) and livestream (.ts) files are saved in the same folder as "/usr/local/antmedia/webapps/WebRTCAppEE/streams" with How can we separate them?

We want to create a separate Storage just to hold our client's videos at our server, So that we can easily classify and retrieve when needed.

mekya commented 1 year ago

hi @pigsmall01 ,

Let us think of separating mp4 and ts files.

Btw, you can import your client's folder automatically to the Ant Media Server. They don't need to be in streams folder. Does that resolve your problem?

If it resolves your problem, this feature is available in 2.5.2 soon.

Regards

asharamseervi commented 1 year ago

Hi there, Once I also thought of the same use-case. I appreciate @pigsmall01 for creating this issue!

What he is trying to brief, while conducting live streaming session, or FFmpeg transcode session if adaptive streaming or recording is enabled, this produces mp4 according to configuration. Also, if user aren't willing to delete ts files, based on segment or length of video, there is mesh of unorganized content in stream directory, so to organize them, based on classification either HLS/Dash/MP4; content admins/moderators can organize based on their requirement.

PS: I'm trying to simplify with tree structure what I was trying to convey, kindly note that It's not perfect and can be worked out to simplify to manage and stay organized, this will be helpful specially who deals with streamed content like content moderators/operators!

streams
├─ session1
│  ├─ dash-segments
│  ├─ hls-segments
│  │  ├─ session1-1080p
│  │  ├─ session1-1080p-master.m3u8
│  │  ├─ session1-480p
│  │  ├─ session1-480p-master.m3u8
│  │  ├─ session1-720p
│  │  └─ session1-720p-master.m3u8
│  ├─ mp4
│  │  ├─ session1-1080p-master.mp4
│  │  ├─ session1-480p-master.mp4
│  │  └─ session1-720p-master.mp4
│  └─ session1
├─ session2
└─ session3

I understand this might not be carried out quickly but we can think off managing streamed content if someone is using Ant Media Server at mass level!

How?

Let's say, we need to drop stream data of 1080p from session1 while we wish to have session1-1080p-master.mp4, we may quickly delete session1-1080p directory & file session1-1080p-master.m3u8 and let session1-1080p-master.mp4 as it is.

Hey @pigsmall01, am I able to explain your use-case? You may correct me if there are any conflicts b/w ideology, please!