c# and WMEncoderLib 
Author Message
 c# and WMEncoderLib

I am using the WMEncoderLib.dll in C#.
There are all sorts of 'interesting' functions to see how many bytes have
been encoded, bitrate and some other stuff.

Which is completely useless if you don't know the length of the input file
(in milliseconds).
I need to know the length of an inputfile, because Encoder will crash of the
markout time is bigger than the length of a file.
Also for creating a progress bar, length is needed to calculate the amount
encoded

Put this group in managed newsgroups too, I need an answer

H. Prinssen



Sun, 21 Nov 2004 21:11:47 GMT  
 c# and WMEncoderLib
H. Prinssen,

    If you need to know the length of a file, you can create a new FileInfo
object, using the path to the file, and query the Length property for the
length of the file in bytes.

    However, what you said about knowing the length of the file in
milliseconds doesn't make sense.  How long a multimedia clip is would be
dependent on the format the file is in and the contents of the file.  It
might not be a function related to the length of the file necessarily.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> I am using the WMEncoderLib.dll in c#.
> There are all sorts of 'interesting' functions to see how many bytes have
> been encoded, bitrate and some other stuff.

> Which is completely useless if you don't know the length of the input file
> (in milliseconds).
> I need to know the length of an inputfile, because Encoder will crash of
the
> markout time is bigger than the length of a file.
> Also for creating a progress bar, length is needed to calculate the amount
> encoded

> Put this group in managed newsgroups too, I need an answer

> H. Prinssen



Sun, 21 Nov 2004 21:14:24 GMT  
 c# and WMEncoderLib
Hi there

Thanks for a very quick reply.
However, I do need the length of the inputfile that I am using for Windows
Media Encoder.
I am encoding 30 seconds of a file.
This can only be done if the playtime of a file is longer than 30 seconds.
If the duration of the inputfile is shorter I get an error.

File.Info works for bytes, that's why I think there should have been some
functionality in the encoderlib to find out what the duration of an
inputfile is.

Thanks

H. Prinssen



Quote:
> H. Prinssen,

>     If you need to know the length of a file, you can create a new
FileInfo
> object, using the path to the file, and query the Length property for the
> length of the file in bytes.

>     However, what you said about knowing the length of the file in
> milliseconds doesn't make sense.  How long a multimedia clip is would be
> dependent on the format the file is in and the contents of the file.  It
> might not be a function related to the length of the file necessarily.

>     Hope this helps.

> --
>                - Nicholas Paldino [.NET MVP]



> > I am using the WMEncoderLib.dll in c#.
> > There are all sorts of 'interesting' functions to see how many bytes
have
> > been encoded, bitrate and some other stuff.

> > Which is completely useless if you don't know the length of the input
file
> > (in milliseconds).
> > I need to know the length of an inputfile, because Encoder will crash of
> the
> > markout time is bigger than the length of a file.
> > Also for creating a progress bar, length is needed to calculate the
amount
> > encoded

> > Put this group in managed newsgroups too, I need an answer

> > H. Prinssen



Sun, 21 Nov 2004 21:31:06 GMT  
 
 [ 3 post ] 

 Relevant Pages 
 

 
Powered by phpBB® Forum Software