Can I compress the video recording with Enterprise?

Hello,

With the starter version when I record video through the app the video file size is so big even after a few seconds even with the settings at the lowest for the device. I tested this on my Samsung Galaxy S4. So it is impossible to write any app that needs to use video recording because I would want to upload the video to a server. With enterprise is there any way to make the video smaller in file size? Od do you know a way with any version here? I assume when developing with something other than corona labs they can compress the video or do something to share videos. This has been a big limit for me while using corona labs.

Thanks,

Warren

Hi Warren,

You could consider the Zip plugin to compress the file, but that feature is currently restricted to Pro or Enterprise. Natively (Enterprise) I’m sure there is a way to compress the file as well, but you would need to research native options for that.

Take care,

Brent

Thanks Brent. I downloaded an MP4 video file just now and zipped it with Windows to see how much I can compress it and it went from 4,923Kb to 4,901Kb. So it did not compress hardly at all.

Any ideas?

Hi Warren,

Out of curiosity, have you searched for how developers might handle this outside of Corona? I’m not even sure if there’s an on-device way to do post-recording video compression, which is effectively what you’re seeking to do. I’m curious to hear what you discover, if anything…

Brent

I will try researching this. I too would like to know how it is handles because there are so many video sharing apps out there and they must do something. If I record a video through CL here for 10 seconds the video is so large in file size I cannot even upload it to a server without it timing out. I set the resolution to the lowest. I do not know of anything else to change when recording a video.

It seems they have the same issue also. I was trying to set the resolution through corona labs with the preferredQuality settings but the file size was still big. I ended up going to the video camera settings and I could adjust the resolution there. I could set the video setting down to 320x240 and the file size was small. The next one up being 1280x720 made the file size huge again. Not sure what to do except not do any apps that uses the video recording. I have no way of telling what the setting is before using the video camera.

Digital video is already for the most part highly compressed.  I don’t know the specifics of what we use, but I would expect that we are using H.264 which is already a highly compressed format.  The MP4 part is just a metadata wrapper around the H.264 data.  There are some encoders that will compress more than H.264 but the quality will be pretty bad.

There are three factors that control the video’s file size:

  1. Resolution.  Like a fixed image, a 480p image (720x480px) will be smaller than a 720p (1280x720) or a 1080p (1920x1080) image.  Magnify this by:

  2. Framerate:  This is the number of frames per second.  A 24 fps video will be smaller than a 30 fps video which will be smaller than a 60 fps.  Then factor in:

  3. Duration.  The longer the clip the bigger the data stream.

As each frame is captured and rendered, the process is then compressed using an encoder.  The H.264 is one of the most common “for the web” formats used to compress the video.

If you want to make a video smaller, you can lower the resolution, lower the frame rate or cut the duration.

You have no control over anything other than duration with the Corona SDK video recorder.  If you use Enterprise or Corona Cards, you can build your own video recorder and alter the resolution and the FPS to produce smaller videos.

Rob 

Hi Warren,

You could consider the Zip plugin to compress the file, but that feature is currently restricted to Pro or Enterprise. Natively (Enterprise) I’m sure there is a way to compress the file as well, but you would need to research native options for that.

Take care,

Brent

Thanks Brent. I downloaded an MP4 video file just now and zipped it with Windows to see how much I can compress it and it went from 4,923Kb to 4,901Kb. So it did not compress hardly at all.

Any ideas?

Hi Warren,

Out of curiosity, have you searched for how developers might handle this outside of Corona? I’m not even sure if there’s an on-device way to do post-recording video compression, which is effectively what you’re seeking to do. I’m curious to hear what you discover, if anything…

Brent

I will try researching this. I too would like to know how it is handles because there are so many video sharing apps out there and they must do something. If I record a video through CL here for 10 seconds the video is so large in file size I cannot even upload it to a server without it timing out. I set the resolution to the lowest. I do not know of anything else to change when recording a video.

It seems they have the same issue also. I was trying to set the resolution through corona labs with the preferredQuality settings but the file size was still big. I ended up going to the video camera settings and I could adjust the resolution there. I could set the video setting down to 320x240 and the file size was small. The next one up being 1280x720 made the file size huge again. Not sure what to do except not do any apps that uses the video recording. I have no way of telling what the setting is before using the video camera.

Digital video is already for the most part highly compressed.  I don’t know the specifics of what we use, but I would expect that we are using H.264 which is already a highly compressed format.  The MP4 part is just a metadata wrapper around the H.264 data.  There are some encoders that will compress more than H.264 but the quality will be pretty bad.

There are three factors that control the video’s file size:

  1. Resolution.  Like a fixed image, a 480p image (720x480px) will be smaller than a 720p (1280x720) or a 1080p (1920x1080) image.  Magnify this by:

  2. Framerate:  This is the number of frames per second.  A 24 fps video will be smaller than a 30 fps video which will be smaller than a 60 fps.  Then factor in:

  3. Duration.  The longer the clip the bigger the data stream.

As each frame is captured and rendered, the process is then compressed using an encoder.  The H.264 is one of the most common “for the web” formats used to compress the video.

If you want to make a video smaller, you can lower the resolution, lower the frame rate or cut the duration.

You have no control over anything other than duration with the Corona SDK video recorder.  If you use Enterprise or Corona Cards, you can build your own video recorder and alter the resolution and the FPS to produce smaller videos.

Rob