Jump to content
WnSoft Forums

Recommended Posts

Posted

Greetings,

I have a question about the size of MP4 files.

I originally created a slideshow with about 328 images. This show was created using the original out-of-the-camera sized images that were about 2,500 Kb each. The size of the slideshow's MP4 file was 519,785 Kb.

I then batched resized all the images down to 1920x1080, 90%, so each image averaged about 500 Kb. While I expected the files size to be reduced (as the exe files was), but it did not. It actually increased to 535,155 Kb. See attached.

So I am curious why the resizing of the files would actually increase the MP4 file's size, as opposed to decreasing it.

Just curious,

Gary

post-1794-0-79127400-1412174762_thumb.jp

Posted

Hi Gary,

Creating an MP4 file automatically resizes the images to whatever aspect ratio you have chosen. For example, if you choose HD at 1080p and your original images are 20 megapixel, they will be downsampled to the required size for the show as the mp4 is created. The probability is that the slight increase in size had to do with factors other than the images themselves such as bitrate, etc. The size difference is insignificant.

When videos are created, images are always resized according to the size and aspect ratios specified. The factors which affect the final file size are primarily the number of frames per second (a 60 fps will be essentially twice the file size of a 30 fps), bitrate, quality, presence or absence of audio and type of audio, etc. Here's a good read:

http://www.bbsoftware.co.uk/BBFlashBack/Support/UserGuides/FileSize.aspx

Best regards,

Lin

Posted

Hi Gary,

Creating an MP4 file automatically resizes the images to whatever aspect ratio you have chosen. For example, if you choose HD at 1080p and your original images are 20 megapixel, they will be downsampled to the required size for the show as the mp4 is created. The probability is that the slight increase in size had to do with factors other than the images themselves such as bitrate, etc. The size difference is insignificant.

When videos are created, images are always resized according to the size and aspect ratios specified. The factors which affect the final file size are primarily the number of frames per second (a 60 fps will be essentially twice the file size of a 30 fps), bitrate, quality, presence or absence of audio and type of audio, etc. Here's a good read:

http://www.bbsoftware.co.uk/BBFlashBack/Support/UserGuides/FileSize.aspx

Best regards,

Lin

Lin,

I can understand that if you choose different parameters (HD, bitrate, FPS, etc.), the file size will be different.

However, both files were created exactly the same way using PTE's 'HD (1920x1080), low quality'. The only difference was the size of the original 328 files which were 3008x2000. And actually, when I batched resized, they were resized at 1920 on the long side so the aspect ratio was still 1.5 (1920x1277). There was not other changes to the show.

Still don't understand how can reducing the files' size actually increase the MP4 file size, when all other parameters remained the same?

Gary

Posted

Hi Gary,

The size increase was statistically insignificant. Compression level differences when you resized the files may have played a role. For example, if the original files were compressed at the equivalent of Photoshop level 8 and you resized and used a slightly smaller compression level such as 10 it could easily make the difference. Computers are not capricious, they have fixed rules. Something was different.

My suggestion is to not search for an answer because if probably will not be forthcoming. In the immortal words of Bill Murray in "Meatballs:" "It just doesn't matter...."

Best regards,

Lin

Posted

Gary,

Just thinking out loud (I know, it is dangerous!!).

I would not really consider using the Low Quality preset - ever.

It might be interesting to save the same show at a lower resolution and a Higher (Highest) quality preset?

The file size would (should) go down but the quality "might" be better than the Low Quality (High Res) preset - on your TV??

I have never used anything other than 1920x1080 High Quality, but neither have I included 328 slides in an MP4!!

:)

DG

P.S. With that many slides, another way of drastically reducing MP4 file size would be to knock 0.5 - 1.0 second off each slide's duration?

Posted

Question: Why should the two video files have equal size? There in no reason for assuming this! In both cases the same encoding process was used, but the input data was different. In one case, the images were resized by PTE, while in the other case the images were resized by an external image editor or image viewer. Hence, the video encoder was fed by two totally different streams of images.

Regards,

jt

Posted

Interesting question. Not sure if there is a definitive answer as to why the file sizes are smaller when resized automatically (by ffmpeg/x264 or PTE). Assuming the video frame aspect ratio is the same and not letterbox is happening.

ffmpeg/x264 has many scale options.

http://ffmpeg.org/ffmpeg-filters.html#scale

Thanks,

Tom

Posted

Greetings,

Maybe I am not understanding some of the replies. They don't seem to be addressing the actual steps I took.

Lin said "Compression level differences when you resized the files may have played a role. For example, if the original files were compressed at the equivalent of Photoshop level 8 and you resized and used a slightly smaller compression level such as 10 it could easily make the difference."

Lin, The original files were not 'compressed'. They were out of the camera images. These original images were resized at 90% (Faststone). Wouldn't going from 8 to 10 be upsizing? The file became larger, not smaller, with the resizing.

Dave said: "I would not really consider using the Low Quality preset - ever. It might be interesting to save the same show at a lower resolution and a Higher (Highest) quality preset? The file size would (should) go down but the quality "might" be better than the Low Quality (High Res) preset - on your TV??... P.S. With that many slides, another way of drastically reducing MP4 file size would be to knock 0.5 - 1.0 second off each slide's duration?"

Dave, My main purpose in choosing Low Quality vs. High Quality is to keep the file size down. I can not see a difference between them. I have since reworked the show and knocked of about 10 minutes of slides and music, so the file is much smaller now. But I always thought and think I saw the MP4 file reduced in size when I used smaller sized images.

Jt said: "In one case, the images were resized by PTE, while in the other case the images were resized by an external image editor or image viewer. Hence, the video encoder was fed by two totally different streams of images."

Jt, I am not sure what you mean by the 'images were resized by PTE, while in the other case....'. For each time the MP4 file was created by PTE, they were feed the same images. Only set was larger than the other. So PTE did the same process on the same type, but smaller files.

Tom said: "Interesting question. Not sure if there is a definitive answer as to why the file sizes are smaller when resized automatically."

Tom, I don't understand when you say 'resized automatically'. They were resized using Faststone.

I am going to do a few more test to see what's what. Maybe it was just a fluke. Thanks all,

Gary

Posted

Gary,

Your out of camera images, if they are jpeg are compressed.

If you were to take a raw file and just convert it and then save as jpeg at 100% you could then compare the resulting "uncompressed" jpeg with your ooc jpeg.

It probably will have little bearing on your "problem" but I don't think it is correct to say that your ooc jpeg is not compressed?

DG

Posted

Hi Gary,

As david says, there is no such thing as an "uncompressed" jpg file. JPG is a compression algorithm. Smaller numbers indicate higher levels of compression, larger numbers indicate less compression thus higher quality and larger file size.

Best regards,

Lin

Posted

Gary,

Your out of camera images, if they are jpeg are compressed.

If you were to take a raw file and just convert it and then save as jpeg at 100% you could then compare the resulting "uncompressed" jpeg with your ooc jpeg.

It probably will have little bearing on your "problem" but I don't think it is correct to say that your ooc jpeg is not compressed?

DG

Dave and Lin,

No, I did not mean to say that ooc jpg images are not compressed. I was not sure what you were meaning. But I am resizing (and compressing) the original ooc jpgs even further, so I don't see how they would make a larger MP4 file.

I just don't see the logic. :blink:

Dave, I also just ran the show (after reducing it down by eliminating images and music files) using Low Quality and High Quality. The LQ's size is 425 Mbs while the HQ is 1,023 Mbs. So since I don't see any difference in quality, I don't see much reason for creating such large (HQ) files. Maybe it makes a difference on a huge TV screen?

Gary

Posted
...

Jt said: "In one case, the images were resized by PTE, while in the other case the images were resized by an external image editor or image viewer. Hence, the video encoder was fed by two totally different streams of images."

Jt, I am not sure what you mean by the 'images were resized by PTE, while in the other case....'. For each time the MP4 file was created by PTE, they were feed the same images. Only set was larger than the other. So PTE did the same process on the same type, but smaller files.

...

Gary, please rethink your statement! In one case, PTE was fed with your originals (high resolution images). In the second case, PTE was fed with copies (not the same images) that had been resized with Faststone. In the first case the large images had to be resized to the height of 1080 in order to do video encoding. This resizing was triggered by PTE and it was done using a resizing algorithm we do not know, perhaps a rather fast algorithm. In the second case PTE did not need to trigger resizing, as the input images had already been resized with Faststone. If I remember it correctly, Faststone normally uses the Lanczos algorithm that produces good results while being slow. So it is very likely that your two processes of video encoding were based on copies of your original images that had passed different resizing methods. Different algorithms lead to copies of different sharpness, and video encoding of sharper images may lead to a larger amount of data.

Regards,

jt

Posted

Gary, please rethink your statement! In one case, PTE was fed with your originals (high resolution images). In the second case, PTE was fed with copies (not the same images) that had been resized with Faststone. In the first case the large images had to be resized to the height of 1080 in order to do video encoding. This resizing was triggered by PTE and it was done using a resizing algorithm we do not know, perhaps a rather fast algorithm. In the second case PTE did not need to trigger resizing, as the input images had already been resized with Faststone. If I remember it correctly, Faststone normally uses the Lanczos algorithm that produces good results while being slow. So it is very likely that your two processes of video encoding were based on copies of your original images that had passed different resizing methods. Different algorithms lead to copies of different sharpness, and video encoding of sharper images may lead to a larger amount of data.

Regards,

jt

Greetings Jt,

Ok, now I am confused. You said " PTE was fed with your originals (high resolution images)....the large images had to be resized to the height of 1080 in order to do video encoding."

So if images of 3008x2000 are used, PTE resizes them down to 'a height of 1080'? They why are we putting in large sized images to account for heavy zooms and pans to reduce pixelation? Not sure if I understand your point.

But, then a light bulb just went off in my head. When making an MP4, I select 'HD 1929x1080', so that is where PTE is resizing the images (?). OK. So what happens to the images that were 3008x2000? They too get resized and you lose the larger file needed for the heavy panning or zooming?

So to get a smaller MP4 file, I need to lower my 90% quality that I used when resizing the original images in Faststone and hope the quality does not suffer. I wonder if Igor can tell us what '%' his algorithm his process uses?

Thanks... Gary

Posted

Hi Gary,

That's not exactly how it works. When you do a deep zoom on an image which is original size in PTE for MP4 creation you have "X" quality. When you do a deep zoom on an image which has been resized externally you have "X-resize" quality.

For quality images it's better to let PTE do the resizing for the mp4 because the resizing is being done dynamically by the program. When you have a deep zoom and the original image is, for example, out of your camera at say 20 megapixels as an example and you zoom to 1:1, the 1080P resolution image will be created from PTE from a 1:1 zoom. When you feed PTE an externally resized image then zoom into it to 1:1, the image you end up with at 1080P will be of much less quality because you start at 1080 then zoom in rather than starting at 20 megapixels and zooming in.

For creating video, it's always better to let PTE do the resizing if there are deep zooms. It won't matter for images which are not zoomed, but leave the ones you intend to zoom into at full resolution and let PTE do the resizing dynamically for best results.

Best regards,

Lin

Posted

Hi Gary,

That's not exactly how it works. When you do a deep zoom on an image which is original size in PTE for MP4 creation you have "X" quality. When you do a deep zoom on an image which has been resized externally you have "X-resize" quality.

For quality images it's better to let PTE do the resizing for the mp4 because the resizing is being done dynamically by the program. When you have a deep zoom and the original image is, for example, out of your camera at say 20 megapixels as an example and you zoom to 1:1, the 1080P resolution image will be created from PTE from a 1:1 zoom. When you feed PTE an externally resized image then zoom into it to 1:1, the image you end up with at 1080P will be of much less quality because you start at 1080 then zoom in rather than starting at 20 megapixels and zooming in.

For creating video, it's always better to let PTE do the resizing if there are deep zooms. It won't matter for images which are not zoomed, but leave the ones you intend to zoom into at full resolution and let PTE do the resizing dynamically for best results.

Best regards,

Lin

Lin, This has been a very interesting lesson for me. If I understand this right, and reducing the file size is the goal, resizing/reducing the images will help make the exe file size to be a smaller. But this does not necessarily work for making MP4s. So if I am trying to make my exe and MP4 files to be small in size, I should make one version with resized files for exes and then make another without resized files (original size) for making MP4s?

Gary

Posted

Hi Gary,

My suggestion would be to only use full sized OOC (out of camera) images for slides where you will be doing deep zooms. That goes for both MP4 and executables. There is nothing to be gained by having an image larger in pixel dimensions than the resolution of the display on which it will be shown except in those cases where deep zoom-in's are used.

PTE will automatically resize any image whether larger or smaller than your intended resolution when making an MP4. Whether this is a good thing or a bad thing depends on several factors. Since all frames must be stored inside the video container for any video, the less compression used (higher quality) the larger the overall file size but also the better the quality of the finished product to the extent that there are no artifacts of compression visible.

The rule of thumb is to leave the original size image both on executables and on mp4's for those slides where zoom-in's are being done. This way, PTE will create the slide to be stored from the zoomed in high resolution image rather than from a zoom in on an already reduced resolution image. A unzoomed 1080x1920 will look identical whether PTE resizes it on the fly from a 20 mp original or you resize it before creating the executable. So the advantage in file size is to resize all images except those which have deep zooms for executables and the savings in time for mp4's because PTE won't have to resize the majority of images, only those with deep zooms.

Best regards,

Lin

Posted

Lin, This has been a very interesting lesson for me. If I understand this right, and reducing the file size is the goal, resizing/reducing the images will help make the exe file size to be a smaller. But this does not necessarily work for making MP4s. So if I am trying to make my exe and MP4 files to be small in size, I should make one version with resized files for exes and then make another without resized files (original size) for making MP4s?

Gary

Gary,

For most (I suspect) the EXE is the Primary Goal and images can be optimised to suit.

It is then a simple matter to create an MP4 from the completed project.

There is definitely not a case for two different versions. If the EXE is the best you can make it then the MP4 will be as good as it can be.

We will have to agree to disagree over the quality issue when making the MP4 and I think that somewhere along the way you are missing something in this respect.

DG

Posted

So if I am trying to make my exe and MP4 files to be small in size...

Gary,

Could you please explain why achieving a small file size is so important to you? I suspect that most of us make our sequences and accept that whatever the output file, whether EXE or MP4, the file size as delivered by PTE is the output size we have got to live with. Or am I peculiarly unique in not caring what the output file size is? After all, disk space is cheap and the output file is always going to be too big to send via e-mail as an attachment. So why worry?

regards,

Peter

Posted

Hi Gary,

My suggestion would be to only use full sized OOC (out of camera) images for slides where you will be doing deep zooms. That goes for both MP4 and executables. There is nothing to be gained by having an image larger in pixel dimensions than the resolution of the display on which it will be shown except in those cases where deep zoom-in's are used.

PTE will automatically resize any image whether larger or smaller than your intended resolution when making an MP4. Whether this is a good thing or a bad thing depends on several factors. Since all frames must be stored inside the video container for any video, the less compression used (higher quality) the larger the overall file size but also the better the quality of the finished product to the extent that there are no artifacts of compression visible.

The rule of thumb is to leave the original size image both on executables and on mp4's for those slides where zoom-in's are being done. This way, PTE will create the slide to be stored from the zoomed in high resolution image rather than from a zoom in on an already reduced resolution image. A unzoomed 1080x1920 will look identical whether PTE resizes it on the fly from a 20 mp original or you resize it before creating the executable. So the advantage in file size is to resize all images except those which have deep zooms for executables and the savings in time for mp4's because PTE won't have to resize the majority of images, only those with deep zooms.

Best regards,

Lin

Lin,

I appreciate your explanation and understand about using higher res images for deep zooms. Thanks. My original question had to do with the final size of an MP4 file. When the MP4 file that was created using much smaller resized images came out to be a larger sized file then the OOC files, it made me wonder. So apparently the PTE's processing of the smaller sized images (from Faststone's resizing) actually increased the size of each of these smaller images. To me, that was strange but that seems the way it happens.

Dave,

I wish I could see a difference between the Low vs the High quality MP4 output. :)

Peter,

Originally, my efforts to create relatively smaller sized slideshows was not to burden the Beechbrook hosting site. Some even complained that they would not even attempt to download shows greater than a certain size. But, also, when I put them on a thumbdrive to carry around to show at friends homes, I'd rather just carry one thumbdrive. Recently, my wife wanted all of my shows (exe's and MP4's) to be put on her 64Gb thumbdrive. They all did not fit. So if I can make a slideshow as a smaller sized file, and not see any difference in quality, why not? Sure disk space is cheap, but there has to be some attention to conserve space. I just had to replace one of my three 500 Gb drives in my PC that I used for mostly images and slideshows with a 2 Tb drive. I hope I don't have to replace that one too soon.

Gary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...