Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
13th December 2008, 11:34 | #1 | Link |
Registered User
Join Date: Jul 2005
Posts: 438
|
HOWTO: calculate m2ts overhead?
Hi guys,
in order to exhaust the maximum space available of a chosen medium, I need to calculate the total overhead of the m2ts container, AC3, and DTS. Can anyone help me there or name a calculator for these formats? I haven't found one ... Regards moviefan |
14th December 2008, 01:40 | #3 | Link |
Registered User
Join Date: Mar 2008
Location: The Great North (the better half of North America)
Posts: 301
|
It depends on the file types and sizes in the container. Is there a particular medium use generally use?
You can mux each stream to it's own m2ts, compare the muxed file and the raw file for the difference. Do this for all streams and it will give you a fairly accurate picture. When I do my own DVD9's I always use h264 video and DTS @ 1536 kb/s, the overhead is pretty close to 570mb always. I have muxed a 2 hour TrueHD track once just for curiosity sake and the overhead was close to 1.3 GB... the track itself was close to 3.5 GB |
23rd December 2008, 14:20 | #5 | Link |
Registered User
Join Date: Oct 2001
Posts: 18
|
If ripbot264 is close to geeting the optimal bitrate for a given media size would someone then be able to privide the formula used
I have been trying to find the source for ripbot264, but i don't think it's avaiable. ildoc |
23rd December 2008, 15:29 | #6 | Link |
Duh!
Join Date: Dec 2008
Posts: 239
|
Here's what I do...
A DVD-R is approximately 2,298,496 sectors. With 2,048 bytes per sector, that makes it 4,707,319,808 bytes. It is commonly accepted that the overhead for M2TS is about 6% - 7% (as G_M_C reported a couple of posts ago). Let's assume 7%. 4,707,319,808 - 7% = 4,377,807,421 In a typical movie only BD5, you need a few more kilobytes for the rest of the BD structure... and I am a rather conservative person... and I like round numbers... and I hate to waste time... so let's make it 4,375,000,000 bytes available for 1 video stream and 1/+ audio streams (and possibly subtitles streams... but let's ignore them in our case, they are pretty small anyway). My next move is to approximate the optimal value for video bitrate given 1/+ audio streams : Video_bitrate = ( 4,375,000,000 x 8 / 1024 / movie_length_in_sec ) - audio_bitrate "4,375,000,000" is the total number of bytes available for video and audio "x 8" turns this available space into bits "/ 1024" turns this available space into kbits "/ movie_length_in_sec" gives us the available bitrate in kbits/s for video and audio The final step "- audio_bitrate" gives us the remaining space for the video Example : a 1h30 movie, with 2 audio streams, 640kbits/s each, to fit on a DVD-R, what is the optimal video bitrate ? Video_bitrate = ( 4,375,000,000 x 8 / 1024 / 5400 ) - 1280 Video_bitrate = 5049 kbits/s Hope it helps. Last edited by MadMonkey57; 23rd December 2008 at 15:48. |
23rd December 2008, 15:43 | #7 | Link | |
Registered User
Join Date: Feb 2006
Posts: 1,076
|
Quote:
|
|
23rd December 2008, 16:14 | #8 | Link | |
Duh!
Join Date: Dec 2008
Posts: 239
|
Quote:
|
|
23rd December 2008, 22:56 | #9 | Link |
use 'r'
Join Date: Feb 2008
Posts: 230
|
Guys, I hope Atak_Snajpera will not be so lazy to share his formula with us.
Till then I'll be not so lazy to share my knowledge with you. Many years I use this formula for raw stream of any type: Smb=Tmin*Bkb*0.0075, where Smb - size in megabytes Tmin - length of stream in minutes Bkb - bitrate in kbits/s 0.0075 - is enough precise factor, you can easily try this formula for yourselfs. We must use different CONTAINER FACTOR for different containers. And muxing test gives me 1.065 result for m2ts container. for example: Total bitrate (kbit/s) will be 4700(media size) / CONTAINER FACTOR / Tmin / 0.0075. Then video bitrate will be "Total bitrate" - "audio1 bitrate" - "audio2 bitrate" - ... So G_M_C is quite right when using 7-8%%, especially if we wanna use subtitles... Last edited by n0mag!c; 26th December 2008 at 21:58. Reason: that's it now |
23rd December 2008, 23:01 | #10 | Link | |
Registered User
Join Date: Feb 2006
Posts: 1,076
|
Quote:
I use 1,07 (7%) normally, or sometimes 1,08 (8%) when i want to have some room to split the clip/movie into 2 DVD5's. The extra room gives me "playroom" to choose a nice split-point (on a chapter or scene-change for instance). |
|
24th December 2008, 08:11 | #11 | Link |
use 'r'
Join Date: Feb 2008
Posts: 230
|
I did few tests and seems that I was wrong about it.
The conclusion is that final m2ts file size depends only on sizes of the muxing streams. So I've edited my previous post to match new facts and not to confuse all readers. Last edited by n0mag!c; 26th December 2008 at 21:53. |
24th December 2008, 09:47 | #12 | Link | |
Duh!
Join Date: Dec 2008
Posts: 239
|
Quote:
And cowardness coz if for a specific movie it doesn't fit, I'll have to start it all over again, and it's a real pain... But hey... it was just a joke, you know... Of course I'll try your settings (and thanks for the tip by the way). Last edited by MadMonkey57; 24th December 2008 at 10:35. Reason: Disambiguation... |
|
28th December 2008, 09:52 | #13 | Link | |
Duh!
Join Date: Dec 2008
Posts: 239
|
Quote:
As promised, my report on the 4,400,000,000 bytes dedicated to audio/video (i used to use 4,375,000,000 in my formula). it works fine, tested so far on 4 movies, longest was 2h06mn, there's a longer one coming (n0mag!c found that the overhead could be dependent on the length of the movie). |
|
28th December 2008, 14:20 | #16 | Link | |
Registered User
Join Date: Mar 2008
Location: The Great North (the better half of North America)
Posts: 301
|
Quote:
MadMonkey57, do you think this formula will work with a TrueHD or DTS HD-MA track on a BD-R... just plug the proper numbers in? |
|
28th December 2008, 18:54 | #17 | Link |
Duh!
Join Date: Dec 2008
Posts: 239
|
I can't confirm based on my experience coz I don't own a BD burner, but I can't think of an obvious reason why the formula couldn't apply to BD-RE and HD audio streams (would mean that M2TS muxing strategy is somehow based on the content itself...).
Last edited by MadMonkey57; 28th December 2008 at 18:55. Reason: typo |
29th December 2008, 21:42 | #19 | Link | |
Duh!
Join Date: Dec 2008
Posts: 239
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|