How To Decrease Video Size
-
Hello. I have been, somehow :), able to capture video from my USB camera using media foundation api. But the problem is that for a duration of about 10 seconds, the video size is 70-72 mb. I don't have to tell you that, that is a lot of video size for this duration. I have tried lowering Frame Rate and AVG BitRate of the video stream but in vain. What should I change to get this size to minimum? Thanks for any pointers.
This world is going to explode due to international politics, SOON.
-
Hello. I have been, somehow :), able to capture video from my USB camera using media foundation api. But the problem is that for a duration of about 10 seconds, the video size is 70-72 mb. I don't have to tell you that, that is a lot of video size for this duration. I have tried lowering Frame Rate and AVG BitRate of the video stream but in vain. What should I change to get this size to minimum? Thanks for any pointers.
This world is going to explode due to international politics, SOON.
It is little hard to tell you exactly what your best course of action is, because you have left out some key information, such as image resolution, video format and frame rate. However, your numbers are typical if you are storing uncompressed video with the following settings: Resolution: 352x288 Video format: AVI, Raw video (RGB or YUV) at 24 bits per pixel Frame rate: 25 FPS. [Resolution and Frame rate based on PAL being the TV standard used in Pakistan] If the above values seem correct to you, you need to compress the video in order to make the video size smaller. There are obviously many video formats, such as MJPEG, MPEG2, MPEG4, H.264 and so on. You would need to determine the best fit for your project. Your USB camera might be able to deliver compressed video in different formats, but if it does not, you will have to do the compression on your computer as the raw video frames are being received from the camera. If I am dead wrong and you are actually storing high resolution images, then we need to come at this from another angle. Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
-
It is little hard to tell you exactly what your best course of action is, because you have left out some key information, such as image resolution, video format and frame rate. However, your numbers are typical if you are storing uncompressed video with the following settings: Resolution: 352x288 Video format: AVI, Raw video (RGB or YUV) at 24 bits per pixel Frame rate: 25 FPS. [Resolution and Frame rate based on PAL being the TV standard used in Pakistan] If the above values seem correct to you, you need to compress the video in order to make the video size smaller. There are obviously many video formats, such as MJPEG, MPEG2, MPEG4, H.264 and so on. You would need to determine the best fit for your project. Your USB camera might be able to deliver compressed video in different formats, but if it does not, you will have to do the compression on your computer as the raw video frames are being received from the camera. If I am dead wrong and you are actually storing high resolution images, then we need to come at this from another angle. Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
Camera is giving me the video with following attributes. Resolution = 640 x 480; Frame Rate = 30 fps; Color Scheme = RGB32 Encoding Format = WMV; Since I am storing video data as
.wmv
, does't it mean that video being stored is compressed (or encoded) ?This world is going to explode due to international politics, SOON.
-
Hello. I have been, somehow :), able to capture video from my USB camera using media foundation api. But the problem is that for a duration of about 10 seconds, the video size is 70-72 mb. I don't have to tell you that, that is a lot of video size for this duration. I have tried lowering Frame Rate and AVG BitRate of the video stream but in vain. What should I change to get this size to minimum? Thanks for any pointers.
This world is going to explode due to international politics, SOON.
Encode it as an MP4 File. MP4 video files are up to four times smaller than mpeg videos. Tutorial: Encoding an MP4 File : http://msdn.microsoft.com/en-us/library/windows/desktop/ff819476(v=vs.85).aspx[^] Media Foundation Programming Guide : http://msdn.microsoft.com/en-us/library/windows/desktop/ms697062(v=vs.85).aspx[^] video capture sample : http://code.msdn.microsoft.com/windowsdesktop/Media-Foundation-Capture-78504c83[^]
-
Camera is giving me the video with following attributes. Resolution = 640 x 480; Frame Rate = 30 fps; Color Scheme = RGB32 Encoding Format = WMV; Since I am storing video data as
.wmv
, does't it mean that video being stored is compressed (or encoded) ?This world is going to explode due to international politics, SOON.
AmbiguousName wrote:
Since I am storing video data as
.wmv
, does't it mean that video being stored is compressed (or encoded) ?Yes, your video is compressed, but not by much. If you do the calculation to see how large a 10 second uncompressed video file would be using your values, you get something like this: 640 * 480 * (32/8) * 30 * 10 = 368,640,000 = 352 MB This shows that the raw video is about 5 times larger than your compressed video. That is not an impressive compression ratio at all, so you should consider switching to H.264 as suggested by SuperCoder2014. Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty