1

I want to use Piper to transcode vidéos

I will call piper transcode in my code php like:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://my_server_piper:8080/jobs");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "    {\"pipelineId\":\"video/transcode450\",\"inputs\":{\"input\":\"url_video_mp4\",\"output\":\"/output_video_mp4\"}}");
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

I can verify the status of the job with this url "http://my_server_piper:8080/jobs/6e6960a770ba4bf58b9b3419006edcec"

My question: Can I detect the job status changing to "COMPLETED" with a callback function

Aminesrine
  • 2,082
  • 6
  • 35
  • 64

0 Answers0