Recent

Author Topic: Showing video properties using Pascal code  (Read 2494 times)

440bx

  • Hero Member
  • *****
  • Posts: 4020
Showing video properties using Pascal code
« on: October 10, 2023, 11:25:25 pm »
Hello,

When selecting "Properties" on a video file and selecting the properties "Details" page, characteristics of the video file such as, Length/Duration, Frame Width, Height and Rate along with other information is shown (see the attached property details screenshot.)

I gather this is obtained by parsing the video file's header. 

What I'd like is, Pascal code that already does all the necessary parsing for the various video containers out there (mp4, mkv, avi, etc, etc.)  Does a unit/component that does that already exist ? if so, where can I get it ? and, any available example on how to use it ?

Thank you for your help.
« Last Edit: October 10, 2023, 11:27:08 pm by 440bx »
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2052
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Showing video properties using Pascal code
« Reply #1 on: October 10, 2023, 11:47:07 pm »
Download MediaInfo from here.
(Just the dll either for 32 or 64 bit)
Example for Delphi with Header for the dll is included.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

440bx

  • Hero Member
  • *****
  • Posts: 4020
Re: Showing video properties using Pascal code
« Reply #2 on: October 10, 2023, 11:58:58 pm »
Download MediaInfo from here.
(Just the dll either for 32 or 64 bit)
Example for Delphi with Header for the dll is included.
Just what I needed... thank you :)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Showing video properties using Pascal code
« Reply #3 on: October 11, 2023, 07:14:13 am »
Hello,
you can try my wrapper : MediaInfoLib wrapper for Lazarus - Free pascal   (windows, linux, macOS)

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

440bx

  • Hero Member
  • *****
  • Posts: 4020
Re: Showing video properties using Pascal code
« Reply #4 on: October 11, 2023, 07:56:32 am »
Hello,
you can try my wrapper : MediaInfoLib wrapper for Lazarus - Free pascal   (windows, linux, macOS)

Friendly, J.P
That is wonderful... thank you very much! :)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: Showing video properties using Pascal code
« Reply #5 on: October 11, 2023, 08:35:14 am »
I remember doing my first steps into accessing the ffmpeg-Libs.
Would have to crawl through my harddisk to find it....
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018