ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Timeformat in DShowParams

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jenswahl Posted - Dec 14 2017 : 09:50:46
Hello,

I want to get the number of frames in a video file but I get always only the value for tfTime. My code is the following:

if ievTmp.IO.DShowParams.Connected then begin
	ievTmp.IO.DShowParams.Disconnect;
end;
ievTmp.IO.DShowParams.FileInput := AnsiString(sFN);
ievTmp.IO.DShowParams.Connect;
ievTmp.IO.DShowParams.Position := 0;
ievTmp.IO.DShowParams.Pause;

ievTmp.IO.DShowParams.TimeFormat := tfTime;

//it's OK:
nxgVCM.Cells[5, iTmpRow] := secs2str(ievTmp.IO.DShowParams.Duration);
nSec := ievTmp.IO.DShowParams.Duration / 10000000;

//it's not OK:
ievTmp.IO.DShowParams.TimeFormat := tfFrame;
sFPS := IntToStr(ievTmp.IO.DShowParams.Duration);



nSec are 89 seconds = OK. sFPS is the same: the 89 seconds in 100 Nanoseconds. What is wrong?

Thank you.

Jens
5   L A T E S T    R E P L I E S    (Newest First)
jenswahl Posted - Dec 18 2017 : 01:40:48
Thank you.

www.inntalsoftware.de/en/
xequte Posted - Dec 17 2017 : 20:38:41
Also, you should read TimeFormat after setting it to ensure the format is supported by the filter.


Nigel
Xequte Software
www.imageen.com
xequte Posted - Dec 15 2017 : 16:04:27
Hi Jens

ImageEn is simply returning the result from the DirectShow filter, so if they have not implemented the functionality then it fails. We'll add some better error handling for the next update.



Nigel
Xequte Software
www.imageen.com
jenswahl Posted - Dec 15 2017 : 02:18:14
Hello Nigel,

Thank you for the fast answer.
It's not implemented. I'm a little bit confused because it's for the most formats (I tested with mov, mpg, mp4, mkv and avi): Only for avi I get a correct result.

But if I use the VLDSVideoPlayer component by mitov.com which bases also on DirectX than I get the correct frame count for all video formats I tested.
It's a little bit curious.

Jens
xequte Posted - Dec 14 2017 : 17:24:48
Hi Jens

Can you step into the code of:

procedure TIEDirectShow.SetXTimeFormat(value: TIETimeFormat);

And see what result you get for fMediaSeeking.SetTimeFormat(@TIME_FORMAT_FRAME);

Presumably, it is not implemented for that filter:

https://msdn.microsoft.com/en-us/library/windows/desktop/dd407040(v=vs.85).aspx

Nigel
Xequte Software
www.imageen.com