Registered Member
|
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. |
Registered Member
|
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. |
Registered Member
|
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.
|
Registered Member
|
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. |
Registered Member
|
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! |
Registered Member
|
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.
|
Moderator
|
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. |
Registered Member
|
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. |
Moderator
|
To adjust the bit rate choose a different rate from the render dialog drop down 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 |
Registered Member
|
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.
|
Registered Member
|
|
Registered Member
|
You can transcode the video to HEVC(H265) to get the smaller file size: http://www.videoconverterfactory.com/tips/reduce-video-size-file.html
HEVC, as the successor standard to H.264, promises the half storage reduction as its algorithm uses high efficient coding by encoding video at the lowest possible bit rate while maintaining a high image quality level. You can change the video encoder to H265 now. |
KDE Developer
|
Hello,
H265 outperforms H264 only for 4K resolution, at the cost of much higher processing power. For HD, increasing x264 crf paramter (reducing VBR quality to the limit of acceptable degradation) it the right approach, then for few percents of size gain you can try lower speed presets (default is "medium", you can try "slow" or "slower", there are benchmarks around comparing speed and quality/size impact) |
Registered Member
|
Thank you so much amyschneider, this solution, in combination with lowering the quality via a scroll bar helped me tremendously. I went from 443 MB to 42 MB
Now here is the situation I'm not understanding, I'm reluctantly going from Kdenlive Version 17.12.3 to 20, and without changing anything from the rendering settings, my H264 file on version 17 was significantly smaller than the same exact same rendering, H264 mp4, done on version 20. Why?!?! Ultimately the H265 solution gives me the smaller file size I need with acceptable quality (I'm not doing anything fancy) but out of curiosity, I've been trying to track down the disparity between versions. I'm talking 93MBs in v17 vs 440MBs in v20. Is v20 throwing in more metadata? |
Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]