Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Pro Tip: Get MP4 + AVI Animation Length, Video Duration

Author
Message
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 31st May 2023 01:50 Edited at: 31st May 2023 01:56
This is expanded on the previous post concerning just AVI files:
https://forum.thegamecreators.com/thread/222433

This is how to extract the duration of an AVI video in milliseconds.


This is how to extract the duration of a MP4 file in milliseconds.


The MP4 code which is being posted here new is a port of code posted here:
https://geekthis.net/post/c-get-mp4-duration/

If you are working with video files and you aren't using Dark Video plugin, you'll probably run into problems not being able to reliably determine the length of the video. The existing video commands will break and are very unreliable.

Mage's Modular Code - Get awesome UI controls and powerful Bitmap Fonts!
Screen Device Recovery - Stop your apps from crashing when minimized/tabbed/screen locked.
CPU Friendly Frame Limiter - Make your app generate less computer heat + noise, and use less battery life!

Login to post a reply

Server time is: 2024-03-01 00:50:03
Your offset time is: 2024-03-01 00:50:03