Read video information(date created)?

Posted by Lynx on Stack Overflow See other posts from Stack Overflow or by Lynx
Published on 2012-11-26T03:19:51Z Indexed on 2012/11/26 5:04 UTC
Read the original article Hit count: 118

In window, i can get the date created of the video from properties(right click).
I have a few idea on this but i dont know how to do it.
1. Get the video information directly from video(like in windows),
2. By extracting the video name to get the date created(The video's name is in date format, which is the time it created).
And i also using taglib-sharp to get the video duration and resolution, but i cant find any sample code on how to get the video creation date.

Note: video name in date format - example, 20121119_125550.avi

Edit
Found this code and so far its working

string fileName = Server.MapPath("//video//20121119_125550.avi");
FileInfo fileInfo = new FileInfo(fileName);
DateTime creationTime = fileInfo.CreationTime;

Output: 2012/11/19 12:55:50

For the file's name, i will add another string in name. For example User1-20121119_125550.avi.avi, so it will get complicated after that.

© Stack Overflow or respective owner

Related posts about c#

Related posts about web-applications