Log in

View Full Version : AVI has no FourCC?


DVFs_DrinkOrDie
25th May 2008, 20:52
This report is from a AVI I recently created from a single VOB file made with DVD Decrypter. I used VdubMod and AVIdemux so I posted here.

-------afreeCodecVT Video Report-------:

Streams (Header) : 2
Streams Found : 2
Length (s) : 8,686
Total Frames : 208,265
Resolution (Header) : 592 x 240
Flags : Has Index, Is Interleaved

Video Size (kB) : 117,601.45
Audio Size (kB) : 1,112,529.01

------- Video Stream -------
Codec : Cannot match FourCC
Flags : None Set
Quality : 100
bps : 110,913

FOURCC : ð Resolution : 40 x 40
FPS : 23.9769
BPP : 0

------- Audio Stream -------
Codec : Cannot match code
Flags : None Set
Quality : 0
bps : 1,049,256

Codec Code : 29811
Channels : 26226
SamplePerSec : 32

-------:

Weird huh? video plays fine though. Attached is a report from Mediainfo. Mediainfo reports the codec as Divx 5 but I encoded it with xvid. Mediainfo reports the writing library as xvid.

History:
I used vdubmod to extract a wav from the VOB. (without getting into the 'why' details) I used WMP to convert the wav to CBR MP3. Then, with vdubmod I used the new MP3 as the audio source, VOB video source and encoded to xvid. Problem is, WMP screwed something up and shows the length of the audio as being about 15 minutes, even though it continues to play to 2hrs 24min. So, I ended up with a avi which plays in WMP 'till the slider reaches 15min, then the slider stops but movie continues to play.

So, I opened this avi with avidemux, and direct copied the streams into a new AVI container which fixed the time issue.

Now I have this avi with no 4cc? What do you think? any ideas?

GodofaGap
25th May 2008, 21:08
AVI files cannot not have a fourcc. I think what the program is trying to tell you is that it can't match the fourcc with any of the formats in its database. The audio info is a lot more funky though.

DVFs_DrinkOrDie
25th May 2008, 21:12
AVI files cannot not have a fourcc..

Say what? All of my AVI's have a FourCC code besides this one. Those encoded using Xvid report the FourCC as being 'XVID' of course. The one's encoded with Divx report various FourCC's depending on what version of Divx was used.

GodofaGap
25th May 2008, 21:17
I'm just saying that AVI files cannot not have a fourcc. You can easily verify the fourcc in a hex editor (VirtualDub has one). It's the first 4 letters after 'vids'.

DVFs_DrinkOrDie
25th May 2008, 21:48
And I'm telling you all my AVI's do have FourCC. VirtualdubMod's hex editor verifies this.

LoRd_MuldeR
25th May 2008, 22:34
@DVFs_DrinkOrDie:
Load that AVI into AVInaptic and see what it reports!

Dark Shikari
25th May 2008, 22:45
"Cannot match FourCC" is not an equivalent statement to "Does not have FourCC".

setarip_old
25th May 2008, 23:22
@DVFs_DrinkOrDie

Hi!

I believe what "GodofaGap" is alluding to, is the fact that .AVIs (containers) do not, in and of themselves have FOURCCs. Rather, it's the codecs (video and audio), that are used to create the .AVI files, that are identified by FOURCCs in the headers of the .AVIs...

LoRd_MuldeR
25th May 2008, 23:26
Nevertheless the FourCC is stored in the AVI conatiner, not in the stream itself.
To be precise, the FourCC is located in the "AVIStreamHeader" struct and the field is called "fccHandler".
Since that filed is not optional, there is no way to leave it out...


The stream header has the following data structure defined for it:

typedef struct {

FOURCC fccType;

FOURCC fccHandler;

DWORD dwFlags;

DWORD dwReserved1;

DWORD dwInitialFrames;

DWORD dwScale;

DWORD dwRate;

DWORD dwStart;

DWORD dwLength;

DWORD dwSuggestedBufferSize;

DWORD dwQuality;

DWORD dwSampleSize;

} AVIStreamHeader;


The stream header specifies the type of data the stream contains, such
as audio or video, by means of a four-character code. The fccType field
is set to "vids" if the stream it specifies contains video data. It is
set to "auds" if it contains audio data.

The fccHandler field contains a four-character code describing the
installable compressor or decompressor used with the data.

...

JohnnyMalaria
25th May 2008, 23:44
Open a command prompt, navigate to the folder with your AVI file and enter this command:

type <your.avi> | more >test.txt

After a couple of seconds, hit Ctrl-C. Don't worry if you get some weird message about a nonexistent pipe.

Open test.txt in Notepad, copy the first couple of pages (pretty much until all there is is empty space) and post it here.

e.g.,

RIFFø_
AVI LISTÄ

hdrlavih8


V‚




















ÈÔ
























LISTl~

strlstrh8


iavsdvsd











é

0u








ÈÔ
















strf


Ï0ÀÑ?Ï*ÿÏ?ÀÑ?Ï*ÿÿÿ
ÿ?Èüÿ







indxø}







00__



















~



This is a 100% guaranteed way to see what the FourCC is.

In my example, it is dvsd of type iavs and, as LoRd_MuldeR correctly states, it is within the stream header info (strlstrh).

Technically, your AVI could have no FourCC but it implies there aren't any streams, either, which makes it pretty useless.

setarip_old
25th May 2008, 23:48
@LoRdMuldeR

Hi!

I said:...that are identified by FOURCCs in the headers of the .AVIs

You then said:Nevertheless the FourCC is stored in the AVI conatiner, not in the stream itself.


As I see it, you've essentially repeated what I'd already stated (And certainly neither I, nor anyone else posting in this thread, stated or suggested that the FOURCC is in the "stream itself")...

LoRd_MuldeR
25th May 2008, 23:51
This is a 100% guaranteed way to see what the FourCC is.
And if there really isn't one then, technically, your file isn't AVI compliant.

Using AVInaptic or a similar tool is much more user friendly and should give more information.
And if you really want to see the "Bytes", I'd recommend using a Hex Editor (like VirtualDub's built-in one).

As I see it, you've essentially repeated what I'd already stated (And certainly neither I, nor anyone else posting in this thread, stated or suggested that the FOURCC is in the "stream itself")...

I did not want to say your statement is wrong. Just wanted to make it more clear by throwing in some info from the AVI specs.
If this caused even more confusion, then I feel sorry... :o

JohnnyMalaria
26th May 2008, 01:15
Using AVInaptic or a similar tool is much more user friendly and should give more information.
And if you really want to see the "Bytes", I'd recommend using a Hex Editor (like VirtualDub's built-in one).

I agree - my intent was to get the OP to post something that we can see rather than suggest it as a routine method. A screenshot from a hex editor would also work though it's more of an effort to get it on here. Opening directly in Notepad would work, too, but can be v-e-r-y slow for large files.

foxyshadis
26th May 2008, 01:37
And I'm telling you all my AVI's do have FourCC. VirtualdubMod's hex editor verifies this.

You and setarip misread what GodofaGap said, probably missed the double negative ("cannot not" -> "must").

Besides, it's easy to make an AVI with no fourcc: Just fill it in with spaces, nulls, or random garbage. Technically it's in the fourcc assigned area, but it's not something anyone would call a real fourcc. Or if you really want to get broken, make an avi without a strh chunk.

afreeCodecVT's database is just much smaller and out of date compared to mediainfo's and avinaptic's.

Mediainfo reports the codec as Divx 5 but I encoded it with xvid.

The fourcc is completely unreliable when it comes to determining the encoder. For instance, Xvid can use XVID, DIVX, or DX50, and can be patched to use anything else. Its only valid use is in deciding what to decode a video with; for encoder look in the video comment chunk.

setarip_old
26th May 2008, 02:11
@foxyshadissetarip misread what GodofaGap said, probably missed the double negativeYou are absolutely not incorrect ;>}

GodofaGap
26th May 2008, 07:52
I'm sorry for the confusion, but yes, I was using a double negative. I thought this was clear enough from the rest of my posts, which basically just says that your program does not *know* the fourcc, which is something entirely different from does not *have* a fourcc. AVI files without a fourcc are very much broken.

English is not my native language so if double negatives are not allowed or usually avoided than I apologize again. :p

DVFs_DrinkOrDie
26th May 2008, 21:03
I ran the video through avinaptic and it pretty much tells me what I already knew by using mediainfo (tree view). That info is attached to the first post. It's telling me the fourCC is 'DX50', so we aren't dealing with a avi that has NO fourCC, as Dark Shakari suggested.

I'm saying I encoded it with Xvid. The mediainfo will verify the writing library as 'Xvid', yet also says the FourCC is 'DX50'. Divx was not involved in any steps creating this file. So I guess now the question is, if I encoded it with xvid, why isn't the fourCC 'XVID'. And furthermore, if the current fourCC is DX50, why can't AfreecodecVT match it? it has no problem with other avi's which have DX50 as the fourCC. AVIcodecVT does "know" DX50. It also "knows" XVID. It just can't match it in this particular file so something's screwy. All of this probably isn't all that important since my file works fine, I'm just the type that can't let it go until I find out what's going on.

EDIT: I've edited this post to include the information below because attachment approval was taking too long.

Here is vdubmod's hex editor information. I'm pretty sure this is all we need to see. It verifies DX50 as the fourCC. Yet its encoded with Xvid.

RIFF"..KAVI LIST
t!..hdrlavih8...
................
.-..............
P...............
........LIST....
strlstrh @..vids
divx............
.@....=......-..
.{..............
P......(...Pstrf
(...(...P.......
....DX50........
............JUNK
....Avidemux....
................
Here's avinaptic's analysis so everyone can see what I'm dealing with. I left out info that I feel isn't important. TKS to everyone for taking the time on this.

[ About file ]

Name: filename.avi
Date: 22/05/2008 19:19:29
Size: 1,259,662,122 bytes (1201.307 MB)

[ Generic infos ]

Play duration: 02:24:46 (8686.07 s)
Container type: AVI
Number of streams: 2
Type of stream nr. 0: video
Type of stream nr. 1: audio
Audio streams: 1
JUNK: Avidemux


[ Video track ]

FourCC: divx/DX50
Resolution: 592 x 240
Frame aspect ratio: 37:15 = 2.466666
Pixel aspect ratio: 183:254 = 0.720472
Display aspect ratio: 2257:1270 = 1.777165 (~16:9)
Framerate: 23.976896 fps
Number of frames: 208265
Stream size: 1,041,091,344 bytes
Bitrate: 958.860652 kbps
Qf: 0.281468
Key frames: 1555 (0; 300; 399; 693; 993; ... 208244)
Null frames: 0
Min key int: 1
Max key int: 300
Avg key int: 133.932475
Delay: 0 ms

[ Audio track ]

Audio tag: 0x55 (MP3)
Bitrate (container): 192 kbps CBR
Channels (container): 2
Sample rate (container): 48000 Hz
Chunks: 208253
Stream size: 208,461,312 bytes
Preload: 0 ms
Max A/V diff: 348 ms
Type: MPEG-1 Layer III
MPEG frames: 361912
Play duration: 02:24:46 (8685.888 s)
Chunk-aligned: Yes
Emphasis: none
Mode: stereo
Delay: 0 ms

[ About MPEG4 encoding ]

User data: DivX503b1393n
User data: XviD0046
Packed bitstream: No
QPel: No
GMC: No
Interlaced: No
Aspect ratio: Custom pixel shape (183:254 = 0.720472)
Quant type: H.263
Number of frames: 208265
Drop/delay frames: 0
Corrupted frames: 0

DVFs_DrinkOrDie
26th May 2008, 21:39
The fourcc is completely unreliable when it comes to determining the encoder. For instance, Xvid can use XVID, DIVX, or DX50, and can be patched to use anything else. Its only valid use is in deciding what to decode a video with; for encoder look in the video comment chunk.

Well that sucks. I've been reading FourCC's all this time, and trusting that to tell me the actual encoder used. I thought that's what they were for. When it comes to what decoder to use, I use ffdshow to decode all of the mpeg4 codecs you mentioned.

squid_80
27th May 2008, 17:15
There's two fourCCs in an avi file: the video format fourCC and the codec handler fourCC. Can't suggest further what the problem might be without seeing the as yet unapproved attachments.

DVFs_DrinkOrDie
29th May 2008, 20:21
Attachments have been approved although I already put the information in the post itself. Does this information reveal anything? Still don't understand why AfreecodecVT can't match the DX50 FourCC, and I still don't understand why the FourCC is DX50 when I encoded it with Xvid.

LoRd_MuldeR
29th May 2008, 21:26
Again: Every "Codec" can write whatever FourCC it wants to the AVI file. You can configure Xvid to write a "DIVX" or "DX50" FourCC to the file.
Some standalone players even require a "DIVX" or "DX50" FourCC to accept Xvid-encoded files, because they won't recognize the "XVID" FourCC as MPEG-4 stream :rolleyes:
Maybe Avidemux writes "DX50" by default in order to avoid compatibility problems with standalone players...


And as squid_80 said:
"There's two fourCCs in an avi file: the video format fourCC and the codec handler fourCC."

In your screenshot I can see "divx" in the "Stream header" block and "DX50" in the "Stream format" block:

http://img103.imageshack.us/img103/7142/fccul7.png


If that "AfreecodecVT" program doesn't recognize this combination, why worry?
There are other free programs that can give you all information you'll need. AVInaptic is one example...

[ Video track ]

FourCC: divx/DX50

....

[ About MPEG4 encoding ]

User data: XviD0046

What more info do you need ???

DVFs_DrinkOrDie
30th May 2008, 03:22
Maybe Avidemux writes "DX50" by default in order to avoid compatibility problems with standalone players...

So I guess that's a good thing!

What more info do you need ???

No more info needed! consider the issue closed. Thanks for all your help guys. Much appreciated.