Click here to Skip to main content
15,912,932 members
Home / Discussions / C#
   

C#

 
QuestionHow to Select Acroos All pages in Grid Pin
kris8220-Oct-05 1:19
kris8220-Oct-05 1:19 
Questioncheck interface Pin
ppp00120-Oct-05 1:07
ppp00120-Oct-05 1:07 
AnswerRe: check interface Pin
Guffa20-Oct-05 1:35
Guffa20-Oct-05 1:35 
Questioncreate a crypt ing key by text Pin
Sasuko20-Oct-05 0:57
Sasuko20-Oct-05 0:57 
GeneralRe: create a crypt ing key by text Pin
Guffa20-Oct-05 1:21
Guffa20-Oct-05 1:21 
GeneralRe: create a crypt ing key by text Pin
Sasuko20-Oct-05 1:42
Sasuko20-Oct-05 1:42 
GeneralRe: create a crypt ing key by text Pin
Guffa20-Oct-05 2:23
Guffa20-Oct-05 2:23 
QuestionVideos show wrong duration Pin
Sensei7620-Oct-05 0:33
Sensei7620-Oct-05 0:33 
Hello, I need help with the following problem, please.

I am using C# and DirectX 9 to show MPEG-2 video files within a Windows form. Unfortunatelly I often do not get the correct duration of the file when checking the "duration" property, e.g. a 18 second clip assumes to be only 4 seconds long. So all these videos stop playing too early.

Also, it is not possible to jump to certain positions in the video. If I add a new value (e.g. "AverageFrameLength") to the "CurrentPosition" the displayed video proceeds only every n-th frame and skips all frames in between.

I did not have these problems with a MPEG-1 video, for example. With those, everything worked fine.

Does anyone have an idea, why the durations are gathered incorrectly and how I handle this? I searched the whole web for a solution, but it seems nobody else has ever had a problem like this. Frown | :-(

It seems that there are two things that seem have an influence on this situation.

1.) If these video files are converted to use a constant bit rate the duration property seems to get at least get the correct value. Moving from frame to frame still does not work reliably. But as conversion of all files increases their sizes significantly, this ist not an option anyway.

2.) Also, this does not work with every MPEG-2 codec. To receive correct duration values, I first needed to remove the "Moonlight Elecard" MPEG-2 Codec from my system. After that it used another codec automatically. In my case this is the "MPEG-2 Demultiplexer" (Which - I guess - belongs to the DirectX installtion).
Of course, I cannot know what codecs might be installed on a destination system for my application, and even worse, I cannot simply remove a codec from the system just because my app does not like it...

Any ideas?
AnswerRe: Videos show wrong duration Pin
Pixinger7720-Oct-05 0:49
Pixinger7720-Oct-05 0:49 
QuestionNUMERIC DataGridViewTextBoxColumn Pin
Greeky20-Oct-05 0:27
Greeky20-Oct-05 0:27 
QuestionCheck if users on network Pin
20-Oct-05 0:14
suss20-Oct-05 0:14 
AnswerRe: Check if users on network Pin
Dave Kreskowiak20-Oct-05 3:22
mveDave Kreskowiak20-Oct-05 3:22 
GeneralRe: Check if users on network Pin
Mossie0120-Oct-05 19:50
professionalMossie0120-Oct-05 19:50 
GeneralRe: Check if users on network Pin
Dave Kreskowiak20-Oct-05 22:29
mveDave Kreskowiak20-Oct-05 22:29 
QuestionWindow Form repaint problem Pin
ppp00119-Oct-05 23:56
ppp00119-Oct-05 23:56 
Questionc# modem communication Pin
Anil Ch19-Oct-05 23:51
Anil Ch19-Oct-05 23:51 
AnswerRe: c# modem communication Pin
javad asadi17-Jan-12 18:35
javad asadi17-Jan-12 18:35 
QuestionDBNull.Value to string Pin
Brendan Vogt19-Oct-05 23:43
Brendan Vogt19-Oct-05 23:43 
AnswerRe: DBNull.Value to string Pin
ZainAMJ20-Oct-05 0:11
ZainAMJ20-Oct-05 0:11 
GeneralRe: DBNull.Value to string Pin
Brendan Vogt20-Oct-05 0:40
Brendan Vogt20-Oct-05 0:40 
GeneralRe: DBNull.Value to string Pin
ZainAMJ20-Oct-05 0:48
ZainAMJ20-Oct-05 0:48 
GeneralRe: DBNull.Value to string Pin
Brendan Vogt20-Oct-05 1:06
Brendan Vogt20-Oct-05 1:06 
GeneralRe: DBNull.Value to string Pin
ZainAMJ20-Oct-05 17:07
ZainAMJ20-Oct-05 17:07 
GeneralRe: DBNull.Value to string (Error In That Code) Pin
ZainAMJ20-Oct-05 17:10
ZainAMJ20-Oct-05 17:10 
AnswerRe: DBNull.Value to string Pin
Guffa20-Oct-05 1:31
Guffa20-Oct-05 1:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.