LogoLogo
  • Welcome
  • Landing in Transparent Edge
  • Sign up process
  • Getting Started
    • Basics concepts
      • Glosary
        • API
        • Brotli Compression
        • Cache-Control
        • Cache key
        • Caching
        • CNAME
        • Cloud Computing
        • Cloud Computing Architecture
        • Cloud Services
        • DASH
        • Data Center
        • Edge Server
        • ETag
        • GSLB
        • HLS (HTTP Live Streaming)
        • HTTP/2
        • Infrastructure as a Service (IaaS)
        • Internet Exchange Point
        • Last-Modified
        • Load Balancing
        • MultiCDN
        • NoSQL (not only SQL)
        • Origin
        • Origin Shield
        • OTT (Over The Top)
        • Platform as a Service (PaaS)
        • PoP (Point of Presence)
        • Private CDN
        • Private Cloud
        • Public Cloud
        • Purge
        • Query String
        • Reverse Proxy
        • RTT (Round-trip Time)
        • SaaS (Software as a Service)
        • SDS (Software Defined Storage)
        • Smooth Streaming
        • Status Code
        • TCP (Transmission Control Protocol)
        • TLS Acceleration
        • TLS (Transport Layer Security)
        • TTFB (Time-to-first-byte)
        • TTL (Time-to-live)
        • Virtual Machine
        • VPS (Virtual Private Server)
        • Web Services
      • Let's start at the beginning
      • Things to consider
      • Houston, we have a problem
      • HTTP, How does it work?
      • Invalidating methods
      • DNS Pointing
      • Log formats
      • Predefined headers
      • Default headers
        • geo_country_code
        • X-Device
        • Vary
        • Cache headers
        • Age
        • TP-Cache
        • True-Client-IP and X-Forwarded-For
      • Forcing No-Cache
      • Architecture
        • Transparent Edge’s IP addresses
        • Locations and PoP
        • Cache layers
      • Cache effectiveness
      • SSL
      • HTTP 5xx Error Codes
      • Features
        • Protection against origin failures
        • Rate Limit
        • Geolocation and geoblocking
        • Prefechting
        • Refetching
        • Fast purging
        • HTTP Redirects
        • Caching static vs. dynamic objects
        • Rewriting of headers
        • Device detection
    • Dashboard
      • Historic
      • Analytics
      • Invalidating content
      • Content invalidation by tags
      • Prefetching Cache
      • Log shipping
      • Provisioning
        • Initial configuration
        • Backends
        • Sites
        • Configuration deployments
        • Network ACLs
        • TLS/SSL Certificates
      • User management
  • Configuration
    • VCL Reference
      • Default Functions
      • VCL Objects
      • Callable Functions
      • Security restrictions
      • Varnish book
    • Network Access Control List
      • Initial configuration
      • Auto generated lists
      • Manage lists via API
    • i3
      • Quality adjustment
      • Cache timing allocation for transformed images
      • Conversion to grayscale
      • Conversion to WebP
      • Blurring
      • Inclusion of graphics in the footer (strip)
      • Automatic resizing
      • Definition of the maximum size (content-length)
    • Transcoding
      • Relaunch or requeue jobs
      • Create a transcode job
      • Get job information
      • Dashboard usage
    • OpenAPI de TransparentCDN
  • Security
    • HTTPS
    • Blocking User-Agent
    • Blocking by IP Address
    • Blocking Requests Geographically
    • Avoiding Hotlinking
    • Bot Mitigation
    • WAF
      • Configuration
      • CAPTCHA
      • Content protected by token
      • Rate limit
    • Anomaly Detection
      • Detection Types
      • Automatic Reactions
      • Detection History
    • Under attack mode
    • Global Whitelists
  • Integrations
    • Wordpress plugin
    • Google Cloud Platform
    • Amazon Web Services
  • GUIDES AND TUTORIALS
    • How to do things
    • Edge Computing
      • ESI Tags
    • Acting on the Query String
    • Working with cookies
    • Making decisions based on HTTP headers
    • Web Application Gateway
    • Configure your servers to send cache headers
    • Caching a version per device
    • True-Client-IP in the origin
    • A/B Testing
    • Routing traffic to different backends
    • JSON Web Tokens
    • Debug codes
    • Streaming logs
    • API
      • Authentication
      • Invalidation
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Configuration
  2. Transcoding

Create a transcode job

PreviousRelaunch or requeue jobsNextGet job information

Last updated 1 year ago

Was this helpful?

The transcode service allows you to adjust the quality of the videos and convert them to the desired formats and signals, lodging them where required. To create a transcode job you have to use our and make the following call to the endpoint:

https://api.transparentcdn.com/v1/media/{company_id}/transcode

In this POST type request, it is important to stand out the type of request body, which must be either form-data or x-www-form-urlencoded. This request body will have a field whose key must be order and in the value field a JSON similar to this one.

{
  "priority": 5,
  "origin": "ftp://usuario:password@ftp.com/published/video.mp4",
  "notifications": [
    {
      "email": "micorreo@misitio.com"
    }
  ],
  "destinations": [
    "ftp://usuario:password@ftp.tudireccionftp.com"
  ],
  "jobs": [
    {
      "label": "iphone",
      "filename": "watermark.mp4",
      "profile_id": 666
    }
  ],
  "thumbnails": [
    {
      "filename": "nombre.jpg",
      "label": "label",
      "width": "720",
      "height": "480",
      "time": 0.3
    }
  ]
}
JDATA='order={
        "priority":5,
        "origin":"ftp://username:password@ftp.com/videos/example.mp4",
        etc..
        }'

Having stored the request data in the JDATA variable and obtained the authorization token, which is exemplified here as YOUR_API_TOKEN, we could make the request as shown below.

curl -ksvH "Authorization: Bearer YOUR_API_TOKEN" -XPOST -H 'Content-type: application/x-www-form-urlencoded' -d "$JDATA" "https://api.transparentcdn.com/v1/media/{company_id}/transcode/"

In the request body we find several fields: the origin of the file, meaning, where it will be downloaded from, where we should notify about the success or failure of the job, indicated in notifications. On the other hand, destinations tells us where we should send the new formatted video or videos. The jobs set refers to the different jobs that the transcoding service should perform, with the names of the resulting files and which transcoding profile to use. In this way this example would result in a single file named "watermark.mp4" that would use profile 15. It is also worth noting the possibility of including the "priority" argument in our request. Through the transcoding profiles that we have associated, we can include the option to restrict the bit rate of our videos. This is an option that will evaluate the least heavy video bit rate and take that as a reference to do the transcoding. For example: if we have a video with a bit rate of 985 and our chosen profile is configured to transcode videos at a bit rate of 1200, the system will choose the lower rate to perform the job. Currently, the option is not available from the dashboard, so if we want to choose this option, we will have to notify the technical manager. However, soon we will be able to choose this option in the "edit" section of our profiles.

If we have contracted the Priority Transcoding service, we can indicate what priority we want to give to this transcoding job. It is an argument that is not mandatory, and that in the case of having the service mentioned above, it will cause said job to be processed first of all those that have already been queued. The value that we can indicate is an integer between 5 or 10. Regarding the transcoding profiles, we can choose any of the profiles that we want and that we have configured. These can be consulted in the following endpoint.

https://api.transparentcdn.com/v1/media/{company_id}/transcoding_profiles/

This address will return all the transcoding profiles that we have created and available for use. Once we have the id of our selected transcoding profile, we simply have to replace it with "666" from the "transcoding_profile" field found in the example to enqueue a job in the service.

To make the request, we have previously authenticated ourselves. If you have questions about how to do it, you can get information Once we get the token, we could queue the job by making a POST request using curl. In order not to repeat ourselves, we will take the previous JSON as an example, which we will have stored in a variable called JDATA in this way:

It is also possible to create a new transcoding job through our To do this, you need to expand the options of the button located at the top of the transcoding job list and follow the steps indicated in the displayed modal.

API
here.
dashboard.