Jump to content
  • 0

User-defined script not called (vodUploadFinishScript)


Karel
 Share

Question

In the red5-web.properties file of the LiveApp, I have this line

settings.mp4MuxingEnabled = true

settings.s3RecordingEnabled = true
settings.s3AccessKey = **** (omitted for security reasons)
settings.s3SecretKey = **** (omitted for security reasons)
settings.s3BucketName = my-bucket-name
settings.s3RegionName = us-east-1
settings.s3StreamsFolderPath = /recordings
settings.s3Permission = public-read
settings.s3StorageClass = STANDARD

settings.vodUploadFinishScript = /opt/scripts/vodUploadFinishScript.sh
settings.uploadExtensionsToS3 = 5

The script file itself has the right attributes

$ ll /opt/scripts/
drwxr-xr-x 2 root root 4096 Jan  3 09:50 ./
drwxr-xr-x 3 root root 4096 Jan  3 09:04 ../
-rwxr-xr-x 1 root root  148 Jan  3 09:50 vodUploadFinishScript.sh*

I'm sending a simple RTMP stream to the LiveApp. When I stop the publisher; the specified script never gets called. I don't see "running muxer finish script" anywhere in the logs. Everything else seems to work fine and there are no errors or warnings.

ant-media-server.log

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi @Karel
I hope you are doing well.
As I see, you're using the voduploadfinish script, which is called after any VOD file is uploaded to the server. If you want to do something after the recording is finished, you must use mp4 muxing user defined script. Please check out the following link: https://resources.antmedia.io/docs/user-defined-scripts?highlight=user#mp4-muxingrecording-finish-process

I hope it helps.

  • Like 1
Link to comment
Share on other sites

  • 0

Hi @Yash, what I need is a script that runs after the recording has been uploaded to S3. If I've understood correctly, the `muxerFinishScript` runs after the recording is finished on local disk.

AMS uploads all recordings to a single "folder" (S3 prefix), which isn't sustainable, so I'm trying to run a script that changes the S3 prefix ("folder name") of the file.

Link to comment
Share on other sites

  • 0
Posted (edited)

@Yash unfortunately that didn't work either. It looks like there's no guarantee that this script is called after the upload to S3 is complete. I've now solved it by adding a trigger on the S3 bucket and calling a Lambda function when an object with suffix "mp4" is created.

Thanks a lot for you help though. Much appreciated!

Edited by Karel
  • Like 1
Link to comment
Share on other sites

  • 0

Hi @Karel
Actually, the user-defined script is designed to perform operations on the server rather than the S3 bucket after the recording uploads to the bucket. You have already found a good solution to perform action on the s3 bucket by using a Lambda function.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...