[M4IF Technotes] ´ð¸´: [M4IF Technotes] yuv2avi
Limin Wang
lmwang linuxforum.net
Tue Apr 8 10:46:37 EDT 2003
Its very easy to write the application by using avilib.
For example, the yuv format is YUV420. pieces of code as follow:
// AVI write handle
avi_t* pAviHandle;
char VideoFmtYV12[4] = // YUV420
{
'Y','V','1','2'
};
pAviHandle = AVI_open_output_file("avi_yuv.avi");
if(! pAviHandle)
{
printf("avi file open failed \n");
return -1;
}
// set video format
AVI_set_video(pAviHandle,
width, // width
height, // height
frame_rate, // fps
//VideoFmtBvm4
VideoFmtYV12
);
// every frame(width*height + 1/4*width*height +
1/4*width*height)(y,u,v)
// get the yuv data yourself
do {
AVI_write_frame(pAviHandle,yuv_yuv_length);
} while(1)
// close open file
AVI_close(pAviHandle);
After finished, try WMP or graphedit to test. It should be work for I
have written before.
Best,
Limin
-----????-----
???: technotes-admin lists.m4if.org
[mailto:technotes-admin lists.m4if.org] ?? anna
????: 2003?4?7? 23:08
???: technotes lists.m4if.org
??: [M4IF Technotes] yuv2avi
high
i would to convert my yuv file to avi and i dont find an open source
under unix who convert me my yuv file
thank you for your help
anna
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
More information about the Mp4-tech
mailing list