I am new to the video editing realm, I wonder about the huge file size from video editing software like Shotcut and iMovie exporting. I googled around but didn't get a clear clue, so any information is welcome. Thanks.

I downloaded the video from Youtube with a command line tool called youtube-dl. The downloaded mkv file is 29:11 minutes long and 389MB on disk. VLC gives these details about the video file.

codec details

Then I import it to Shotcut, cut it into a few splits and delete some of them, so the resulting video is about 22 minutes long. After exporting it using default Shortcut settings I get a 805MB mp4 file, that is more than doubled in size, even disregarding the fact that this video is 7 minutes shorter now. I also tried to kind of "compress" the exported video with a software HandBreak as some had recommended online, but I still get a file of around 660MB.

So I want to know, what kind of "magic" algorithm does Youtube use to store/stream their contents with a small file size and good quality? If I want to provide streaming service on my own site, what settings do I need to change to get a similar result? Is there any software or app that offers such an algorithm?

Sorry for my bad English, thanks again.

3

There are 3 best solutions below

0
On

If you're like me and were using youtube as a method to get the most optimum compression/quality on videos for use on the web, but were tired of encoding your video, uploading to YT, then re-downloading it every single time just to get the result you wanted, here's the settings I landed on in Shotcut. It may not be exactly the same, but if ultimately you were looking to get the file size down to reasonably comparable size to the YT download, and keep quality "good enough" to still look good on a web page, these settings will get you pretty close the the YT result and seem to work well for the job.

Video Tab Codec Tab Audio Tab

0
On

Sites like YouTube actually provide multiple different bit rate versions of the video to allow for different devices and different network conditions - this use Adaptive Bit Rate Streaming. See here for an example and more info:

The general process to convert a high quality large bit rate video file to a (generally) lower quality lower bit rate video file is called transcoding - basically converting the video from one enclosing format to another: https://en.wikipedia.org/wiki/Transcoding

2
On

Bro,generally most mkv videos files uses high compression encoder already like x264 etc...

However I have done a few statistics that I had done to share with you.The general compression analysis

Side by side comparison of static low motion video

Anyway if you really have no idea,how to compress it more. try the default export video setting of shotcut,HEVC main profile.It's actually quite good generally.

setting:quality based vbr,quality:50%,qscale=16,GOP=126 frames,disable audio(since no audio source)

Ok:here you go: flv.mp4,7974kb.hevc_nvec.mp4,2466kb.lib265.mp4,2655kb.nvec_hevc.mp4,2466kb,ori.mp4,186533kb

please do note that i uses hardware encoding.^^.So the compression ratio is not absolute