![]() |
IMediaDet::GetBitmapBits liefert falsches Frame...
Mahlzeit!
Ich nutze den DirectShow MediaDetector um an die Frames von AVIs zu kommen. Nun gibts da ein Problem, das die Funktion ![]() An die Infos kommt man so ran:
Delphi-Quellcode:
Interessant ist, das StreamLength (fast) bei allen Videos etwas zu lang ist und meist ein par Frames dazu gedichtet werden und dabei eine Kommastelle :shock: raus kommt. :wiejetzt:
var StreamLength:Double;
FFrameRate:Double; FFrames:Integer; // StreamLength If not Succeeded(MediaDet.get_StreamLength(StreamLength)) then Raise Exception(EStreamError); // FrameRate MediaDet.get_FrameRate(FFrameRate); FFrames:=Round(StreamLength * FFrameRate); Beispiel: FPS: 25.0 Frames: 13475 Länge: 8:59.00 DS zeigt an: FrameRate: 25.0 Frames (gerundet): 13477 Frames: 13477,000000000001 StreamLength: 539,080000000000041 Das Bild holt man so:
Delphi-Quellcode:
So, nun würd ich gerne wissen, wie sich der Bug umgehen läßt :cyclops:
StreamPos:=Frame / FFrameRate;
If not Succeeded(MediaDet.GetBitmapBits(StreamPos, @BufSize, nil, FWidth, FHeight)) then ... Grüße, Sun |
Re: IMediaDet::GetBitmapBits liefert falsches Frame...
Hi,
auch wenn es blöd klingt, die Frames sind im 24-bit RGB Format? |
Re: IMediaDet::GetBitmapBits liefert falsches Frame...
Nein nicht immer, DivX & Indeo Codecs mit 24 Bit, HuffYUV & YUY2 sind 16 Bit, macht aber kein Unterschied, der Fehler is überall anzutreffen.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:43 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz