This forum has been archived. All content is frozen. Please use KDE Discuss instead.

File Size vs Quality

Tags: None
(comma "," separated)
hounddogproductions
Registered Member
Posts
29
Karma
0

File Size vs Quality

Mon Nov 01, 2010 11:12 pm
I look a bit around this forum but didn't see anything talking about how to get the maximum quality for the file size.

Here is my issue.

I am shooting in 1080p at 30fps. The camera saves it in mp4 format. The file size on the camera is say 200mb. When I import it into Kdenlive and do a few cuts and a title and export it as an mpg2 6000K the file size is 400mb AND the video quality has a noticeable difference.

I must be doing something wrong when rendering. I want to best quality I can get for the bitrate (like what the camera is doing).

Any suggestions on rendering something like this?

Thanks in advance.

Mark
vpoinot
Registered Member
Posts
6
Karma
0

Re: File Size vs Quality

Sat Nov 13, 2010 1:19 pm
I have a similar question.
I have a 30-minute long 1Gb video (shot with a HD camcorder). If I run ffmpeg -i on my file, here is the output:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MAH00018.MP4':
Metadata:
major_brand : MSNV
minor_version : 20054119
compatible_brands: MSNVmp42isom
Duration: 00:29:50.82, start: 0.000000, bitrate: 4328 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 4193 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s

From this video, I want to keep about 8 minutes, with a couple transition effects. Now I have no idea what rendering profile to use. Since I need to keep approximately 1/4 of the original video, I naively assume that the output video should be about 250 Mb without any loss in quality/video size. However when I chose a lossless HQ profile, I got a 2Gb video... for 8 minutes !

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'result.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf52.78.3
Duration: 00:08:04.39, start: 0.000000, bitrate: 32795 kb/s
Stream #0.0(und): Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 32476 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc
Stream #0.1(und): Audio: mp3, 48000 Hz, 2 channels, s16, 320 kb/s

I must be doing something wrong. It has probably something to do with the bitrate figures (the original has a lower bitrate than the output...).

I then tried an other profile and got a 250 Mb video, but the quality is terrible (large pixel blocks, etc.). Here are its properties:

Seems stream 0 codec frame rate differs from container frame rate: 120.00 (120/1) -> 59.94 (60000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'result2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf52.78.3
Duration: 00:08:04.30, start: 0.000000, bitrate: 4169 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 4034 kb/s, 60 fps, 59.94 tbr, 60 tbn, 120 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 127 kb/s

Clearly neither result is satisfactory, which brings me to my questions:
- how do I select a rendering profile based on the characteristics of the original video? Assuming I don't want to resize it, nor loose quality, that is.
- if I am ready to favor file size over picture quality, what would you recommend: lower bitrate? lossy codec? which one?
- what is the number pass good for? quality? E.g. for a given codec/bitrate, etc. if I select 2 passes, will I have a better result that if I had selected only one? How does this impact file size?

Any help much appreciated.

stevellion_drupal
Registered Member
Posts
3
Karma
0

Re: File Size vs Quality

Fri Dec 31, 2010 12:13 pm
Yes, I have exactly the same question... I have a 720 x 576 quality video clip and the last render I did of about 20 mins came to about 5.6gb...

How do I choose something that will make it a more sensible size :)
Granjow
Moderator
Posts
247
Karma
0

Re: File Size vs Quality

Fri Dec 31, 2010 5:58 pm
Chose a lower bitrate.
A bit rate of 8000k means 8000 kbit per second. So to calculate the final file size you roughly have:
File size [MB] = video length [s] * bit rate [kbit/s] / 8 / 1024
For example if you chose 8000k for your 20 min video (which is 60*20 = 1200 s) the file size will be
1200 s * 8000 kbit/s / 8 / 1024 = 1172 MB

Using dual-pass rendering leads to slightly more precise file sizes (but takes about twice as long since the first pass it looks at the whole video to see where one can compress more and where one should not). For very low bit rates this calculation may be not too precise, also if you use a very high bit rate the resulting video can be smaller than calculated if there simply is not enough input data. (Like, summarize my post in two pages.)

Simon
ddennedy
Registered Member
Posts
1315
Karma
1

Re: File Size vs Quality

Tue Jan 18, 2011 6:28 am
Friends, "lossless HQ" is supposed to provide minimal compression, and you should expect large file sizes. If that is not what you want, then do not use it.




Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient