Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
jdr  
#1 Posted : Monday, September 13, 2010 11:39:34 AM(UTC)
jdr

Rank: Newbie

Groups: Member
Joined: 9/13/2010(UTC)
Posts: 2

Hi Everybody,

I'm an absolute newby here, but have searched around and found nothing to solve this problem. Apologies if I've missed something obvious.

At the moment, I am simply trying to load a video and read it frame by frame. There are several examples of this, and I've copied and pasted. The files seem to load (i.e., no exception is thrown), but then the FrameCount in the Reader is always -1. I've tried this with wmv, mov, and other files.

Here is the smallest sample of code (adapted from the Aurigma documentation):

String fileName = null;
openFileDialog.Filter = "Windows Media Files|*.wmv";
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
fileName = openFileDialog.FileName;
}

try
{
//Create the reader
IFormatReader reader = MediaFormatManager.CreateFormatReader(fileName);
//Get the frame
if (reader.FrameCount < 1)
{
Console.WriteLine("File contains no frames.");
return;
}

etc., etc.

Debugging, CreateFormatReader has no problem, but when it gets to check reader.FrameCount, it comes back as -1.

I should say that I'm using Windows 7 64 bit. I've been able to run the BitmapViewer sample, and it's compiling and running without problem. I've also used a number of videos, and they all come back with the same problem.

Any help would be greatly appreciated.

Many thanks in advance,

Jon R
Dmitry.Obukhov  
#2 Posted : Monday, September 13, 2010 5:04:00 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Administration
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Jonathan,

Thanks for contacting us.

I tried to reproduce your problem. I created simple windows application based on your code listed in the post. It allows loading video files and reading it frame-by-frame. I attached this sample with test wmv file (inside of zip file). Please download and try it out.
If you have any additional questions, I will be glad to assist you.
File Attachment(s):
VideoReaderSample.zip (3,202kb) downloaded 8 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
jdr  
#3 Posted : Monday, September 13, 2010 8:12:54 PM(UTC)
jdr

Rank: Newbie

Groups: Member
Joined: 9/13/2010(UTC)
Posts: 2

Hi Dmitry,

Thanks for your response. This is very confusing. Your wmv file worked; however, not one single one that I have works. So, I'm going to try to attach a file that I have problems with (2 Mgbytes, sorry), it plays well in Windows Media Player, but returns a -1 frame count, as do all of my wmv files.

This is very mysterious...

Many thanks,

Jon

File Attachment(s):
LEGOstudio Model Gallery.wmv (2,175kb) downloaded 1 time(s).
Dmitry.Obukhov  
#4 Posted : Monday, September 13, 2010 8:54:18 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Administration
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Jon,

Most likely, this problem is caused because of you do not have necessary codec installed on your machine.
Unfortunately, I will not be able to assist you with this problem.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.