Basic Image Editing Via API

In the past, we have already talked about the possibilities of video editing using the Online-Convert.com API. Different ways to edit PDF files, such as merging and splitting documents or protecting a PDF with a password, have also been discussed before. But there is so much more our RESTful API can do.

Today’s article will give a quick overview on how to edit photos, pictures and other images using the file conversion API.

 

How To Perform Basic Image Editing

Before we start, please make sure that you know how to do basic conversions using our API and either the Postman Chrome app or software. You can learn the basics and find the necessary collections in this article: Test Our API On Your Computer

Once you are familiar with Postman and the basic POST and GET calls, lets move on to the image editing.

As a basis of the conversions, we will convert a camera raw image to JPG. For this, we will use the following POST command:

{
    "input": [{
        "type": "remote",
        "source": "http://cdn.online-convert.com/example-file/raster%20image/nef/example.nef"
    }],
    "conversion": [{
        "category": "image",
        "target": "jpg"
    }]
}

 

Change DPI

As with all optional settings you can apply to a conversion, the needed code will be added to the conversion in the conversion options. To change the DPI of an image, the following option has to be used:

"options": {
    "dpi": 75
 }

The DPI has to be given as an integer between 10 and 1,200.

 

Change Image Size

Next to the DPI, the width and height of an image can be changed as well, either individually or together. To do so, the following code is needed:

"options": {
    "width": 500,
    "height": 250
 }

The values for width and height are also given as integers, both ranging from 1 to 65,000.

 

Change Image Color

One of the more visual changes you can apply to an image is changing it’s color schema. There are a few color presets you can choose from to give an image a different look. To see what the single presets do, check out this article: Image Settings Explained

"options": {
    "color": "1980"
 }

The following options are available:

  • gray
  • monochrome
  • negate
  • 1980
  • 1900

 

Enhance Images

There are a few image enhancements you can apply to your image on top of changing size and color. These are the following:

"options": {
    "enhance": true,
    "normalize": true,
    "sharpen": true,
    "antialias": true,
    "despeckle": true,
    "equalize": true
 }

Per default, all these are set to “false”. In case you want to add one of these enhancements, you only have to include the one you want with the value “true”.

 

Rotate An Image

Another neat feature provided in our API that is not given on the homepage is rotating an image. For this, add the following code snipped to the conversion POST:

"options": {
    "rotate": 90
 }

The rotation is indicated in the degree of rotation. While we advice you to use a rotation of in the 90° spectrum (90, 180, 270), you can specify any degree. Note that in this case, e.g. choosing 70°, the background of the image, filling the space, will be white.

 

 

Full Image Editing Code

Now, lets have a look at how a full image conversion using these image editing options may look like.

{
    "input": [{
        "type": "remote",
        "source": "http://cdn.online-convert.com/example-file/raster%20image/nef/example.nef"
    }],
    "conversion": [{
        "category": "image",
        "target": "jpg",
        "options": {
            "dpi": 300,
            "width": 1024,
            "color": gray,
            "sharpen": true,
            "rotate": 180
        }
    }]
}

Here you can see a direct comparison between the original NEF and the converted JPG file:

Original Conversion

Want to get in touch with us? Hit us up on our social media channels!
Posted in API

Summary Of Video Editing Options

These past weeks, we have provided you with many different tutorials about how you can edit video files using the RESTful API of online-convert.com. This article will wrap up all you can do and list the tutorials for easier access.

There are a few preliminaries before you can start video editing though:

  • get a free API key for our API (you get that one after registering for free)
  • get Postman, either the stand-alone program or the Chrome application
  • check out how to use Postman for APIs

 

How To Edit Videos Using Our API

Online-Convert.com is no video editing service. We allow you to convert many different files into more common formats. However, when converting, you can already do some minor editing of your files that makes opening, viewing and using them easier.

Video files have gotten the “special treatment” at online-convert.com lately. Thus, here are the practical things in terms of video editing you can do while converting your video and movie files.

 

Cut Video Files

Your video is too long? Or you simply want only a part of it? Then you can cut it using our API. By setting a start and stop time, only the part of the video you specified this way will be converted into another (or the same) format.

All you need is the following piece of code:

“options”: {
“start”: “00:00:06”,
“end”: “00:00:11”
}

 

Crop Video Files

Not to mix up with cutting videos, cropping a video changes the image/view that is shown to you on a video player. This can be useful to cut out black bars on the sides or bottom and top of a video. Likewise, it allows you to crop out only one part of the video instead of the whole screen.

To do so, you just need to insert this code into your POST command:

"options": {
        "crop_top": 10,
        "crop_bottom": 50,
        "crop_left": 150,
        "crop_right": 200
      }

 

Change Video & Audio Codec

Video as well as audio data contained in a video clip or movie can be encoded in different ways. For that, different codecs or standards are used. If you want to find out more about codecs, check out this article: Video Codecs and Containers – What Are They?

Changing the codec, both for video and audio streams, can be necessary since not all players support all codec. This is true for both media players for your computer, tablet or phone, and for hardware players. Thus, maybe a file that does not play for you simply needs another codec. Likewise, when you only see the video or can only see the audio stream, maybe the respective other needs a different codec.

Changing the codecs is easy with our API:

"options": {
        "codec": "mpeg4",
        "audio_codec": "aac"
      }

 

Remove Audio Streams

In case you want to just have the visual information from a video and not the audio, you can easily remove the audio stream:

"options": {
        "remove_audio": true
      }

 

Change Aspect Ratio

Videos have a certain aspect ratio, like the commonly used 16:9. However, on some screens, a different aspect ratio would look better. Thus, we offer you the possibility to change it:

"options": {
        "aspect_ratio": "16:9"
      }

 

Change Audio Channel

There are two majorly used audio channels: stereo and mono. With our API, you can change from one to the other:

"options": {
        "channel": "mono"
      }

 

Mirror A Video

Mirroring a video can create nice effects for your videos or add a different look to them. With this piece of code, you can mirror a video either horizontally or vertically:

"options": {
        "mirror": "vertical"
      }

 

Rotate A Video

Especially when taking a video with a mobile phone, it can happen that it is upside down or tilted to the side. Using our API, you can rotate your video a certain amount of degrees, clockwise:

"options": {
        "rotate": "180"
      }

 

The last video editing operations are explained in much more detail here: More Video Editing Options


Want to get in touch with us? Hit us up on our social media channels!
  

More Video Editing Options Via API

More Video Editing

Over the past weeks we have explored many video editing possibilities in the Online-Convert.com API. Today, let’s wrap it up with a little collection of “everything else” video editing tools we have.

In order to use the API for your video editing needs, you do not need to be a developer. All you need is an API key for our API (you get that one after registering for free) and the Postman program or Chrome application. Check out how to use Postman to test our API and then lets go right to more video editing options!

 

Edit Your Video With Our API

So far, we have looked at how to edit videos with the API when it comes to the following things:

Now, lets have a look at a colorful selection of more video editing options.

 

All these operations are done using the options-part of your conversion command to our API. Following, we will first give you the specific option and talk about what it does. Then, you will get a complete command using a remote link for an example file for the conversion.

 

Remove Audio

This option allows you to remove the audio stream from a video. A video usually contains, among others, a video and an audio stream. Sometimes, however, the sounds or music are only distracting from the video and you want it removed. With this command, you can do this:

"remove_audio": true

For remove_audio, you need one of two possible values:

  • true or
  • false

False is always set as default, meaning that even if you do not specify this in your conversion, the audio will remain intact. Only when including the command and using the value true, the audio will be removed.

 

Here’s what a complete POST command could look like.

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "remove_audio": true
      }
    }]
}

 

Change Aspect Ratio

Depending on your screen, you might need to adjust the aspect ratio of your video for the black bars on the sides or top and bottom to disappear. Watching a video on a computer screen, TV or phone might make changing the aspect ratio necessary. The command for this looks like this:

"aspect_ratio": "16:9"

The value that can be set for the aspect ratio change can be chosen rather freely. Just keep in mind that it should be an existing or common aspect ratio. For example:

  • 4:3
  • 16:10
  • 16:9
  • 256:135

 

Here’s an example for a complete POST call:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "aspect_ratio": "16:9"
      }
    }]
}

 

Change Audio Channel

As mentioned above, videos do not only contain video information, but also an audio stream. If you are vaguely familiar with audio, then you know that there are two possible channel modes: mono and stereo. Mono, in short, makes it sound like the sound or music is coming from one direction only, while stereo makes it seem like there are several sources for these sounds. And with the following command, you can change that for your video:

"channel": "mono"

Naturally, there are two values you can use here, mono and stereo. Always make sure to put them in between quotes though.

 

And here’s the full call:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "channel": "mono"
      }
    }]
}

 

Mirror Video

In order to create cool effects or to correct a faulty taping, you can mirror your video with the help of our API. All you need for that is a command like this:

"mirror": "vertical"

There are three possibilities here:

  • vertical
  • horizontal
  • none

None is used as the default and if the mirror-option is not specified, it is – of course – not mirrored. Otherwise, you can use one of the other two values, just make sure to put them in between quotes.

 

A full POST would thus look like this if we want the video to be mirrored vertically:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "mirror": "vertical"
      }
    }]
}

 

Rotate Video

Accidentally took a video with your phone horizontally? Or is it flipped on its head? No problem. Because with the API, you can rotate the video permanently instead of always having to choose the setting in your video player. What you need for this, is this conversion option:

"rotate": "180"

The rotation is measured in degrees and clockwise. This means your video is rotated clockwise (“to the right”) with regard to the degree you use. The degree can’t be chosen freely though. It has to be one of these values:

  • 90
  • 180
  • 270

They cover everything you might need quite nicely though. Converting with 90 degrees, will tilt the video one time to the right. 180 will rotate it two times so it’s flipped upside down. And so on.

 

A full POST command can look like this:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "rotate": "180"
      }
    }]
}

 

Altogether

Of course these options can be combined in whatever way you need it to! Have a look at the following code that combines all options we have listed here:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "aspect_ratio": "4:3",
        "mirror": "horizontal",
        "rotate": "180",
        "channel": "stereo",
        "remove_audio": false
      }
    }]
}

Want to get in touch with us? Hit us up on our social media channels!
  

Crop Videos Online – API Tutorial

Crop Video Files

Converting video files is one thing you can do with the powerful and RESTful API of Online-Convert.com – but there is more!

Easy video editing is something the API is capable of as well. In a past article, we have already shown how to change video and audio codecs using the API, but that’s not all. The feature or editing tool we want to introduce today is how to crop videos, not with regard to run time, but the actual screen or image dimension of the video.

 

Before we start, check out how to use our API with Postman, which is a free tool to create and send API calls. Depending on what you prefer, you can download it as a standalone program or zse the Google Chrome App. Once you got this down, lets go to the cropping!

 

How To Crop Videos

Cropping your video requires a few additions to the options part of your POST request to our API. Thee options are rather self-explanatory, making it easy to add and apply changes. Take a look at the following:

"options": {
        "crop_top": 10,
        "crop_bottom": 50,
        "crop_left": 150,
        "crop_right": 200
      }

As you can see, the options are named after what we want to do to our video screen, namely crop, and the edge or direction where you want to crop. Thus, crop_top will crop the noted value from the top of the video, crop_bottom from the bottom, and so on. The value given for the single crop options is given in pixels.

 

Of course you can choose to crop only from one or two sides. For example, in order to cut off black bars from the top and bottom of the video, you only have to use the respective crop options. The other ones, crop-left and crop_right, can be left out in the command:

"options": {
        "crop_top": 300,
        "crop_bottom": 3000
      }

 

As a whole, this would result in a POST command, including the input format as well as the format you want to convert to, that looks like this:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "crop_top": 50,
        "crop_bottom": 50,
        "crop_left": 200,
        "crop_right": 200
      }
    }]
}

Want to get in touch with us? Hit us up on our social media channels!
  

Change Video Codec – How To Edit Videos Via API

Converting all kinds of video files to other video formats is a strong suit of Online-Convert.com and our API. Likewise, converting music and other audio files to video and vice versa is possible as well. But we can do more!

With the help of the API you are now able to edit your video files when it comes to different video and audio codecs! Using a free tool called Postman (which is available as a downloadable program or as an app for your Google Chrome browser), you can now change different codecs in your video files. To do so and use Postman, you don’t have to be a developer. We have created a tutorial for you on how to use Postman to test our API. Once you get the hang of it, you can start editing video files!

 

How To Change Codecs For Video Files

Assuming that you learned how to send basic requests to Postman, all you need to do is change the code you send. In the options of your request, you can add the codec you wish to change. Following, we will show you how to do this for both video and audio codecs.

 

Change Video Codec

When sending your POST request, the video codecs you want to change can be specified in the options. This means the following snipped should be part of the “conversion” part of your code.

"options": {
        "codec": "h.264"
      }

 

For example, the code for a whole conversion, including input file, would look like this:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "codec": "mpeg1video"
      }
    }]
}

 

There are several video codecs supported by our API, depending on the video format you are converting to. The whole list contains the following codecs:

  • dx50
  • h.263
  • h.264
  • h.265
  • huffyuv
  • mjpeg
  • mpeg1video
  • mpeg2video
  • mpeg4
  • msmpeg
  • screen_video
  • screen_video_2
  • sorenson
  • theora
  • vp8
  • vp9
  • wmv7
  • wmv8
  • xvid

 

However, not all codecs are supported by all video formats you can convert to. But there are two ways to find out which codecs are actually supported by the file you need.

  1. Check this list here: https://api2.online-convert.com/conversions?page=2
    Simply search for the format you want to convert to and check the list of codecs.
  2. Check a format directly using this link: https://api2.online-convert.com/conversions?target=avi
    In the URL, simply replace the format extension (here “avi”) with the extension you want to check

 

Change Audio Codec

Changing the audio codec of a video is just as easy as changing the video codec. It is also done using the options of a “conversion” request, just using another command:

"options": {
        "audio_codec": "flac"
      }

 

A full command to change the audio codec of a video file would look like this:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "audio_codec": "mp3"
      }
    }]
}

 

There are several audio codecs you can choose from when converting to video. The full list is the following:

  • acc
  • adpcm
  • adpcm_ms
  • amr-nb
  • asao
  • flac
  • mp2
  • mp3
  • opus
  • pcm_s16_be
  • pcm_s16_le
  • pcm_u8
  • speex
  • vorbis
  • wmav1
  • wmav2

 

For specific audio codecs able to choose for certain video files, check the two links from above. They are all listed there as well.

 

Change Audio & Video Codec At Once

Last but not least, lets have a look at what our code would look like to change both the video and audio codec at the same time.

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/avi/example_small.avi"
    }],
    "conversion": [{
      "category": "video",
      "target": "avi",
      "options": {
        "codec": "mpeg4",
        "audio_codec": "aac"
      }
    }]
}

Want to get in touch with us? Hit us up on our social media channels!

How To Cut Video Files

Cut Videos

There are two easy and free ways to cut your videos. Shortening a video or cutting a part of a movie is easy and does not require installing any software. We will show you how.

The first way is using the one of the video converters of video.online-convert.com. The other is using our powerful and easy to use API.

 

How To Shorten A Video

Following, we will give you a step by step tutorial on how to easily shorten and cut videos using either our website or our API. All you need is your video and the Postman app for the latter.

 

Using Online-Convert.com

If you want to cut or shorten your video using the Online-Convert website, all you need is your video. Or even just a link to your video. The groundwork for cutting your video is to find out where you want to cut it though. Check your video and write down the time where you want the part you want to cut starts and ends.

 

1. Go to video.online-convert.com. There, you can choose any video converter you like. We suggest converting your videos to MP4 as it is the most supported and common video format nowadays.

2. Upload your video. You can browse your hard drive or phone, enter a link or choose a video you have stored on GDrive or Dropbox.

Cut Video

3. Go to the “Optional settings” and enter the start and end date of the portion you want to cut. The format used is a simple HH:MM:SS format. If you leave either field blank, the cut will start right at the beginning of the video or end at the very end of it.

4. Afterwards, click on “Convert file”. After a while, your now cut video is ready for download!

Cut Video

 

Using The API

Using the Online-Convert API is something not only developers can do. Check out our tutorial on how to use Postman to test our API and start cutting your videos!

What you need is an input file and the following POST command for Postman. In the example, we used a remote file link, but of course you can also upload a file with the according commands. We have added a tutorial on how to upload files in Postman as well.

Here’s the command that you can use. Simply change the remote URL and the start and end times to your liking:

{
    "input": [{
      "type": "remote",
      "source": "http://cdn.online-convert.com/example-file/video/mp4/example_small.mp4"
    }],
    "conversion": [{
      "category": "video",
      "target": "mp4",
      "options": {
        "start": "00:00:06",
        "end": "00:00:11"
      }
    }]
}

Want to get in touch with us? Hit us up on our social media channels!

How Enterprise Organizations Can Make Use Of File Conversion

Inefficiency is one of the main causes that hinder many enterprise-level companies from improving their revenue. The optimization of file conversion done in your organization can be a step towards efficiency and thus also improvement.

This blog article will show you why using a reliable and efficient file conversion API can help your company to enhance the workflow and file conversion in general.

 

Why Use Online File Conversion?

First, lets have a look at why your enterprise organization should leave file conversion to online services like online-convert.com. The improved efficiency is displayed in many parts of a company. Such as:

  • Time saving
    • Reduce time that is otherwise manually spent on converting files
  • Sped up processes
    • Digital distribution of documents can be facilitated which improves the workflow
    • Accessing vital information and documentation in a digitized form
    • Make information available for workers & customers using different platforms and devices
  • Money saving
    • Reduce costs of papers & printing as well as distribution of non-digital files
    • Pay for one service that can do it all instead of purchasing & maintaining several programs
    • Reduce or even eliminate hardware and maintenance costs by using an online solution
  • Bundling tasks
    • Replace many processes with just one which results in easier trouble shooting & less deflection

These are just a few reasons how your company could improve by using one solution for all file conversion needs you have. With the right solution, you can save money and clear resources and time that can be spend on other, important tasks.

 

What’s The Best Solution For My Company?

With online-convert.com you have two choices when it comes to integrating file conversion into your workflow:

  • Manual file conversion
  • Automated file conversion via API

On the online-convert.com website, users can manually upload and convert files using our intuitive web service. All you need to do is register your company or single employees for a free account. Depending on the company’s file conversion needs, premium plans allow conversion of larger and more simultaneous files.

In order to automate the process of file conversion, enterprise organizations have the option to directly integrate file conversion in their applications and systems. This can be done by using the versatile and fast online-convert API. Information about the API can be found here: API documentation.

 

Advantages Of API Conversion For Enterprise Organizations

Using the API solution for automated file conversion comes with even more advantages than just an automated process.

 

Questions?

You have any questions about how file conversion can be integrated into your company workflow? We will help you to find the perfect solution for both manual and automated file conversion. Send us an email to time2help@online-convert.com and we will advise you in all questions regarding:

  • API usage
  • Pricing
  • Troubleshooting
  • Invoicing
  • and more

Want to get in touch with us? Hit us up on our social media channels!

Online-Convert.com API Tutorials [OVERVIEW]

googleplus-cover_oc

Online-Convert.com provides a reliable, fast and accurate online service for all your file conversion needs. On our website, you can convert many different files of different types to more common formats.

The website is easy to handle and accessible from everywhere with a device that has internet access. But that is not all! Online-Convert.com also provides a powerful API that allows you to include file conversion in your own projects and applications. To demonstrate what our API can do and to help you to find your way through the process, we have created many tutorials that show you, how to use our API.

 

Thus, following you find a masterlist of tutorials from Online-Convert.com that treat the usage of our API.

 

How To Use The Online-Convert.com API

Before we list all the different video and blog tutorials we have made, you sure want to know more about our API in general. Here’s a quick summary of what you need to know about the API:

 

• What does it do?
With the API, you can convert different files (video, audio, document, image, ebook and more) into other, more common formats. Cross-conversion, aka conversion from one file type to another, is also possible (e.g. from video to audio).

• What do I need to use the API?
For the free version of the API as well as the professional paid version, you need a personal API key. You can get it via registering for a free account on Online-Convert.com.

• What can I do with the free API?
When using the free API, compared to the paid one, you have a few limitations. The amount of conversion minutes available for the free usage are 30 conversion minutes per 24 hours. Furthermore, only files with a size up to 100 MB can be uploaded.

• What about the paid API?
The paid version of our API is not limited with the aforementioned restrictions. Payment is made upfront and you can decide how many conversion minutes you want to purchase. Files we can not process and therefore not convert will not be charged. Invoice payment is also possible.

 

For more detailed explanations, information and the exact prices, you can have a look at our API documentation:

 

API Tutorials

With all these information in mind, lets have a look at the tutorials that will show you how to use the Online-Convert.com API. For all of these, you will need a Google Chrome app called Postman. It is cost-free and the perfect tool to test our API and create your first API calls. You can find it here.

EDIT:
You can now use Postman even when you are not using Google Chrome. Head over to GetPostman.com and grab the software app for your operating system. It is available for Mac OS, Windows (x32, x64) and Linux (x32, x64).

If you are just starting out with using APIs and need some guidance on the basic commands and the handling of Postman, you should have a look at the introductory first. In the following blog tutorial, you can learn how to use the app to make easy API calls, as well as find a link to a collection file you will need:

We also have an introductory video tutorial to Postman and the first steps with our API. You can find it on YouTube together with other tutorials of Online-Convert.com or by following this link:

 

Batch Conversion

Something that our webservice does not offer is batch conversion. In order to convert several files, you have to open the converters you want to use in different tabs. The API, however, supports the conversion of several files at the same time, either to the same or multiple target formats. How this is done is explained in this tutorial:

Of course we also created a video tutorial for this. Check it out on YouTube:

 

Video Editing Via API

There are several ways to edit a video using not only the Online-Convert website, but also the API. Cropping and cutting, changing audio and video codecs, changing aspect ratio, removing audio and even more is possible with the API.

The following tutorials contain all needed information and code necessary for video editing:

 

PDF Editing Via API

Another feature that the web-service isn’t able to offer is the editing of PDFs. Combining PDFs into one document or adding password protection to your document is made easy with our API. You can edit any file you upload as long as the format you convert it to is an Adobe PDF.

These tutorials explain how you can edit your PDF documents using our API:

 

Extract Metadata From Files Via API

Files, no matter if they are documents or audio files, images or videos, contain hidden data that can not be seen when opening it. Using our API, you can extract these information in an easy to read JSON file. The file can be open in any word processing software to reveal hidden metadata.

  • Extract Metadata From Files

If you have any questions, feel free to contact us at time2help [at] online-convert [.] com