Forum > Beginners
omxplayer using lazarus
hamza:
Hi to all
How can i open a vedio .mp4 using omxplayer and pascal lazarus??
Any example plz??
Mike.Cornflake:
The following code is completely untested, and I've never used Raspberry Pi. The simplest way might just be...
--- Code: ---Uses
Process;
...
Var
sOutput: String;
Begin
RunCommand('omxplayer', ['/path/to/video/vedio.mp4'], sOutput);
End;
--- End code ---
Although this answers your question, you're probably after a more embedded use... A minimal 5 second google suggests to me omxplayer isn't for playing embedded video in an app (though I may be wrong)... If that's what you're after, then is MPlayer available on Raspberry instead?
hamza:
Thank u for your support and i will test your code
I have a problem with mplayer becouse it is running mp4 vedio very slowly and i dont know what is the problem.
but when i run the same vedio with oxmplayer( using command terminal ..it is working normally...
parcel:
In other way, OPENELEC is best solution for media OS.
It playing most of formats without problem.
http://openelec.tv/
hamza:
--- Quote from: Mike.Cornflake on March 27, 2015, 08:22:53 pm ---The following code is completely untested, and I've never used Raspberry Pi. The simplest way might just be...
--- Code: ---Uses
Process;
...
Var
sOutput: String;
Begin
RunCommand('omxplayer', ['/path/to/video/vedio.mp4'], sOutput);
End;
--- End code ---
Although this answers your question, you're probably after a more embedded use... A minimal 5 second google suggests to me omxplayer isn't for playing embedded video in an app (though I may be wrong)... If that's what you're after, then is MPlayer available on Raspberry instead?
--- End quote ---
I tried your code but it seems not working but this error appeared
my prog
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, process, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, UTF8Process;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Process1: TProcess;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
Var
sOutput: String;
Begin
RunCommand('omxplayer', ['/home/pi/Cc.mp4'], sOutput);
end;
end.
and error message was
unit1.pas(39,13) Error: Identifier not found "RunCommand"
unit1.pas(46) Fatal: There were 1 errors compiling module, stopping
how can we solve this problem???
thanks in advance
Navigation
[0] Message Index
[#] Next page