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 September 2006, 10:11 | #41 | Link |
Registered User
Join Date: Feb 2006
Posts: 823
|
No. AFAIK both AVI and mp4 use decoding order. Of course MP4 does not need the N-VOP for padding, frames are re-aranged automatically. Although, I am not yet convinced the hack was really necessary for AVI, it is however for VFW. A Directshow (or any private API) decoder should be able to buffer as much as it wants, I think.
Last edited by GodofaGap; 13th September 2006 at 10:17. |
13th September 2006, 18:37 | #42 | Link |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
my description of packed crapstream:
http://forum.doom9.org/showthread.php?s=&threadid=80430
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
13th September 2006, 21:53 | #44 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Quote:
Is the information still fully current. Does any of it require updating/tweaking?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 15th September 2006 at 14:44. |
|
14th September 2006, 04:03 | #45 | Link | |
ŻŻŻŻŻŻŻŻ
Join Date: Dec 2002
Posts: 222
|
Quote:
But I do want to mention that, yes, foxyshadis, you are absolutely 100% correct. Which is why I posted earlier that SMD's file he mentions above was so "interesting" to me: I so rarely, if ever, run into the "regular" NVOPS - ones with non-zero time - that I had, in some spots in the code, assumed that any "not coded" frame was just a "packed bitstream marker", without bothering to check for the "zero-time" requirement (even though I was actually aware of this). The currently released beta version does have this bug in a number of spots, causing some functions (like the GSpot's "VGS" display of SMD's file) to display quite erroneously. But sure, definitely look into it yourself if you're so inclined! - it'll help me make sure I've got this all straight myself. |
|
15th September 2006, 12:11 | #46 | Link | |
Registered User
Join Date: Jan 2005
Posts: 30
|
Quote:
could you release a unicode version?
__________________
Bless My Homeland Forever. Last edited by Ezhihua; 15th September 2006 at 16:20. |
|
15th September 2006, 23:19 | #47 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
people just really need to read it
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
16th September 2006, 06:20 | #48 | Link | ||||
ŻŻŻŻŻŻŻŻ
Join Date: Dec 2002
Posts: 222
|
Ahh, indeed, Bond's description is an excellent post, thanks. I now understand the reasons why they did it.
Quote:
Quote:
Quote:
Though, (just to be argumentative ;) the values in the elementary stream are not exactly "timestamps" either - not in an absolute sense, like an MPEG System Stream has - one where you could look at a frame and say "oh, this is 12 min 57 sec into the file". But you're right, neither are they a relative "duration" for how long to display the frame for, nor are they even a relative duration for "how long to wait from the previous frame before playing this one". It's actually kind of a hybrid - it's normally a "timestamp" for when to play this frame relative to some other "reference" frame, but within a given one second interval only. Associated with it is a "carry value" (almost always "1" when it's not zero). When set to "1", it means you "lap" to a the next second. Then the "timestamp" values are become relative again. So in at least in a sense it's a "relative" ("duration-like") vs. "absolute" ("timestamp-like") system, though I agree your terminology is probably more accurate in this case. Just to digress a bit, though: what's interesting, is what actually constitutes the "last reference" frame". It's usually the previous "non-B" frame, so unless you have a very slow frame rate or a lot of consecutive B's, this "carry value" mentioned above is usually zero and never exceeds one. But another interesting thing about SMD's "NVOP file" he created is that the timestamp does continue to increase and the carry values do keep going up, to 2, 3, 4 and even higher (even there are no B-frames at all). I assume that the encoder did its job correctly, though I'd like to check into that further. Since the people who created the MPEG spec expected low values for that filed, almost always zero or one, they encoded it in an unusual fashion which is efficient only for small numbers. The variable length field's value is simply equal to the number of consecutive "1" bits in it until you hit a "0". So the otherwise semi-identical NVOP frames in SMD's file actually get keep getting longer and longer. If it got to say, 31 seconds of continuous N-VOPS without an I frame, that frame would be 4 bytes longer than the first frame. Not that that's a lot, and it's still a great savings overall compared to the same file encoded in a more "normal" way, i.e not using those N-VOPS. But it's weird using what is at that point a 32 bit field to represent the number between zero and 31, when a normal 32 bit binary encoded field could represent a any number between zero and over 4 billion. But by making the field variable length like that, the field only takes 1 or 2 bits the great majority of the time, so they've obviously thought this all out.... |
||||
16th September 2006, 08:19 | #49 | Link | |
Registered User
Join Date: Nov 2001
Posts: 9,770
|
Quote:
what is missing is what is done when using b-frames as references (as possible in x264) as this needs an even longer time lag as when using "normal" b-frames
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
16th September 2006, 10:36 | #50 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Hi Steve,
I've generated another N-VOP file for your collection. This sample has a bit of motion... and helps to show why N-VOP's are so useful: - Speaker Mapping File (MPEG-4+6Ch AC3).7z Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
2nd October 2006, 13:18 | #51 | Link |
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
v2.60 b00 still indicate the number of AC3 channels wrong. It was a problem with the previous builds too. For e.g: a file with 6Ch AC3, GSpot says it is 2Ch. VirtualDubMoD reports the channel info correctly.
One very common and annoying problem with the previous builds was that, on some files, it would report the wrong audio information and then use *that* to calculate the video bitrate, and in the end report wrong video bitrate too. In v2.60 b00, since the video is being demuxed out first, the video bitrate is accurate, so at least that part is OK. Just the audio info is wrong.
__________________
|
2nd October 2006, 15:06 | #52 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Quote:
I've just used VDM to mux an MPEG-4 video stream together with an 6Ch AC3 stream and got this: - Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
2nd October 2006, 15:16 | #53 | Link |
*****
Join Date: Feb 2005
Posts: 5,647
|
Perhaps it only reports the numbe of channels incorrect in specific situations. If unskinnyboy provides a sample file, then Stegre can try to reproduce and fix the problem.
__________________
MPC-HC 2.2.1 |
2nd October 2006, 16:24 | #54 | Link | |
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Quote:
Yes, it happens only with certain files. I will upload a sample later.
__________________
|
|
2nd October 2006, 16:41 | #55 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Quote:
I am however, unable to replicate what you are seeing. So as clsid suggests, can you provide a sample? Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
2nd October 2006, 20:30 | #56 | Link |
ŻŻŻŻŻŻŻŻ
Join Date: Dec 2002
Posts: 222
|
Yeah, as unskinny boy says "5.1" is correct and technically more informative than "6" (well, in this particular case, for AC3, "6" would have to mean "5.1", as AC3 only supports 5 "full bandwidth" channels max so a sixth would have to be an LFE (i.e. "Low Frequency Effects" i.e. a "subwoofer" channel). The "5.1" style terminology is not something I made up, btw, it's commonly used by audiophiles and in audio equipment specs.
As you can see in the spec below, "nfchans" ("number of full bandwidth channels") maxes out at 5. For clarity I could change the terminology to say ("6 chnls [5.1.]") or something. The existence of an extra "LFE" channel can be added to any of the modes below, so there are really 16 different combinations ( at least in theory): any of the eight below with an extra LFE and any of them without one. They treat the LEF channel as a separate entity presumably because it's coded to use less bandwidth than the "full" channels (since there's no need - in fact it's probably undesirable - to encode all the hi-frequency components to send to a subwoofer). So actually, when I use the "dot" terminology, it's more informative. Note the chart below (where, btw, "S" means "surround" aka "rear": e.g. "SL" is "rear left"). Ignoring the first oddball mode "0", if I said "2" channels it would have to be "L + R". I'd say "2.1" if it were "L, R" plus subwoofer. In the latter case VirtualDubMod, I assume, would say "3", which could mean either L + R (2 full range channels) with one LFE subwoofer channel, or it could also mean either L, R, C or L, R, S (each of those being 3 full range channels). In fact, even my current terminology doesn't fully specify speaker placement, (my "3" could mean L, R, C or L, R, S) but at least it pares down the combinations in that regard, and in any event always identifies the LFE channel as separate entity, as it is indeed "different" than the other channels. |
2nd October 2006, 20:36 | #57 | Link | ||
ŻŻŻŻŻŻŻŻ
Join Date: Dec 2002
Posts: 222
|
Quote:
Quote:
TotalAudioSize = AudioBitrate * Duration TotalVideoSize = TotalFileSize - TotalAudioSize; VideoBitRate = TotalVideoSize / Duration But I'd like to use that only as a last resort in these newer versions. As you say, one disadvantage of the above is that if there IS an error in the audio calc, it gets propagated to the video. It also introduces errors related to container overhead, and possibly significant errors if the container contains additional unidentified streams (though I do account for the simple case multiple audio streams when I do the above calculation). As I add more capabilities to GSpot internally, my options increase - in fact to list a few, all of which are preferred over the above (though not necessarily in this order): 1) Display VideoBitRate as specified in a container, if available. 2) Display Video Bitrate as specified in a "header" chunk of a video stream demuxed from the container, if available, and if GSpot "understands" the format it's demuxing. 3) Display VideoBitRate calculated after demuxing the entire video stream, counting the bytes, and dividing by the duration (which doesn't necessarily require "understanding" the format of the demuxed video stream). I have been improving, as you mentioned, and will continue to attempt to improve on using the best method available for each given situation. |
||
2nd October 2006, 23:22 | #58 | Link |
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Houston, we have a problem. On the whole file (which is a full length encode), GSpot reports 48000Hz 384 kb/s total (2 chnls), but on a sample cut out of it, GSpot says 48000Hz 384 kb/s total (5.1 chnls), the latter being the correct info.
Steve, I don't mind uploading the full file to you if it will help troubleshoot this issue. I will follow up with a PM.
__________________
|
9th October 2006, 04:46 | #59 | Link |
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Steve, what exactly in the avi are you looking at when you report 'garbage at end'? And why only for OpenDML avis > 2 GB? Would like to hear you out on this. Thanks.
FYI - http://forum.doom9.org/showthread.php?t=116852
__________________
|
9th October 2006, 06:14 | #60 | Link |
ŻŻŻŻŻŻŻŻ
Join Date: Dec 2002
Posts: 222
|
I'll get back to that question and some other stuff about various updates I've made, especially ones related posts in this thread, but I just wanted to quickly mention that I've just posted an update: so here's quick links to the GSpot v2.60 b01 download page and the associated list of changes page. BTW, regarding representation of AC3 channels (earlier in this thread) I did my "doom9 homework" and found this sticky thread under Doom9's Forum > General > Audio encoding, where the fifth section down, "Basic Parameters", specifically discusses the proper "official" way to represent the number of full range channels, LFE channel, and speaker layout as well - a representation basically backed up the referenced specification document there. So I've adapted the terminology described there in this new version, as mentioned in my update notes (along with a small screenshot).
Anyway, I'll be back - I need a brief rest now ;) |
|
|