Author Topic: ffplay in ffmpeg-1.2.12  (Read 467 times)


  • Newbie
  • Posts: 3
ffplay in ffmpeg-1.2.12
« on: February 11, 2019, 11:49:20 pm »
Hi all,
I found an interesting project from GitHub. It is based on ffplay of ffmpeg-1.2.12 and provides the same functions in ffplay.
It contains application examples in Codetyphon (Lazarus) /Delphi and C++.

« Last Edit: February 12, 2019, 07:13:01 pm by emailadd »


  • Full Member
  • ***
  • Posts: 145
Re: ffplay in ffmpeg-1.2.12
« Reply #1 on: February 18, 2019, 12:53:19 pm »

an interesting project...based on ffplay of ffmpeg-1.2.12

provides the same functions in ffplay
The present Code does, what it says in its Description: "it can play any files that ffplay.c plays".
So, it opens an URL/MRL with CommandLine-Options. While Playing, the current Position is shown, and
You may pause/resume and stop/close the Stream - nothing else, that's all.  %)
None of FFPlay's additional PlayerFunctions ( -> GoTo: "While playing")
is available via this DLL, e.g. You can not seek with it - quite important for a Player, isn't it ?
=> It's a very interesting project, that needs some Extensions and Updating (v1.2.12 is from 2013).

mercury had the same basic Idea to realize a FFmpeg-Player for Lazarus by Linking to 'ffplay.c':,33105.0.html.
His Code is much easier than the one above and it includes PlayerFunctions like
Seek, NextFrame, SetVolume, Change the Audio/Video/Subtitle-Stream.
At that Time, I posted a modified 'ffplay.c' (v2.8.6), that is based on his Idea. It can be compiled
either to a FFPlay-EXE or to a FFPlay-DLL simply by Setting only one CompilerDirective, see:,33105.msg218166.html#msg218166
-> GoTo: "MainChanges:", download the attached 'LibFFPlay_ModifiedByMetis_01.7z' and
   search "MAKE_FFPLAY_DLL" in that 'ffplay.c'.
=> mercury's 'LibFFPlay' works, too; it only needs some minor Changes (read my Comments in the Thread).

IMHO, the Best would be a Mix of these two Projects - Do You know C++ ? Are You interested ?  ;)
[Tip: The right Place to pick VideoData is here: 'FFPlayLib.c' -> "FFP_events->event_video( FFP_events->sender, &yuvData );" ]

BTW: Do You know my FFPlay4Laz-Project, a FFmpeg-Player totally written with FPC ?
The latest Release is a Console, which can be downloaded here:,26666.msg286945.html#msg286945).
Since then I've added some MousewheelFunctions (Seek, Volume, X/Y-Shift, continuous(!) AspectRatio, Zoom).
Furthermore I have put the Code into a DLL and wrote a Test/Demo-GUI for that DLL.
The only Thing, that holds me back from Releasing it are some Issues, when Resizing the VideoImage
with the MainForm - all the Rest works really fast and responsive, by having:
- no Timers, all event-driven
- no 'CheckSynchronize()', no 'Application.ProcessMessages', no 'Sleep()', etc. 
- the SDL-Window embedded in the GUI (with all Mouse- and KeyFunctions working just as in the Console)
- PortAudio-AudioOutput implemented for minimal Latency and maximum AudioQuality.

I use the FFPlay4Laz-DLL on my PC since last Summer. Attached, You find its Wrapper, just to
give You an Idea of what 'FFPlay4Laz' does and to show You, how easy it is to use with Lazarus.
Life could be so easy, if there weren't those f*** Details.