Convert an MP4 video to MOV (QuickTime) format
Your converted MP4 to MOV file will play here.
This demo enables you to upload an MP4 video or input a URL for the video. After clicking submit, the file will be uploaded or fetched. The file conversion (transcoding) process then starts. In a short time ranging from a few seconds to minutes, depending on the duration and resolution of the video, the new MOV video file will be ready.
You can preview the converted video directly on the webpage or download the MOV file for your own use.
The MP4 file format is a digital multimedia container format most commonly used to store video and audio, but it can also store other data such as subtitles and still images.
This format is known for its wide compatibility across various devices, media players and web browsers. Due to it's high compression to quality ratio, file size can be kept small while maintaining high quality image quality. This makes it the most popular choice for video playback and streaming online.
MP4 files use separate compression for video and audio tracks; video is typically encoded using the H.264 codec (AVC) or the newer x265 codec (HEVC) while audio is compressed using the AAC codec.
The MOV file format is a multimedia container file format developed by Apple and is often associated with QuickTime. The container can store a variety of multimedia content, including video, audio and text (such as subtitles).
MOV files are typically used in high end video editing applications and in professional video productions. MOV files also support high quality, high data-rate codecs like Apple ProRes. For these two reasons MOV files have a tendency to have a very large file size. In this demo however we use the h264 codec which allows for higher compression and much smaller file sizes.
MOV files are highly compatible with Apple's ecosystem, making them ideal for users of Apple devices and software, like Final Cut Pro. Unless the MOV file uses the h264 codec, they are typically not supported by web browsers.
Converting an MP4 file to a MOV file might be necessary for several reasons. Firstly, if you are working within the Apple ecosystem, especially for professional video editing, MOV files often offer better integration and performance with Apple's software like Final Cut Pro.
Secondly, MOV files are known to handle a higher level of video and audio codecs, which might be beneficial for maintaining quality after editing.
Lastly, if you are aiming to add certain types of metadata or proprietary Apple codecs to your video file, converting to MOV might be required to achieve this.
This demo is developed using the Shotstack Ingest API, which is used to upload, transform and store videos and images. One of the Ingest API's transformations includes transcoding from one format to another (e.g., from MP4 to MOV), as well as resizing, cropping, adjusting frame rates, and more.
The user interface is built using an HTML form with Bootstrap for styling and a simple jQuery script. The script captures the form input and sends the data via an AJAX call to a Node.js Express application. The Node.js backend validates the request, formats the API JSON payload correctly, and POSTs it to the Ingest API. The API then handles the video conversion, saves the new MOV file online, and provides the download URL.
The open-source code for this project is available on GitHub. It can serve as a foundation for anyone looking to create their own automated media conversion tool.
curl --request POST 'https://api.shotstack.io/v1/render' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.amazonaws.com/footage/beach-overhead.mp4"
},
"start": 0,
"length": "auto"
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1280,
"height": 720
}
}
}'