Reply to topic

File size after rendering

jpt
Registered Member
Posts
7
Karma
0

File size after rendering

Fri May 30, 2014 3:38 pm
Hello,
does anyone knows which codecs to use for the rendering phase in order to get a file as small as possible?

I filmed some sequences with a DVD resolution : 720*576 (.mpg files). 4.2GB in total.
I created a project with the same resolution (DV/DVD PAL 720*576) and merged all files.
Then I used the H.264 format for rendering (2 pass, full project, no rescale).
The output file size was 6.7GB (for the same resolution (720*576) and the same lenght as input files).

I believed that the H.264 was the "most effective" codec in term of video compression.
Is it true ?
How to reduce the output file size without reducing the resolution to get at least to the original input files size (4.2GB)?
What is the most effective method the reduce an output file size duroing the rendering phase without degrading the resolution or the quality of the picture?


Thanks in advance for your inputs.
User avatar TheDiveO
Registered Member
Posts
203
Karma
2

Re: File size after rendering

Fri May 30, 2014 4:05 pm
It strongly depends on what you consider to be video. While H.264 is quite effective in compressing a lot of video footage with only moderate processing power when compared to previous codecs, it may suck for some special footage cases. There is no single, simple codec and parameter set which produces the smallest files ever. In fact, if you tell H.264 to limit itself, it does produce small files, but maybe not at the quality you are expecting.

H.264 and many other codecs may even be inappropriate, depending on the source footage you have. For instance, screenshot video can be a real headache if you expect pixel-perfect video. Please be aware that many video codecs have been optimized towards what non-computer people consider to be video: people, faces, cities, landscapes, you name it.

You'll need to do more research for yourself and play with different codecs and parameters. Don't expect the single golden rule for encoding video. We're not there, yet.


TheDiveO on YouTube: diving videos and aerial (quadcopter) videos, all made with Kdenlive.
TheDiveO Blog: know-how about Protune-grading in Kdenlive, GoPro HD Hero 3, DJI Phantom Quadcopter, full face mask diving, and some more...
User avatar TheDiveO
Registered Member
Posts
203
Karma
2

Re: File size after rendering

Fri May 30, 2014 4:10 pm
PS. You don't even specify the total runtime of your rendered file. How are we unfortunate forum folks supposed to guess whether 4 Gigs are good or bad? Resolution alone isn't enough for guessing. To give you some random numbers: 3:30 minutes of 1080p 25fps footage at max 8MB/s is 200MByte. Is this too big? I don't know! It depends.


TheDiveO on YouTube: diving videos and aerial (quadcopter) videos, all made with Kdenlive.
TheDiveO Blog: know-how about Protune-grading in Kdenlive, GoPro HD Hero 3, DJI Phantom Quadcopter, full face mask diving, and some more...
jpt
Registered Member
Posts
7
Karma
0

Re: File size after rendering

Fri May 30, 2014 5:36 pm
Hi again,
the total duration is 1h48mn and resolution 720x576 in both cases (source + output file).
I was more surprised by the size "expension" after rendering compraring to the source files than by the absolute size after rendering.

In other words :
- Source files : 3 files, format: mpgv (MPEG2), total duration: 1h48mn, resolution: 720x576, frame rate: 50fps (interlaced), total size of the 3 files : 4.3GB.
- After rendering: 1 file, format: mp4 (H.264 2 pass), duration: 1h48mn, resolution: 720x576, frame rate: 25fps (progressive), size: 6.7GB.
capslock
Registered Member
Posts
356
Karma
0
OS

Re: File size after rendering

Fri May 30, 2014 6:55 pm
File size after rendering mainly depends on the total bitrate of the result movie. Add video and audio bitrate, divide by 8 and you will get the size in bytes needed for one second of rendered material. If you want to get a total of 4.2 GB you will have to calculate the bitrates accordingly. DVD usually has a bitrate of 6000kbit to 9000kbit.

1h48m = 108minutes = 6480 seconds.
4.1GB/6480secs=632.716bytes/s that is a total rendering bitrate of about 5000kbit, e.g. 128kbit sound and 4700kbit vid.

The given picture size should be fine with h.264 and 4700kbit.
Good luck!
drnn1076
Registered Member
Posts
22
Karma
0
OS

Re: File size after rendering

Fri May 30, 2014 8:24 pm
Capslock is right the problematic size of your file might be caused by the bitrate.

To check those figures, I recommend using MediaInfo (http://mediaarea.net/en/MediaInfo). It is a simple and straightforward tool to get the codec's information of a video file.

If you want to get a better understanding of bitrates, you could check these links:

http://neuron2.net/LVG/ratesandsizes.html

http://help.encoding.com/knowledge-base ... deo-files/

Last edited by drnn1076 on Sat May 31, 2014 1:37 pm, edited 1 time in total.


User avatar ttguy
Moderator
Posts
824
Karma
4
OS

Re: File size after rendering

Sat May 31, 2014 3:51 am
With modern codecs like H.264 you should be able to get the file size down by a fair amount compared to the DVD format of mpeg2 and still have the same quality of footage. But you have to tell kdenlive what bit rate you want to encode your H.264 footage at.

A good place to start would be capslock's suggestion of 128kbit sound and 4700kbit video - but he is predicting that this will give you a final size of 4.1Gig. You are aiming for lower than that.

What I would do is use the Render Using the Selected Zone Option to render a small part of your project. Render this at different bit rates starting from 4700kbit video and trying some lower bit rates. Then play the samples back to see how low you can go and still have acceptable quality.
Check the file sizes of these clips and use these as a guide to how big a final render at that bit rate will be.
jpt
Registered Member
Posts
7
Karma
0

Re: File size after rendering

Sat May 31, 2014 7:53 am
Hi all,
I made some tests during the night:

source : 2 files ; total time 1h32mn ;format: MPEG ; resolution 720x576 pixels PAL, Interlaced ; Overall bit rate (from mediaInfo): 6 532 Kbps, size 4GB.

Files after rendering with different formats (with default kdenlive values):
-> RawDV-PAL4:3: 1h32mn ; DV dv ; 720x576 ; PAL, Interlaced ; Bit rate 28 800 Kbps, size 18.6GB.
-> H264: 1h32mn ; MPEG-4 mp4 ; 720x576 ; PAL, Progressive ; Bit rate 9 795 Kbps, size 6.3GB.
-> HDV-PAL: 1h32mn ; MPEG-TS m2t ; 720x576 ; PAL, Progressive ; Bit rate 6 800 Kbps, size 4.4GB.
-> Theora: 1h32mn ; theora ogv ; 720x576 ; PAL, Progressive ; Bit rate 4 460 Kbps, size 2.9GB.
-> MPEG4: 1h32mn ; MPEG-4 mp4 ; 720x576 ; PAL, Progressive ; Bit rate 4 116 Kbps, size 2.7GB.
-> MPEG2: 1h32mn ; MPEG-PS mpg ; 720x576 ; PAL, Progressive ; Bit rate 4 056 Kbps, size 2.6GB.
Note that the default bitrate indicated in the rendering window for H264, MPEG4 and MPEG2 are the same : 12000.

None of the final files have a bitrate of 12000 and MPEG2 seems to have the better compression rate.
I would have expected to have h264 as better compression rate, followed by MPEG-4...and biggest file: raw DV.

Questions :
- What are / how are really set the bit rate values in the rendering windows?
- how to change adjust the bit rate?
- Is it possible to choose VBR or CBR?


Thank you.
User avatar ttguy
Moderator
Posts
824
Karma
4
OS

Re: File size after rendering

Sat May 31, 2014 2:38 pm
jpt wrote:Hi all,

Questions :
- What are / how are really set the bit rate values in the rendering windows?
- how to change adjust the bit rate?
- Is it possible to choose VBR or CBR?

To adjust the bit rate choose a different rate from the render dialog drop down
Image

You can create custom render profiles that can take any parameters ffmpeg can take. So to do VBR or CBR you just need to figure out what the required ffmpeg parameter is and use that in your custom render profile.

http://userbase.kde.org/Kdenlive/Manual/Project_Menu/Render#Create_Custom_Render_Profiles
normcross
Registered Member
Posts
300
Karma
0

Re: File size after rendering

Sun Jun 01, 2014 8:06 am
In addition to ttquy's post, if you do not want one of the video bit rate presets, just click in the box and type in the bit rate you want.
jpt
Registered Member
Posts
7
Karma
0

Re: File size after rendering

Sun Jun 01, 2014 12:00 pm
Thanks, I will make more tests...

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], bobthebuilder, donniezazen, Exabot [Bot], Google [Bot], Hans, Honoo, koriun, Majestic-12 [Bot], MichaelTiebesl, MSNbot Media, paulus3005, pedrorodriguez, Rewarp, shmerl, Sogou [Bot], tobywillsmer, tokiedian, Uri_Herrera, vpinon, Yahoo [Bot]