tag:blogger.com,1999:blog-8776240752751469943.post7151065489064250497..comments2012-10-16T13:59:46.465+03:00Comments on Out of memory: How to validate video filemynkowhttp://www.blogger.com/profile/17286274614098994349noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8776240752751469943.post-68067785271330040682012-10-16T13:59:46.465+03:002012-10-16T13:59:46.465+03:00Hi,
this only seems to work with mpg and avi vide...Hi,<br /><br />this only seems to work with mpg and avi videos, but not with mp4 or wmv. <br /><br />any idea why?<br /><br />thanksCesarhttps://www.blogger.com/profile/17292251004811188204noreply@blogger.comtag:blogger.com,1999:blog-8776240752751469943.post-68334693963893543732012-10-16T13:49:17.667+03:002012-10-16T13:49:17.667+03:00This comment has been removed by the author.Cesarhttps://www.blogger.com/profile/17292251004811188204noreply@blogger.comtag:blogger.com,1999:blog-8776240752751469943.post-16666636398528909932012-04-08T22:32:16.000+03:002012-04-08T22:32:16.000+03:0010x, I updated the code :)10x, I updated the code :)mynkowhttps://www.blogger.com/profile/17286274614098994349noreply@blogger.comtag:blogger.com,1999:blog-8776240752751469943.post-85864791081296853562011-11-09T16:05:07.831+02:002011-11-09T16:05:07.831+02:00Ok thanks i worked it out and this does work just ...Ok thanks i worked it out and this does work just fine excellent code.<br /><br />I had to look at known magic headers and adjust to be:<br /><br /> private static byte[][] _videoHeaders = new byte[][]<br /> {<br /> new byte[]{ 0x41, 0x56, 0x49, 0x20 }, // .avi<br /> new byte[]{ 0x52, 0x49, 0x46, 0x46 }, // .avi<br /> new byte[]{ 0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62 }, // .asf, .wmv<br /> new byte[]{ 0x00, 0x00, 0x01, 0xB3 }, // .mpg<br /> new byte[]{ 0x00, 0x00, 0x01, 0xba}, // .mpg<br /> new byte[]{ 0x00, 0x00, 0x00, 0x18}, // .mp4<br /> new byte[]{ 0x46, 0x4C, 0x56 } // .flv<br /><br /> };psymon25https://www.blogger.com/profile/04706129051490865856noreply@blogger.comtag:blogger.com,1999:blog-8776240752751469943.post-51423020403283784022011-11-09T15:02:03.346+02:002011-11-09T15:02:03.346+02:00this works for wmv which is amazing but does not w...this works for wmv which is amazing but does not work for mp4 or m2v (mpeg2)psymon25https://www.blogger.com/profile/04706129051490865856noreply@blogger.com