vidinfra
  1. Encoding profile
vidinfra
  • Documentation
    • Guides
      • Welcome
      • Getting Started
        • What is Vidinfra?
        • Quick Start Guide
        • Publish First Video
        • FAQs
      • Upload & Import Videos
        • Upload from Device
        • Import from Vimeo
        • Import from YouTube
        • Import from Zoom
      • DRM
        • Widevine DRM
        • FairPlay DRM
      • Accounts
        • Accounts
      • Organization Settings
        • User Management
        • Billing
        • Settings
  • API Reference
    • Projects
      • Get projects list
      • Get project
      • Create New Project
      • Destory Project
      • Update project
      • upload logo
      • Get Project Settings
      • Upsert Project Settings
    • importer.vidinfra.com
      • welcome
      • Debug
      • test
    • Auth
      • User Registration
      • User Login
      • Verify-email
      • Forgot Password
      • Forgot Password Verify OTP
      • Forgot Password Set
      • Resend OTP
      • Logout
      • Set Password
      • Check Account exists
      • Update Password
      • Google Oauth Redirect
      • Google Oauth Callback
      • api-access-check
      • New Auth token using Refresh token
      • Github Oauth Redirect
      • Google Oauth Callback Copy
      • Get User Sessions
      • Delete User Sessions
    • User
      • Profiles
      • Profile Updates
      • Profile Avatar update
    • Organization
      • List organizations
      • Create an organization
      • Get an organization
      • Update an organization
      • Switch an organization
    • Organization's invitations
      • Sent invitation list
      • Send invitation
      • Show Token
      • Accept Invitation
      • Reject Invitation
    • Audits
      • Audits
    • Members
      • Members
      • test permission
    • API Keys
      • Get All API keys
      • Get API Key
      • Create API Keys
      • Destory API Keys
      • api key middleware (test)
    • Folders
      • Get All Folders
      • Create Folder
      • Get Folder by ID
      • Update Folder
      • Move Folder
      • Bulk Move Folders (empty)
      • Delete Folder
      • Get Folder Tree
    • Videos
      • Get All video of a project
      • Get a Video
      • Get Video using Custom field
      • create video
      • Upload thumbnail
      • Update video
      • Destroy video
      • Search Video
      • batch video Assign to collecition
      • Mark Thumbnail As Default
      • Get Video Timelines
    • Video Metas
      • Create or Update Video Meta Data
      • Get All Meta Data of a Video
    • Video Captions
      • create video caption
      • Delete a video Caption
      • Get video caption
    • Video Chapter
      • create video chapters
    • Uploads
    • Tags
      • Get all tags upder a project
      • Create Tag
      • Delete tag
    • Players
      • Get all Players
      • Create Player
      • Get Specific player
      • update player
      • Delete Player
      • Player Mark as default
    • Webhook Endpoints
      • Get webhook
      • create web hook
      • GET Webhook by ID
      • Update webhook
      • Delete web hook
    • Advertisements
      • get all ads
      • create ads
      • get single advertisement
      • Update ads
      • Delete ads
    • Webhook Event Logs
      • Get webhook event logs
      • Resend Webhook event by Id
      • Resend All Webhook Event
    • Analytics Direct Api
      • geo-distribution
      • Project Views
      • avg video watch
      • Total watch Time
      • Project Avg Watch per Unique user
      • Total Player Error
      • project popularity-analysis
      • Project Collection Insights
      • Collection Views
      • Collection avg Watch time
      • Collection Avg Watch per unique user
      • Collection Geo Distribution
      • Get all Users
      • User media views
      • User Avg video watch
      • user Player log
      • user sessions
      • Get all Video
      • video Player error
      • Video View
      • video Geo Distribution
      • video Avg watch
      • copy
    • Streams
      • Create livestream
      • Get all stream
      • Get a livestream
      • update status of livestream
      • delete a stream
      • get livestream historys
    • Stream Metas
    • Usages
      • Bandwidth Usage
      • Storage Usage
      • Get Over Usage
    • Encoding profile
      • Get all profiles
        GET
      • Create profile
        POST
      • Get A profile
        GET
      • Update a encoding profile
        PUT
      • Delete a encoding profile
        DELETE
      • Make a profile default
        PATCH
    • Project Matrics
      • Get Matrics
      • project Usages
    • Access Control
      • Put Access Control
      • Get access Control
    • Analytics
      • Project Get geo-distribution
      • project views
      • Project avg video watch
      • Project Total Watch
      • Project Avg Watch per Unique user
      • Project All Player Errors
      • Project Popularity Analysis
      • Project Collections insights
      • Collection Geo Distribution
      • Collection avg watch time
      • Collection avg watch per unique User
      • Collection Player error
      • Video Geo Distribution
      • Video views
      • Video Avg Watch
      • Video Player Log
      • User
      • User Avg Video Watch
      • User Total Watch
      • User player error log
    • Plan
      • public plans
      • current plan
      • Account Plans
      • Get plan by ID
      • Admin Get Plans
      • Admin Create plan
      • Admin Get Plan by ID
      • Admin Update Plan by ID
      • Admin Delete plan By ID
      • Admin Get Plan Metrices
      • Admin Get Plan Metrices By Type
      • Admin Create Plan Matrices By Type
      • Admin Update Plan Metrices By ID
    • Upload Tokens
      • Obtain credentials before upload
    • subscribe
      • stripe redirect subscription
        • create checkout session
        • over usage payment
      • current subscription
      • discribe a plan by planCode
      • subscribe
      • cancel subscription
      • over usage payment
      • Stripe over usage autopay payment (test)
    • Transaction
      • Get All Transaction
    • Invoice
      • Get All Invoices
      • Get Invoice by ID
    • vimeo video importer
      • vimeo job list
      • Vimeo videos by migration id
      • Vimeo Set video importer
      • Vimeo sync import
      • Vimeo import videos
      • Get pull videos
      • pull video from url
    • test
      • Welcome to vidinfra Copy
      • metrics
    • transcoding service
      • get all jobs
      • get a job
      • create jobs
      • Update a job
      • Delete a job
      • create job v2
    • transcoding service v2
      • create jobs
      • get all jobs
      • get a job
      • Update a job
      • Delete a job
    • Welcome to vidinfra
      GET
    • health check
      GET
    • Regions List
      GET
    • key
      POST
    • Untitled Endpoint
      GET
  1. Encoding profile

Create profile

Developing
POST
/projects/{projId}/encoding-profiles/{encodingType}

Create Encoding profile of a project#

📣 this endpoint creates a new video encoding profile for a project . In this POST
request the project ID and transcoding type vod | live has to be provided . All the necessary data has to be provided in the request payload
✳ list of URL parameters
project_id = 36 character in length
encodingType = vod | live
📢 Info message : Here URL is contructed like
POST /projects/<project_id>/encoding-profiles/<encodingType>

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
projId
string 
required
Example:
2c699add-7989-4460-992c-51829176f9ac
encodingType
string 
required
Example:
vod
Body Params application/json
project_id
string 
required
A unique identifier for the project associated with the encoding profile
name
string 
required
The name of the encoding profile
is_default
boolean 
optional
Indicates whether this profile is the default profile for the project
enable_per_title_encoding
boolean 
optional
Indicates whether per-title encoding is enabled for this encoding profile
thumbnail
object 
optional
An object containing information about the thumbnail image for the encoding profile, including the timestamp, image format, height, width, and output path.
time
number 
required
The timestamp of the thumbnail image
image_format
string 
required
The format of the thumbnail image
height
integer 
required
The height of the thumbnail image
width
integer 
required
The width of the thumbnail image
output_path
string 
required
The output path of the thumbnail image
generate_mp4
boolean 
optional
Indicates whether an MP4 file should be generated for the encoding profile
crop
object 
optional
An object containing information about the crop settings for the encoding profile, including the x and y coordinates of the crop region, and the output width and height of the cropped video.
x
integer 
required
The x-coordinate of the crop region
y
integer 
required
The y-coordinate of the crop region
out_w
integer 
required
The output width of the cropped video
out_h
integer 
required
The output height of the cropped video
image_overlay
object 
optional
An object containing information about an image overlay for the encoding profile, including the URL of the image to be overlaid.
url
string 
required
The URL of the image to be overlaid on the video
text_overlay
object 
optional
An object containing information about a text overlay for the encoding profile, including the text to be displayed.
text
string 
required
The text to be overlaid on the video
trim
object 
optional
An object containing information about the trim settings for the encoding profile, including the start and end times.
start
integer 
required
The start time of the trimmed video
end
integer 
required
The end time of the trimmed video
encoding_presets
array [object {9}] 
required
An array of encoding presets associated with the encoding profile.
width
integer 
required
The width of the encoded video
height
integer 
required
The height of the encoded video
min_bitrate
integer 
optional
The minimum bitrate for the encoded video
max_bitrate
integer 
optional
The maximum bitrate for the encoded video
optimize_bitrate
boolean 
optional
Indicates whether to optimize the bitrate for the encoded video
bitrate
integer 
optional
The bitrate of the encoded video
video_codec
string 
optional
The video codec used for the encoded video
audio_codec
string 
optional
The audio codec used for the encoded video
audio_rate
integer 
optional
The audio sample rate for the encoded video
Example
// {
//     "project_id": "f32a0116-fe11-454c-8e6a-5ff4101882e5",
//     "name": "Profile3",
//     "is_default": true,
//     "enable_per_title_encoding": false,
//     "thumbnail": {
//         "time" : 0.1 ,
//         "image_format" : "jpg" ,
//         "height" :270,
//         "width" : 270,
//         "output_path" : ".jpg"
//     },
//     "generate_mp4": true,
//     "crop": {
//         "x": 10,
//         "y": 20,
//         "out_w": 100,
//         "out_h": 200
//     },
//     "image_overlay": {
//         "url": "http://example.com/overlay.jpg"
//     },
//     "text_overlay": {
//         "text": "Raka"
//     },
//     "trim": {
//         "start": 10,
//         "end": 20
//     },
//    "encoding_presets": [
//         {
//             "width": 1920,
//             "height": 1080,
//             "min_bitrate": 1000,
//             "max_bitrate": 5000,
//             "optimize_bitrate": true,
//             "bitrate": 3000,
//             "video_codec": "h264",
//             "audio_codec": "aac",
//             "audio_rate": 128
//         },
//         {
//             "width": 1080,
//             "height": 720,
//             "min_bitrate": 2000,
//             "max_bitrate": 6000,
//             "optimize_bitrate": true,
//             "bitrate": 5000,
//             "video_codec": "h265",
//             "audio_codec": "aac",
//             "audio_rate": 128
//         }
//    ]
// }


// 2nd example 

{
    "project_id": "2c699add-7989-4460-992c-51829176f9ac",
    "name": "Profile3",
    "is_default": true,
    "enable_per_title_encoding": false,
    "thumbnail": {
        "time": 0.1,
        "image_format": "jpg",
        "height": 270,
        "width": 270,
        "output_path": ".jpg"
    },
    "generate_mp4": true,
    "crop": {
        "x": 10,
        "y": 20,
        "out_w": 100,
        "out_h": 200
    },
    "image_overlay": {
        "url": "http://example.com/overlay.jpg"
    },
    "text_overlay": {
        "text": "Raka"
    },
    "trim": {
        "start": 10,
        "end": 20
    },
    "encoding_presets": [
        {
             "width": 1920,
            "height": 1080,
            "min_bitrate": 1000,
            "max_bitrate": 5000,
            "optimize_bitrate": true,
            "bitrate": 3000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
        {
            "width": 1280,
            "height": 720,
            "min_bitrate": 1000,
            "max_bitrate": 5000,
            "optimize_bitrate": true,
            "bitrate": 3000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
        {
            "width": 854,
            "height": 480,
            "min_bitrate": 1000,
            "max_bitrate": 1500,
            "optimize_bitrate": true,
            "bitrate": 1500,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
       
        {
            "width": 640,
            "height": 360,
            "min_bitrate": 1000,
            "max_bitrate": 1000,
            "optimize_bitrate": true,
            "bitrate": 1000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
       
       {
            "width": 426,
            "height": 240,
            "min_bitrate": 1000,
            "max_bitrate": 1000,
            "optimize_bitrate": true,
            "bitrate": 1000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:8080/v1/projects/2c699add-7989-4460-992c-51829176f9ac/encoding-profiles/vod' \
--header 'Content-Type: application/json' \
--data-raw '// {
//     "project_id": "f32a0116-fe11-454c-8e6a-5ff4101882e5",
//     "name": "Profile3",
//     "is_default": true,
//     "enable_per_title_encoding": false,
//     "thumbnail": {
//         "time" : 0.1 ,
//         "image_format" : "jpg" ,
//         "height" :270,
//         "width" : 270,
//         "output_path" : ".jpg"
//     },
//     "generate_mp4": true,
//     "crop": {
//         "x": 10,
//         "y": 20,
//         "out_w": 100,
//         "out_h": 200
//     },
//     "image_overlay": {
//         "url": "http://example.com/overlay.jpg"
//     },
//     "text_overlay": {
//         "text": "Raka"
//     },
//     "trim": {
//         "start": 10,
//         "end": 20
//     },
//    "encoding_presets": [
//         {
//             "width": 1920,
//             "height": 1080,
//             "min_bitrate": 1000,
//             "max_bitrate": 5000,
//             "optimize_bitrate": true,
//             "bitrate": 3000,
//             "video_codec": "h264",
//             "audio_codec": "aac",
//             "audio_rate": 128
//         },
//         {
//             "width": 1080,
//             "height": 720,
//             "min_bitrate": 2000,
//             "max_bitrate": 6000,
//             "optimize_bitrate": true,
//             "bitrate": 5000,
//             "video_codec": "h265",
//             "audio_codec": "aac",
//             "audio_rate": 128
//         }
//    ]
// }


// 2nd example 

{
    "project_id": "2c699add-7989-4460-992c-51829176f9ac",
    "name": "Profile3",
    "is_default": true,
    "enable_per_title_encoding": false,
    "thumbnail": {
        "time": 0.1,
        "image_format": "jpg",
        "height": 270,
        "width": 270,
        "output_path": ".jpg"
    },
    "generate_mp4": true,
    "crop": {
        "x": 10,
        "y": 20,
        "out_w": 100,
        "out_h": 200
    },
    "image_overlay": {
        "url": "http://example.com/overlay.jpg"
    },
    "text_overlay": {
        "text": "Raka"
    },
    "trim": {
        "start": 10,
        "end": 20
    },
    "encoding_presets": [
        {
             "width": 1920,
            "height": 1080,
            "min_bitrate": 1000,
            "max_bitrate": 5000,
            "optimize_bitrate": true,
            "bitrate": 3000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
        {
            "width": 1280,
            "height": 720,
            "min_bitrate": 1000,
            "max_bitrate": 5000,
            "optimize_bitrate": true,
            "bitrate": 3000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
        {
            "width": 854,
            "height": 480,
            "min_bitrate": 1000,
            "max_bitrate": 1500,
            "optimize_bitrate": true,
            "bitrate": 1500,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
       
        {
            "width": 640,
            "height": 360,
            "min_bitrate": 1000,
            "max_bitrate": 1000,
            "optimize_bitrate": true,
            "bitrate": 1000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
       
       {
            "width": 426,
            "height": 240,
            "min_bitrate": 1000,
            "max_bitrate": 1000,
            "optimize_bitrate": true,
            "bitrate": 1000,
            "video_codec": "h264",
            "audio_codec": "aac",
            "audio_rate": 128
        },
    ]
}'

Responses

🟢200OK
application/json
Body
message
string 
required
A string that contains a message about the success or failure of the API request.
result
object 
required
An object that represents a video encoding profile.
id
string 
required
A unique identifier for the encoding profile.
project_id
string 
required
A unique identifier for the project associated with the encoding profile.
name
string 
required
The name of the encoding profile.
is_default
boolean 
required
Indicates whether this profile is the default profile for the project.
enable_per_title_encoding
boolean 
required
Indicates whether per-title encoding is enabled for this encoding profile.
thumbnail
object 
required
An object containing information about the thumbnail image for the encoding profile, including the timestamp, image format, height, width, and output path.
generate_mp4
boolean 
required
Indicates whether an MP4 file should be generated for the encoding profile.
crop
object 
required
An object containing information about the crop settings for the encoding profile, including the x and y coordinates of the crop region, and the output width and height of the cropped video.
image_overlay
object 
required
An object containing information about an image overlay for the encoding profile, including the URL of the image to be overlaid.
text_overlay
object 
required
An object containing information about a text overlay for the encoding profile, including the text to be displayed.
trim
object 
required
An object containing information about the trim settings for the encoding profile, including the start and end times.
created_at
string 
required
The date and time the encoding profile was created.
created_by
string 
required
The ID of the user who created the encoding profile.
encoding_presets
array [object {11}] 
required
An array of encoding presets associated with the encoding profile.
success
boolean 
required
A boolean indicating whether the API request was successful.
Example
{"message":"encoding Created Successfully","result":{"id":"47f8da4f-a35b-463f-9343-10d29980d8b9","project_id":"8813d154-3e6a-457e-bcdb-283ede3fe365","name":"Profile3","is_default":true,"enable_per_title_encoding":false,"thumbnail":{"time":0.1,"image_format":"jpg","height":270,"width":270,"output_path":".jpg"},"generate_mp4":true,"crop":{"x":10,"y":20,"out_w":100,"out_h":200},"image_overlay":{"url":"http://example.com/overlay.jpg"},"text_overlay":{"text":"Raka"},"trim":{"start":10,"end":20},"created_at":"2024-04-17T10:47:33.899513007Z","created_by":"04f131d0-b8d5-42cd-8e66-9495299e75cf","encoding_presets":[{"id":"dea7ffdb-41a3-4784-b295-57faf0ab4ed8","encoding_profile_id":"47f8da4f-a35b-463f-9343-10d29980d8b9","width":1920,"height":1080,"min_bitrate":1000,"max_bitrate":5000,"optimize_bitrate":true,"bitrate":3000,"video_codec":"h264","audio_codec":"aac","audio_rate":128},{"id":"1c8ed759-5009-4d6a-9713-f230da34e49b","encoding_profile_id":"47f8da4f-a35b-463f-9343-10d29980d8b9","width":1080,"height":720,"min_bitrate":2000,"max_bitrate":6000,"optimize_bitrate":true,"bitrate":5000,"video_codec":"h265","audio_codec":"aac","audio_rate":128}]},"success":true}
Previous
Get all profiles
Next
Get A profile
Built with