diff --git a/MediaManager.FFmpegMediaMetadataRetriever/FFmpegMetadataProvider.cs b/MediaManager.FFmpegMediaMetadataRetriever/FFmpegMetadataProvider.cs index b7417143..b29aabb9 100644 --- a/MediaManager.FFmpegMediaMetadataRetriever/FFmpegMetadataProvider.cs +++ b/MediaManager.FFmpegMediaMetadataRetriever/FFmpegMetadataProvider.cs @@ -120,7 +120,7 @@ public Task ProvideVideoFrame(IMediaItem mediaItem, TimeSpan timeFromSta { var metadataRetriever = CreateMediaRetriever(mediaItem); - var bitmap = metadataRetriever.GetFrameAtTime((long)timeFromStart.TotalMilliseconds); + var bitmap = metadataRetriever.GetFrameAtTime((long)(timeFromStart.TotalMilliseconds * 1000)); metadataRetriever.Release(); return Task.FromResult(bitmap as object); diff --git a/MediaManager/Platforms/Android/Media/ID3Provider.cs b/MediaManager/Platforms/Android/Media/ID3Provider.cs index 68fce5f7..569eb97a 100644 --- a/MediaManager/Platforms/Android/Media/ID3Provider.cs +++ b/MediaManager/Platforms/Android/Media/ID3Provider.cs @@ -133,7 +133,7 @@ public async Task ProvideVideoFrame(IMediaItem mediaItem, TimeSpan timeF { var metadataRetriever = await CreateMediaRetriever(mediaItem).ConfigureAwait(false); - image = metadataRetriever.GetFrameAtTime((long)timeFromStart.TotalMilliseconds); + image = metadataRetriever.GetFrameAtTime((long)(timeFromStart.TotalMilliseconds*1000)); metadataRetriever.Release(); } diff --git a/MediaManager/Platforms/Apple/Media/AVAssetProvider.cs b/MediaManager/Platforms/Apple/Media/AVAssetProvider.cs index 033728eb..adf64444 100644 --- a/MediaManager/Platforms/Apple/Media/AVAssetProvider.cs +++ b/MediaManager/Platforms/Apple/Media/AVAssetProvider.cs @@ -79,7 +79,7 @@ public Task ProvideVideoFrame(IMediaItem mediaItem, TimeSpan timeFromSta var url = mediaItem.GetNSUrl(); var imageGenerator = new AVAssetImageGenerator(AVAsset.FromUrl(url)); imageGenerator.AppliesPreferredTrackTransform = true; - var cgImage = imageGenerator.CopyCGImageAtTime(new CMTime((long)timeFromStart.TotalMilliseconds, 1000000), out var actualTime, out var error); + var cgImage = imageGenerator.CopyCGImageAtTime(new CMTime((long)timeFromStart.TotalMilliseconds, 1000), out var actualTime, out var error); return Task.FromResult(cgImage as object); } }