Get video file resolution lazarus / 34-Windows ---------------------------------------------------------------------- CodeSculptor · 2020-11-27 09:39 In Windows (7+, like 10) when you get file-properties for an AVI or MPG and such, you can see the frame-height, frame-width. Is there a way to get that via Lazarus? ---------------------------------------------------------------------- Jurassic Pork · 2020-11-27 11:54 hello, with the mediainfo dll and the delphi wrapper included in the zip download you can retrieve all media infos from a media file. See Attachment. Friendly J.P ---------------------------------------------------------------------- CodeSculptor · 2020-11-27 15:08 There's a few problems in that.  (1) The DLL wrapper relies on Wintypes and WinProcs. So it breaks under Lazarus. (2) Setting the Mode to Delphi didn't help, and even setting the type to win32 (to use Windows instead) produces "can't assign values to an address" errors for each MI_GetProcAddress( call in the DLL wrapper -- which is the entire DLL wrapper purpose. Has anyone actually gotten the MediaInfoDLL wrapper to work for lazarus? I see the same sample image snapped for each. ---------------------------------------------------------------------- Jurassic Pork · 2020-11-28 00:18 hello, here is in attachment a small project to read media infos from media files. When you click on the button you can choose the file to read. the file MediaInfoDll.pas (delphi wrapper) has been converted to Lazarus (only windows)  with {$mode objfpc} header. You must put the mediainfo.dll  in the project folder or in a system path. If someone want to convert the wrapper unit to linux , i think it is possible. Friendly, J.P ---------------------------------------------------------------------- winni · 2020-11-28 01:09 Hi! The Linux counterpart is MediaInfo from MediaArena: https://mediaarea.net/de/MediaInfo/Download/Source Winni ---------------------------------------------------------------------- Jurassic Pork · 2020-11-29 01:12 hello, Quote from: Jurassic Pork on November 28, 2020, 01:18:00 amthe file MediaInfoDll.pas (delphi wrapper) has been converted to Lazarus (only windows)  with {$mode objfpc} header. You must put the mediainfo.dll  in the project folder or in a system path. If someone want to convert the wrapper unit to linux , i think it is possible. on Centos 8 with libmediainfo package installed the MediaInfoDll.pas  works. You need only change the path of the library and use the A version (Ansi) of the functions in your project  : example : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button1Click(Sender: TObject);var  HandleMI: Cardinal;  To_Display: String;  CR: String;  filename: string; begin  CR:=Chr(13) + Chr(10);  if (MediaInfoDLL_Load('libmediainfo.so.0')=false) then  begin      Memo1.Text := 'Error while loading MediaInfo.dll';      exit;  end;  if OpenDialog1.Execute then    begin      filename := OpenDialog1.Filename;       HandleMI := MediaInfoA_New();      To_Display := 'Open' + CR;      To_Display := To_Display + format('%d', [MediaInfoA_Open(HandleMI, PChar(filename))]);       To_Display := To_Display + CR + CR + 'Inform with Complete=false' + CR;      MediaInfoA_Option (0, 'Complete', '');      To_Display := To_Display + MediaInfoA_Inform(HandleMI, 0);       To_Display := To_Display + CR + CR + 'Inform with Complete=true' + CR;      MediaInfoA_Option (0, 'Complete', '1');      To_Display := To_Display + MediaInfoA_Inform(HandleMI, 0);       To_Display := To_Display + CR + CR + 'Custom Inform' + CR;      MediaInfoA_Option (0, 'Inform', 'General;Example : FileSize=%FileSize%');      To_Display := To_Display + MediaInfoA_Inform(HandleMI, 0);       To_Display := To_Display + CR + CR + 'Close' + CR;      MediaInfoA_Close(HandleMI);       Memo1.Text := To_Display;     end;  end; Result in attachment :  Centos 8.1  - Lazarus 2.0.10 - Fpc 3.2  - libmediainfo 20.0.8  Friendly, J.P