tags:

views:

85

answers:

1

i.e. the size and width of a video in different formats ( at least the common ones .avi, .mpg, .mpeg, .mov, .asf ) etc. preferably using .net code or code usable from .net ?

UPDATE -

1) any way to get the timestamp of the time the video was taken - something akin to exif info for digital pictures, this only needs to work for my video files

A: 

I don't know if this is the best way to do it, but using DirectX you can use the Video class in the AudioVideoPlayback namespace to get the default size of the video. After creating the Video object, you can get the DefaultSize property, from which the height and width can be obtained.

A simple example:

    Video video = new Video(videoPath, false);
    Size size = video.DefaultSize;

    Console.WriteLine("Width: " + size.Width);
    Console.WriteLine("Height: " + size.Height);
Ben
thanks, will try it outdoes it work for HD video too ? .m2ts/.mts etc ?
Kumar