How can i implementation finalize-script

jibri {
    recording {
        recordings-directory = "/srv/recordings"
        finalize-script = "/srv/upload.sh"
    }
..........................................................
}

I want to send the files saved in this path in Jibri to a special service with these codes in the finalize script file. can i get it like this :

#!/bin/bash

# Replace with your API endpoint URL
API_ENDPOINT="https://your-api-endpoint.com/upload"

# Replace with your API authorization token
AUTH_TOKEN="your-authorization-token"

# Replace with the actual path of the recorded video file
VIDEO_FILE="/srv/recordings/recording.mp4"

# Send POST request to the API endpoint with authorization token and video file
curl -X POST -H "Authorization: Bearer ${AUTH_TOKEN}" -F "video=@${VIDEO_FILE}" "${API_ENDPOINT}"

Please do not post the same thing multiple times, thank you.

The script will have params one of those is the file that was saved. Here are the params that the script gets:

1 Like

I think I need to install jitsi-upload-integrations package on server and I need to set “finalize_recording_script_path”: “/usr/bin/jitsi_uploader.sh” in jibri config and keep commands in this file:

#!/bin/bash

# Replace with your API endpoint URL
API_ENDPOINT="https://your-api-endpoint.com/upload"

# Replace with your API authorization token
AUTH_TOKEN="your-authorization-token"

# Replace with the actual path of the recorded video file
VIDEO_FILE="/srv/recordings/recording.mp4"

# Send POST request to the API endpoint with authorization token and video file
curl -X POST -H "Authorization: Bearer ${AUTH_TOKEN}" -F "video=@${VIDEO_FILE}" "${API_ENDPOINT}"

Do I have to do exactly these for it to work as a whole?

Nope. You can use jitsi-upload-integrations to check the code and see how to use the parameters in your script.

Nope.

Thanks for be interested. what i want to do exactly is to save the conversations with jibri in a specific folder and when the recording is complete send the recording file to a custom 3rd party api what exactly do i need to do

How should my jitsi_uploader.sh file look

jibri.config

jibri {
    recording {
        recordings-directory = "/srv/recordings"
        finalize-script = "/usr/bin/jitsi-recording-service.sh"
    }
..........................................................
}

jitsi-recording-service.sh:

#!/bin/bash

# Replace with your API endpoint URL
API_ENDPOINT="https://your-api-endpoint.com/upload"

# Replace with your API authorization token
AUTH_TOKEN="your-authorization-token"

# the directory where the files and metadata exists
UPLOAD_DIR=$1
# sometimes we want to use a custom date, not the current upload time
UPLOAD_DATE=$2

# Send POST request to the API endpoint with authorization token and video file
curl -X POST -H "Authorization: Bearer ${AUTH_TOKEN}" -F "video=@${UPLOAD_DIR}" "${API_ENDPOINT}"```

Have you checked the links I sent? Have you tried something out to see how it works so you can write your script?
We are not here to do your work, sorry.

Unfortunately I haven’t tried it yet, thank you for your time.