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.25k stars 623 forks source link

Import VOD files to AMS automatically #4535

Closed umtcylmz closed 11 months ago

umtcylmz commented 1 year ago

Use case: "I have 5 different storage disks. I want to send video files in these 5 disks to directly dashboard under VOD but I cannot."

asharamseervi commented 1 year ago

This is extremely important for all of us who would like to migrate to AMS. Any kind of plugin or in-built system for uploading videos through source links is appreciated.

mekya commented 1 year ago

Thank you for the comments @asharamseervi
I've set the priority to important.

asharamseervi commented 1 year ago

Hi @burak-58, @mekya @mustafaboleken, sorry for tagging, I was expecting this simple import from URL functionality for migration of content!

Can't we? https://user-images.githubusercontent.com/5942572/207850826-99d8c7e4-47b1-428a-8cac-cd584c3babbf.mp4

mekya commented 1 year ago

Hi @asharamseervi ,

No worries.

I've watched the video. Yes, we can. There are a couple of ways for doing that.

AMS support uploading video programmatically but it does not support download VoDs as built-in feature. As a solution

  1. There should be just a simple script to download and upload to the AMS
  2. A simple AMS app can be implemented and it can support downloading the VoDs.

I am happy to discuss further for both options above.

Which one sounds better to you?

asharamseervi commented 1 year ago

Thanks @mekya! I appreciate your research & solution.

For a short term, I would appreciate script; and for a long-term solution, I would appreciate app! I wasn't able to commence migrating content yet due to limitation; need to start migration asap. Let'me know, how to proceed further for it?

mekya commented 1 year ago

My pleasure @asharamseervi

I appreciate your contribution and being together in this journey. So I happy to help you with my best.

A typical quick solution is to get the mp4 file with wget and upload the file to Ant Media Server with curl command. Let me write these things when I'm back in a couple of hours.

mekya commented 1 year ago

I could not make it last night. I was not available. Sorry @asharamseervi

Here is the command that you download the mp4 file and upload it to the Ant Media Server. Server expect to have a real file name for name query with a mp4 extension.

wget -O file.mp4 {HTTP_URL}
curl --location --request POST 'http://{SERVER_ADDRESS}:5080/WebRTCAppEE/rest/v2/vods/create?name=file.mp4' \
--form 'file=@"/Write/full/path/of/mp4/file/file.mp4"'

Gentle reminder: In order to make the server responds the REST methods, take a look at the REST Guide

Please let me know if it works for you or I can help with anything

mekya commented 10 months ago

This feature is supported through importing directories with REST method. Check this out https://antmedia.io/rest/#/VoD%20Rest%20Service/importVoDs

Regards