Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-07

How to play H264 mp4 video using free pascal?

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dennis Poon

what library (e.g. ffmpeg) should I call?
any example e.g. of it?

Actually, the target platform is Raspberry Pi (raspbian OS). It comes with a video player that does it (omxplayer) but I don't know how to interface with it apart from launching it.
After launch, I don't know how to pause it from my free pascal program.

The goal is to have my program play an advertisement video as a screen saver. When someone touches the mouse or keyboard, the video pause and return to my program.

Thanks in advance.

Dennis

Fabio Luis Girardi
to Dennis Poon

Start omxplayer with tprocess and use pipes to do this

"Dennis Poon" wrote 19 lines
what library (e.g. ffmpeg) should I call? any example e.g. of it? Actually, the target platform is Raspberry Pi (raspbian OS). It comes with a video player that does it (omxplayer) but I don't know how to interface with it apart from launching it. After launch, I don't know how to pause it from my free pascal program. The goal is to have my program play an advertisement video as a screen saver. When someone touches the mouse or keyboard, the video pause and return to my program. Thanks in advance. Dennis _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Graeme Geldenhuys
to Dennis Poon: what library (e.g. ffmpeg) should I call? any example e.g. of it? Actually, the target…
Dennis Poon wrote
what library (e.g. ffmpeg) should I call?

Michael van Canneyt did some work for us where we implemented libVLC support (playing videos and sounds using the VLC backend). The code was added to the Free Pascal project as far as I know. The GUI front-end code (very small amount) was added to LCL and fpGUI. He code was tested on Windows, Linux and FreeBSD systems.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
Dennis Poon
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
On 2014-07-22 12:19, Dennis Poon wrote: > what library (e.g. ffmpeg) should I call? Michael van Canneyt did some work for us where we implemented libVLC support (playing videos and sounds using the VLC backend). The code was added to the Free Pascal project as far as I know. The GUI front-end code (very small amount) was added to LCL and fpGUI. He code was tested on Windows, Linux and FreeBSD systems.

Thanks Graeme,

But it seems that VLC does not utilize the GPU in raspberry pi, so the playback speed is too slow. :-(

Dennis

Dennis Poon
to Fabio Luis Girardi: Start omxplayer with tprocess and use pipes to do this
Fabio Luis Girardi wrote 21 lines
Start omxplayer with tprocess and use pipes to do this Em 22/07/2014 08:30, "Dennis Poon" < > escreveu: what library (e.g. ffmpeg) should I call? any example e.g. of it? Actually, the target platform is Raspberry Pi (raspbian OS). It comes with a video player that does it (omxplayer) but I don't know how to interface with it apart from launching it. After launch, I don't know how to pause it from my free pascal program. The goal is to have my program play an advertisement video as a screen saver. When someone touches the mouse or keyboard, the video pause and return to my program. Thanks in advance.

Thanks.
But how do I detect that any mouse or keyboard changes by user now that the omxplayer is fullscreen has the focus?
I need to detect user interaction to pause the omxplayer and put my program back to the front.
The question in other words is how does a non-front program detect user inputs?

Thanks.

Dennis

Fabio Luis Girardi
to Dennis Poon

omxplayer uses a direct video output (it don't create a X window), so, your program still have focus. See the command line options for more information...

2014-07-23 5:59 GMT-03:00 Dennis Poon :

Show quoted text 37 lines
Fabio Luis Girardi wrote: Start omxplayer with tprocess and use pipes to do this Em 22/07/2014 08:30, "Dennis Poon" escreveu: > what library (e.g. ffmpeg) should I call? > any example e.g. of it? > > Actually, the target platform is Raspberry Pi (raspbian OS). It comes > with a video player that does it (omxplayer) but I don't know how to > interface with it apart from launching it. > After launch, I don't know how to pause it from my free pascal program. > > The goal is to have my program play an advertisement video as a screen > saver. When someone touches the mouse or keyboard, the video pause and > return to my program. > > Thanks in advance. Thanks. But how do I detect that any mouse or keyboard changes by user now that the omxplayer is fullscreen has the focus? I need to detect user interaction to pause the omxplayer and put my program back to the front. The question in other words is how does a non-front program detect user inputs? Thanks. Dennis _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com