However, it doesn’t work, because the Get Duration Node returns a solid 0 no matter what file I specify. I also switched between Media Players (VLC and the Native windows media player) all with same result.
Hi - I figured out a way. If you put a delay after calling play on the media source, it now returns the length. This is not the best way to do this - but its working. Any one know a better way then please leave a comment. Thanks
what do you mean you can skip the delay? its not possible. You can only skip the delay if the media is already playing. If its not playing you need the delay
Back when I tested it, it was sufficient to set the state to “playing” and the duration was immediately available when I tested it.
However, with or without delay, it was entirely insufficient for my purpose back then, which is why I replaced everything with the bing player plugin, that actually worked.
Any new info on this? Have searched around and this is the only thing I can find on this subject. Unable to get ‘Get Duration’ to return anything other than 0.
I’m playing random sources from a playlist and using MI Interpolation to add effects at the beginning and end of the clips. Need the duration of the clip to set when to play the end effects.
With HISPlayer Unreal Engine Media Player for Windows you can get total time of a video. However, the video content must be in mp4, HLS or DASH streaming formats
Well for anyone in future who is getting the duration 0, Instead of setting a hardcoded delay you can use the On Media Opened Delegate and bind and event to it, in that event if you try to get the duration you will get a valid value.
It seems the media player is struggling to fetch the duration of the video file, possibly due to compatibility issues or missing metadata. Have you checked if the file contains valid duration information in its metadata? Sometimes, specific video formats or codecs may pose challenges with duration retrieval. Exploring alternative methods or seeking advice from the community, like Gil Birmingham Eyes, might help resolve this issue.