Specs format AVI - Traitement Vidéo - Video & Son
Marsh Posté le 05-01-2004 à 19:16:39
J'ai utilise cette fonction pour retrouver les infos d'un fichier AVI : 
 
int ReadAVIHeader(FILE *file, AVIFileInfo *aviinfo) 
{ 
 
    fseek(file, 0x20, SEEK_SET); 
    if(!fread(&aviinfo->dwMicroSecPerFrame, 4, 1, file)) return -1; 
 
    fseek(file, 0x30, SEEK_SET); 
    if(!fread(&aviinfo->dwTotalFrames, 4, 1, file)) return -1; 
 
    fseek(file, 0x40, SEEK_SET); 
    if(!fread(&aviinfo->dwWidth, 4, 1, file)) return -1; 
 
    fseek(file, 0x44, SEEK_SET); 
    if(!fread(&aviinfo->dwHeight, 4, 1, file)) return -1; 
 
    fseek(file, 0x70, SEEK_SET); 
    if(!fread(aviinfo->FourCCDesc, 4, 1, file)) return -1; 
    aviinfo->FourCCDesc[4] = '\0'; 
 
    fseek(file, 0xBC, SEEK_SET); 
    if(!fread(aviinfo->FourCCCodec, 4, 1, file) ) return -1; 
    aviinfo->FourCCCodec[4] = '\0'; 
 
    return 0; 
} 
 
La structure AVIFileInfo est : 
 
typedef struct 
{ 
    DWORD  dwMicroSecPerFrame; 
    DWORD  dwTotalFrames; 
    DWORD  dwWidth; 
    DWORD  dwHeight; 
    char FourCCDesc[5]; 
    char FourCCCodec[5]; 
} AVIFileInfo; 
 
Le FourCCDesc doit etre le decodeur a utiliser, le FourCCCodec doit etre l'encodeur utilise.
Marsh Posté le 05-01-2004 à 19:18:51
Cool, merci ! 
tu aurais plus d'infos concernant le contenu FourCCDesc/Codec ? (comment le relier à un filtre présent / absent ?) 
Marsh Posté le 05-01-2004 à 19:26:55
Aucune idee pour savoir si y'a bien les filtres sur la machine. 
 
Par contre j'ai la correspondance FourCC -> nom du codec (que j'avais trouve sur ce forum si je me rapelle bien 
 ) 
 
3iv1=3ivx Delta 1/2/3 
3iv2=3ivx Delta 4 
aasc=Autodesk Animator 
afli=Autodesk Animator 
aflc=Autodesk Animator 
ap41=AngelPotion 
asv1=Asus Video 
asv2=Asus Video 2 
bink=Bink Video 
cram=Microsoft Video 1 
cvid=Cinepak Radius 
div3=DivX 3.11 Low Motion 
div4=DivX 3.11 Fast Motion 
div5=DivX 3.11 VKI Low Motion 
div6=DivX 3.11 VKI Fast Motion 
divx=DivX 4 
dmb1=Matrox Rainbow Runner 
dx50=DivX 5 
H260=Intel ITU H.260 
H261=Intel ITU H.261 
H262=Intel ITU H.262 
H263=Intel ITU H.263 
H264=Intel ITU H.264 
H265=Intel ITU H.265 
H266=Intel ITU H.266 
H267=Intel ITU H.267 
H268=Intel ITU H.268 
H269=Intel ITU H.269 
i263=Intel ITU H.263 
ir21=Intel Indeo 2.1 
iv30=Ligos Indeo 3 
iv31=Ligos Indeo 3 
iv32=Ligos Indeo 3.2 
iv33=Ligos Indeo 3 
iv34=Ligos Indeo 3 
iv35=Ligos Indeo 3 
iv36=Ligos Indeo 3 
iv37=Ligos Indeo 3 
iv38=Ligos Indeo 3 
iv39=Ligos Indeo 3 
iv40=Ligos Indeo Inderactive 4 
iv41=Ligos Indeo Inderactive 4 
iv42=Ligos Indeo Inderactive 4 
iv43=Ligos Indeo Inderactive 4 
iv44=Ligos Indeo Inderactive 4 
iv45=Ligos Indeo Inderactive 4 
iv46=Ligos Indeo Inderactive 4 
iv47=Ligos Indeo Inderactive 4 
iv48=Ligos Indeo Inderactive 4 
iv49=Ligos Indeo Inderactive 4 
iv50=Ligos Indeo Inderactive 5 
m261=Microsoft H.261 
m263=Microsoft H.263 
MC12=ATI Motion Compensation Format 
MCAM=ATI Motion Compensation Format 
MJPG=Motion JPEG 
MP42=Microsoft MPEG-4 
MP43=Microsoft MPEG-4 
MP4S=Microsoft MPEG-4 
MPEG=MPEG-1 
MPG4=Microsoft MPEG-4 High Speed Compressor 
MRLE=Microsoft RLE 
MSVC=Microsoft Video 1 
rv20=RealVideo G2 
rv30=RealVideo 8 
VCR1=ATI Video Codec 1 
VCR2=ATI Video Codec 2 
XMPG=Xing MPEG 
XVID=XviD 
Marsh Posté le 05-01-2004 à 18:59:19
Bonjour,
quelqu'un sait où trouver les specs (FourCC complet, codecs...) du format container AVI ? Sur Google je trouve rien de top ...