Jump to content
  • 0

User defined Scripts not working


lord_of_cinder
 Share

Question

I followed this guide https://resources.antmedia.io/docs/user-defined-scripts. I use this file https://github.com/ant-media/Scripts/blob/master/vod_transcode.sh to convert mp4 files to hls, but when I upload vod mp4 file, I don't get any m3u8 files. And when I run it manually I get the following errors:

image.png.6f62bfd8c45848130b6045b2978c2519.png

and

image.png.3faaffa920528007b5dd0a6ae7659aec.png

My setting file red5-web.properties
 

#Sat Oct 01 01:31:28 GMT 2022
settings.dataChannelPlayerDistrubution=all
db.app.name=LiveApp
settings.s3AccessKey=
settings.endpoint.healthCheckPeriodMs=2000
settings.webRTCFrameRate=30
settings.enableTimeTokenForPlay=false
settings.dash.llEnabled=true
settings.vodFolder=
settings.webRTCEnabled=true
settings.jwtControlEnabled=false
settings.h265Enabled=false
settings.dataChannelEnabled=false
settings.objectDetectionEnabled=false
settings.h264Enabled=true
db.name=liveapp
settings.stalkerDBServer=
settings.stalkerDBPassword=
settings.dashMuxingEnabled=false
settings.dash.hlsEnabled=false
webapp.virtualHosts=*
settings.hashControlPlayEnabled=false
webapp.contextPath=/LiveApp
settings.webrtc.portRangeMin=50000
settings.playTokenControlEnabled=false
settings.publishTokenControlEnabled=false
settings.vp8Enabled=false
settings.s3StorageClass=\ STANDARD
settings.uploadExtensionsToS3=7
settings.hlsflags=
settings.s3BucketName=
settings.stalkerDBUsername=
settings.allowedPublisherCIDR=
settings.playJwtControlEnabled=false
settings.webhookAuthenticateURL=
webapp.dbName=liveapp.db
settings.rtspTimeoutDurationMs=5000
settings.hlsTime=2
settings.acceptOnlyStreamsInDataStore=false
settings.webrtc.portRangeMax=60000
settings.previewGenerate=false
settings.tokenControlEnabled=false
db.type=mapdb
settings.endpoint.republishLimit=3
db.password=
settings.forceAspectRationInTranscoding=false
settings.deleteHLSFilesOnEnded=false
settings.dash.llHlsEnabled=false
settings.encoderSettingsString=[{"videoBitrate"\:500000,"forceEncode"\:true,"audioBitrate"\:32000,"height"\:240},{"videoBitrate"\:2000000,"forceEncode"\:true,"audioBitrate"\:256000,"height"\:1080}]
settings.addDateTimeToMp4FileName=true
settings.vodUploadFinishScript=
settings.listenerHookURL=
settings.hlsListSize=5
settings.streamFetcherRestartPeriod=0
settings.hlsEncryptionKeyInfoFile=
db.user=
settings.s3Endpoint=
settings.timeTokenSubscriberOnly=false
settings.hlsPlayListType=vod
settings.deleteDASHFilesOnEnded=true
settings.publishJwtControlEnabled=false
settings.jwtSecretKey=
settings.s3SecretKey=
settings.enableTimeTokenForPublish=false
settings.hlsMuxingEnabled=true
settings.mp4MuxingEnabled=false
settings.maxResolutionAccept=0
tokenHashSecret=
settings.replaceCandidateAddrWithServerAddr=false
settings.jwtStreamSecretKey=
settings.webMMuxingEnabled=false
settings.remoteAllowedCIDR=127.0.0.1
settings.createPreviewPeriod=5000     
settings.ipFilterEnabled=false
settings.s3RegionName=
settings.previewOverwrite=false
settings.s3RecordingEnabled=false
db.host=localhost
settings.s3Permission=public-read
settings.hashControlPublishEnabled=false
settings.vodUploadFinishScript=/usr/local/antmedia/webapps/LiveApp/WEB-INF/scripts/vod_transcode.sh

 

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Posted Images

1 answer to this question

Recommended Posts

  • 0

Hi @lord_of_cinder
I hope you are fine. 
It appears that there is a problem with the mapping of the audio stream. Could you please check whether the mp4 file contains audio?
For reference please take a look at this stackoverflow post.

Also please check out the following link to use vodUploadFinishScript:
https://stackoverflow.com/questions/72606811/how-to-transcode-the-uploaded-vod-files-and-play-them-as-hls-in-ant-media-server

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...