View Full Version : Request for an MKV Calc!
RathO
24th September 2003, 07:23
As far as i know, there is no MKV calc available.. correct me if im wrong :p
Lots of people know the OGM Calc by Koepi, it is simple and VERY usefull. I use it to calc my video files to be muxed in MKV.. but guess what? i loose the overhead that MKV gets over OGM by using the OGM calc (of course!)... so it is not very usefull for this purpose...
Anyone interested in coding an MKV Calc?
Koepi? ;)
Regards
PS. I finally got home after a full month of forest firefighting in British-Colombia, Canada. You guys can't imagine how happy i am to be back online on my PC! :D
ssjkakaroto
24th September 2003, 12:41
good to bring this up, wasnt there a matroska dev that had some kind of dll that did the overhead calculation and was almost finished?
ChristianHJW
24th September 2003, 14:18
.. touché .. :( ....
alexnoe
24th September 2003, 15:49
The latest AVI-Mux GUI alpha code contains such a calculator :confused:
Someone just has to make sth like an own app from it!
stax76
24th September 2003, 16:32
or simply add 2 MB for 100 minutes (Overhead in KB = Frames * 0.013), if you use ogg there is no audio overhead like ogm, only video overhead
alexnoe
24th September 2003, 16:40
Of course is there such overhead! Read the matroska specs, especially the parts about what a block looks like, with and without lacing, or just have a look at my source code
RathO
24th September 2003, 17:16
@Dolemite: i try to avoid manual calculation so i avoid errors.. ;)
@All: oh, the project seems to interest more than one dude :p im just not a programmer, so i gotta ask for it... i guess the project is on its way. Its just a matter of time.
Regards
stax76
24th September 2003, 19:26
Of course is there such overhead! Read the matroska specs, especially the parts about what a block looks like, with and without lacing, or just have a look at my source code
on my tests using one or two ogg tracks it was almost nothing
Kurtnoise
25th September 2003, 23:50
Hi !!
With GordianKnot beta version from TheGlouch, we can have directly the overhead calculation for MKV.....;) 'cause GordianKnot is also a great Bitrate calculator :D Here the link : http://members.fortunecity.com/bdreve/gk/
Balm
26th September 2003, 19:39
Hey,
THX fo this great Link :)
Cu Balm
alexnoe
27th September 2003, 01:14
In order to give you an impression as to how crappy overhead estimation for a matroska file is, i've summerized where overhead comes from: http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/en_estimate_overhead.html#overhead_mkv
Well, anyone who seriously claims to be able to predict the overhead of matroska files is veeeeeeeery self-confident :rolleyes:
With audio of constant frame size (such as ac3), it can work pretty well, as well as for mp3, but with vorbis, you have bad luck
Joe_Bloggs
27th September 2003, 14:20
After editing with DVD2AVI, I encode the audio to vorbis prior to doing anything (quality .450 for > 100 min, 0.5 for shorter). The desired bitrate for the final project with GordianKnot is now obvious.
I don't use subtitles I only work with digital TV (mpa audio) and not DVD with AC3 etc. I rarely waste my cpu time with GordianKnot.
In a film I would encode a long title sequence seperately to give me the headroom to encode it at a reduced video bitrate if things are too big by several Mbytes. I have found that a slightly oversize (835Mb) ogm project would be 827Mb in the Matroska container Thus burnable on 800Mb+ media.
alexnoe
27th September 2003, 14:21
Look at my overhead comparison: Depending on the audio format, either AVI or MKV will have the lowest overhead, but never OGM
Joe_Bloggs
27th September 2003, 15:14
@Alex
I edit out adverts and encode video as divX5.x with GordianKnot. Audio is transcoded before video encoding with Vorbis (.ogg) with BeeSweet. I would have got nowhere trying to encode with mp3 due to audio/video sync issues in editing. My only altenative to .ogg(Vorbis) is .wav which takes up a lot of space and time to move around. Joining ogm clips together in VdubMod is a joy. After all this, I am left with a choice in Vdubmod. Should I save as avi, ogm or mkv? 'Make my day, sucker', as the sage said.
It only takes 90s X 3 to see which is the smallest. It is the one that fits on to the media and plays back best in 5 years time that is the best.
I stated that .mkv was 8Mb less than 835Mb of .ogm. This is a result based upon experiment (Thanks to Vdubmod). It does not contradict your analysis.
alexnoe
27th September 2003, 15:19
With mp3 audio, MKV has the lowest overhead.
With vorbis audio, you probably won't ever get an AVI file in sync.
I stated that .mkv was 8Mb less than 835Mb of .ogm. This is a result based upon experiment (Thanks to Vdubmod). It does not contradict your analysis.Yeah, and it will always be like this. If you use several AC3 streams, the difference will even be more.
I have absolutely no idea why either format should not play back in 5 years...
Gew
7th February 2012, 17:51
Here goes the nine year old bump. Thing is, I still don't know of any good bitrate calculator for Matroska, which is sad. When I backup my DVD movies I want to do everything by hand, everything but the bitrate calculation. When it comes to eg. Xvid and VBR MP3 in AVI (muxed with VirtualDubMod), Nic's MiniCalc.exe does a fabolous job. It gets the calculation right to only +/- a few kilobytes using default settings (AVI overhead checked and VBR MP3 for audio). However, when it comes to Matroska, it's a much harder task. Say I have a VTS_01_0.sub with dozens of languages, taking up ~33MiB. Even without header compression mkvmerge.exe is tightening these subtitles down to only ~10MiB. As I'm writing this, I'm pulling a little test. I took this ~10MiB output .MKS for subtitles (fortunately, Nic's Minicalc has a field to insert such), I've unchecked "AVI Overhead" and selected CBR MP3 for audio (although my actual audio stream is "LAME --abr 128", since Matroska per se hasn't the same issues with VBR overhead that AVI had). I will then mux the video stream (x264.mkv), the audio (lame.mka), and the subtitles (subs.mks); all streams with header compression disabled. I will then see if I actually manage to hit the desired 900MiB output. I'm not too sure it'll do.
smok3
7th February 2012, 19:16
if you can provide correct data/formulas i can dump something into a php script (with some html gui), mkv, webm and mp4 should be supported - similar to my resizecalc, check the sig, 1st link.
p.s. I'am not interested in coding something specifically for windows.
Selur
9th February 2012, 10:34
if you can provide correct data/formulas
*gig* mkv size calculation is always a heuristic play unless you do some extensive analysis on your data beforehand:
1. for subtitles and other attachments zlib is used (which for vobsubs normally reduces the subtitel size to around 30%)
2. overhead depends on the number of frames and frame types that are used, so before recompression is done you can only estimate how many I/P/B frames you will end up with (or you would have to know the frame decisions your encoder is going to do ;))
-> I doubt one can create a calculator that is accurate down to a few kilobytes (if there's interest for it you can look up the code MeGui uses for file size calculations and I can share the code I use in Hybrid; which is similar to the one used in MeGui)
Cu Selur
smok3
10th February 2012, 08:26
I doubt one can create a calculator that is accurate down to a few kilobytes
Sure, but some sort of average of N samples stats can be used for that and downrounded, so that requested bitrate is never higher (but i'am not doing that).
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.