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. Check out how to use Postman to test our API and then let’s 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, let’s 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": "https://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": "https://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": "https://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": "https://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": "https://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 the options we have listed here:
{ "input": [{ "type": "remote", "source": "https://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 } }] }
Follow us