Author Topic: NON(!)-EXE FFPlay4Laz  (Read 58562 times)


  • Hero Member
  • *****
  • Posts: 824
Re: NON(!)-EXE FFPlay4Laz
« Reply #90 on: July 22, 2016, 06:41:24 pm »
So I like your version more And I will continue to follow your works :P


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #91 on: July 29, 2016, 06:56:26 pm »
So I like your version more...
Me, too (of course).  :D
Finally 'LibFFPlay' is a general Solution for general Needs, whilst
'FFPlay4Laz' is a special Solution for special Needs - my Needs.  :)

I'm looking forward to compare the Performance of 'LibFFPlay' and 'FFPlay4Laz', regarding
Speed, Response/Latency, and Synchronism, and
I'm curious, which Features 'mercury' will add to the original FFPlay-Functionality.
Life could be so easy, if there weren't those f*** Details.


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #92 on: May 25, 2018, 01:06:21 pm »
@aradeonas (and all the others)

Here's the next Release of 'FFPlay4Laz' and 'FFInfo4Laz':
(Except of 'SDL.dll', all Files have changed -> Replace all old Files with the new ones.)

What's new...

- Written with Lazarus v1.8.2 + FPC v3.0.4.
- Updated to 'FFmpeg v3.3.5', using FFmpeg-Headers v3.3.5 from 'FFVCL v7.0'.

- Changed: VersionCounting
  From now on, the first Number indicates the required SDL-Version;
  the following 2 or 3 Numbers are the same as the required FFmpeg-Version.
  (This Way, You'll always know, which DLL-Versions are required.)
  => Current Version of 'FFPlay4Laz' and 'FFInfo4Laz' is v1.3.3.5

- Revised: Start PAUSED
  This Option determines, whether MRLs are opened paused or playing.
  (Open paused didn't work really well in the last Version of 'FFPlay4Laz' - now, it should.)

- Added: Audio-only Files supported (former Versions of 'FFPlay4Laz' only played Videos)
  -> Should play all AudioFormats, supported by FFmpeg.

- Added: AudioOutputDevice selectable (Portaudio only; not supported by SDL1)
  When the App starts, all available Pa-AudioOutputDevices are listed in the ConsoleWindow.
  The preferred Pa-AudioOutputDevice can then be set in the INI.File.
  Note: The best Sound is obtained with Portaudio + ASIO (I use 'ASIO4ALL':

- Added: Video-SyncMode selectable
  This Option determines, how Video-MRLs are synchronized, and is set in the INI.File:
  0=NO AV-Sync          : The Audio- and VideoStream are not synced to each other
  1=SyncVideoToAudio: The AudioStream is constant; Video is synced to it
  2=SyncAudioToVideo: The VideoStream is constant; Audio is synced to it
  3=AutoSync              : The AV-SyncMode is selected automatically (recommended)
  When the App runs, the Video-SyncMode can be changed with <0>, <1>, <2>, <3>.

- Added: Toggle VideoScreen
  <Tab> toggles between two Screens, whose Settings are stored in the INI.File.
  E.g. Screen #1 = 5,5,1270,730,0       = "in the left upper Corner, big, w/o Frame nor Titlebar"
         Screen #2 = 625,245,600,450,1 = "in the right lower Corner, small, and resizable".

- Added: Toggle Resizable <-> NoFrame/NoTitlebar
  LeftDoubleClicking on the SDL-Screen toggles between 'Resizable' and 'NoFrame/NoTitlebar'.

- Added: Fullscreen
  When the SDL-Screen is maximized, LeftDoubleClicking on it switches to Fullscreen, and back.

- Added: Freeze Video with <f>.

- Added: Mute Audio with <m>.

- Added: Display Playertimes with <t> (= MRL-Position - MRL-Length - Remaining Time).
  (For the Moment, the Playertimes are only shown in the ConsoleWindow; OSD is projected.)

- Added: Seek PAUSED (experimental with Videos)
  Press <Space> to pause the MRL, then press one of the SeekKeys (= <Up>/<Dn, <Left>/<Right>, <PageUp>/<PageDn>).
  All SeekKeys are repetitive, means as long as the Key is pressed, the Seek will be repeated automatically.
  Notes: - With some Video-Formats, Seeking paused may be a bit slow, especially when Seeking backwards.
              - Sometimes the Seek's TargetPicture is not detected correctly. In this Case, the VideoImage jumps to the actual SeekTarget, when the Video is resumed.
               -> Some better Code is under Construction.

- Added: AutoPause
  <p> switches AutoPause on/off. This Feature is especially useful, if several Players are opened simultaneously:
  When AutoPause is activated, the Player, that has the Focus is resumed, the other ones are paused automatically.
  Note: You can open as much Instances of 'FFPlay4Laz' as Your CPU bears, where
            each Instance may have any Position & Size on the PC-Screen(s), see 'MultiVideoExample.jpg' in the Attachment.

- Added: Step Frame(s)
  <Less> ("<") steps one or several Frames forward; 'Step Frame(s)' is repetitive.
  Note: Mostly it's more useful to step several Frames, instead of Stepping only one Frame.
           Therefore, the Number of Frames to be stepped at once can be set in the INI.File.

How to install...

Download 'FFPlay4Laz-' from the Attachment, extract it, and
put all required DLLs (FFmpeg, SDL, Portaudio) into the same Directory.
'FFPlay4Laz' is portable, so You may put the FFPlay4Laz-Directory wherever You want on Your PC.

Requirements... (see also 'README_ConsoleInfo.txt' -> GoTo "Requirements...")

- The FFmpeg-DLLs - There are several Ways to get them, e.g.:

  - From 'FFVCL':
    -> Download the FFmpeg-DLLs for Win32
        (Those for the FFVCL Player are sufficient = "LGPL, Player/Decoder only, smaller filesize").
        The FFmpeg-DLLs are in the Folder 'LibAV' - 'SDL2.dll' and 'SoundTouch.dll' are not used by 'FFPlay4Laz'.

  - From 'Zeranoe':

  - From 'FFmpeg':
    These are the FFmpeg-SourceFiles; You have to build the DLLs by Yourself.
    I use 'MinGW v4.9.2' + 'Nasm v2.12.01' (+ 'SDL v1.2.15' for FFmpeg's 'FFPlay').

  This Version of 'FFPlay4Laz'/'FFInfo4Laz' is written with the DLLs from FFmpeg v3.3.5.
  I tested it with the DLLs from the last v3.4 ReleaseBranch (= v3.4.2, "Cantor") -> It works with them, too.

- The SDL-DLL:
  -> Download ''.

- The Portaudio-DLL:
  -> Download 'libportaudio32bit.dll'.

How to use it...
see 'README_ConsoleInfo.txt', 'README_ConsoleKeys.txt' and 'README_ConsoleOptions.txt'.

Known Bugs, ToDos, Not so Nices...
- Still using SDL1 -> Update to SDL2 is projected.
- Seek paused is experimental; it may not work well with some Video-Formats (see above).
- No NetworkSupport implemented.
  If You need a Lazarus-FFmpegPlayer with NetworkSupport, somby did one, see:,40446.0.html

Try them out, tell me Your Opinion and if there are Bugs.

« Last Edit: February 25, 2019, 12:59:43 pm by metis »
Life could be so easy, if there weren't those f*** Details.


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #93 on: February 21, 2019, 05:22:09 pm »
Here's the next Release of 'FFPlay4Laz':
(Except of 'SDL.dll' and 'libportaudio32bit.dll', all Files have changed since the last Release.)

What's new...

- Written with Lazarus v1.8.4 + FPC v3.0.4
- Updated to 'FFmpeg v4.0.2', using FFmpeg-Headers v4.0.2 from 'FFVCL v7.1' => current Version is v1.4.0.2.

- Added: Seek with the Mousewheel (= the Preset, when a MRL is opened)
  Press <s>, then seek with the Mousewheel 1.0 Sec. Forwards/Backwards; RightClick seeks to the CUE-Position.

- Added: Adapt any MRL to any Screen
  Press one of the following Keys, then set the Value with the Mousewheel; RightClick resets to Factor 1.0:
  <a> Set AspectRatio-Factor (= continuous, so not only fix 4:3, 16:9, 16:10, etc.)
  <x> Move the VideoImage in X-Direction
  <y> Move the VideoImage in Y-Direction
  <z> Zoom the VideoImage (= continuous, so not only fix 1:2, 1:4, 2:1, etc.)
  <v> Set Volume (0-5x Amplification)
  > With these Functions wrong Encodings (e.g. incorrect AspectRatio, low Volume) can be corrected,
      while Watching a Movie, so time-consuming Transcoding of the entire Movie is not needed.

- Added: Colored Border around the VideoImage
  The BorderColor is set in the INI-File -> [VideoOptions] -> 'BorderColor' as RGB, e.g.:
  BorderColor=0,0,0 draws a black Border, 0,255,0 a green One, 219,219,219 a "ScreenGrey" -> any BorderColor can be set.
  > This Feature helps to see the Distance between the VideoScreen and the actual VideoImage.

- Added: AutoSave VideoScreen-Parameters
  In 'FFPlay4Laz' <Tab> toggles between two Settings for the SDL-Window, e.g. to switch a Movie between
  a Laptop and a TV-Set. From now on these Settings are saved automatically in the INI-File, so You don't
  have to set them manually any more.

Attached 'FFPlay4Laz-' contains a Summary of all Options and PlayerFunctions, that
are currently implemented in 'FFPlay4Laz'.

Attached 'FFPlay4Laz-' shows the Files You need to run the FFPlay4Laz v1.4.0.2 Console.
The Download-Sites for FFmpeg, SDL and Portaudio are in my previous Post.

Hope, You like it - I use it every Day  :)
« Last Edit: February 25, 2019, 02:11:55 pm by metis »
Life could be so easy, if there weren't those f*** Details.


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #94 on: October 22, 2019, 01:00:02 pm »
Here's the next Release of 'FFPlay4Laz' (first GUI-Version):

Added to Version v1.4.0.2...

<F2> takes a Snapshot of the current Videoscreen and saves it in [FFPlay4Laz-DIR\Snapshots].

FFPlay4Laz-Library (FFPlay4Laz-AV-Engine):
The FFPlay4Laz-AV-Engine is something like a "Mini-VLC", reduced to and optimized for pure PlayerFunctions & Sound.
It doesn't have the plenty of Features of 'VLC', but (I think) it has all Features, that an Audio/Video-PlayerEngine should have.
( see 'README_PlayerFunctions.txt' and 'README_PlayerOptions.txt' in the attached 7z-File )
It's more responsive and provides better Sound via 'Portaudio'. Its Interface is much easier to use than
the VLC-Interface, because the entire PlayerCode is completely included in the FFPlay4Laz-Library.

together with a

LCL-Test&Demo-GUI (FFPlay4Laz-FrontEnd):
The GUI demonstrates how to use the FFPlay4Laz-API (all event-driven, no Pipes, no Timers, no 'Application.ProcessMessages', etc.).
The Videoimage is displayed optionally in- or outside of the GUI (see attached 'InternalExternalVideoscreen.jpg').
All Mouse- and Keyfunctions of the GUI-Player are the same as in the ConsoleVersion of 'FFPlay4Laz'.

The Dependencies (= required DLLs for FFmpeg, SDL, Portaudio) are the same as described in my previous Post.
All FFPlay4Laz-Files have changed since the last Release, so You have to replace them all with the new ones.
If You got all Files and after having compiled the Demo-GUI's ProjectFiles, Your FFPlay4Laz-Folder should
look as shown in 'FFPlay4Laz-Folder.jpg'.

To get started with the FFPlay4Laz-GUI, compile and open it with Terminal (-WG Switch = OFF), because:
- the Terminal shows always Infos & Instructions for the User -> No Helpfile needed
- Chapters (<c>) and MRL-Infos (<i>) are only displayed in the Terminal, for now.

You may use this GUI as a FrontEnd-Template for any Version of the FFPlay-CLI by 'FFmpeg'.
To do so, You have to make some Modifications on the original ffplay.c-File, like:
- turn it to a Library
- get the SDL-Window's Handle
- implement and export the PlayerEvents, as described by mercury:,33105.0.html.

Or You use only Parts of the GUI (e.g. the PositionSlider with its Options) for a Custom-VLC-FrontEnd.
To do so, You have to:
- eliminate all the Code to capture/release the SDL-Window
- replace all FFPlay4Laz-Calls with the corresponding VLC-Calls.
For how to use the VLC-Libraries with Lazarus, see the
VLC-TestPlayer by Michael Van Canneyt: [Lazarus-DIR\components\vlc\test\testlcl.lpi].

Coming next: Update to SDL2.  :)

EDIT: For those, who have downloaded the 7z-File before 10/25/2019:
There was a tiny Bug, that made the HostApp crash with a 'DivByZero' Error, when it's opened without Terminal.
-> ADDED in 'FormMINIMAL.pas': Line #1049 'if (FLenSec > 0) then' to solve this Problem.
The 7z-File has been corrected and replaced - Please, download it again - Sorry.
« Last Edit: October 25, 2019, 12:49:48 pm by metis »
Life could be so easy, if there weren't those f*** Details.


  • New Member
  • *
  • Posts: 27
Re: NON(!)-EXE FFPlay4Laz
« Reply #95 on: December 03, 2019, 10:47:47 am »
could you compile FFPlay4Laz- for linux 64 bit. it would be interesting to see your projec


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #96 on: December 04, 2019, 01:58:49 pm »

The PlayerCore itself is entirely cross-platform, but there are some Features included in the DLL, like
Switching between two SDL-Windows (<Tab>) and save their last Position&Size, that I could only realize
with the Windows-API, because SDL1 does not have the according Functions yet (or I didn't find them).

In the current Demo-GUI, as well, the SDL-Window (= the Videoscreen) is captured and resized via the Windows-API.

That's one of the Reasons why the next Step is updating all to SDL2, like:
Windows 'SetWindowPos()' -> 'SDL_SetWindowPosition()'
Windows 'GetWindowPlacement()' -> 'SDL_GetWindowPosition()'
(This is only an example; there's much more to be done.)

Why don't You try out the current Win32-Version with Wine or Virtualbox till then ?
Would be interesting for me to know, whether it works this Way, too.  :)
Life could be so easy, if there weren't those f*** Details.


  • New Member
  • *
  • Posts: 27
Re: NON(!)-EXE FFPlay4Laz
« Reply #97 on: December 07, 2019, 04:39:49 am »
Why don't You try out the current Win32-Version with Wine or Virtualbox till then ?
Would be interesting for me to know, whether it works this Way, too.  :)
wine 3.20
*                                                                             *
*  FFPlay4Laz v1.4.0.2 - Console                                              *
*                                                                             *
*  FFmpeg-PascalHeaders v4.0.2, ported from FFmpeg v4.0.2 by 'FFVCL' (v7.1)   *
*  <>                                                     *
*                                                                             *
*  Copyright (c) 2014 Robert Bakos,                            *
*                                                                             *

> MRL-StartTime:+00:00:00.000
> CUE-Position set to MRL-StartPosition.
> AutoPause=OFF; DoOnEOF: 1=RepeatALL.

! Opening - Wait...
0009:fixme:keyboard:X11DRV_LoadKeyboardLayout L"00000409", 0080: semi-stub! Returning default layout.
0009:fixme:keyboard:X11DRV_LoadKeyboardLayout L"00000419", 0001: semi-stub! Returning default layout.
EAccessViolation: Access violation


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #98 on: December 08, 2019, 07:38:28 pm »

Thanks for Testing - Typical Case of what's written in my Signature.  :D

Referring to Your Post, the Error occurs right at the Moment, when SDL is initialized.
BTW, it's better to post a Screenshot of the Output -> same Info / less Space.  ;)

Referring to the Error "fixme:keyboard":
Did You read -> "If your application doesn't work" ?
"An application may not work because Wine doesn't yet fully implement one of the DLL files the application is trying to use.
 If you ... see a lot of "FIXME:" messages while running the application in Wine, this is likely the case."

-> Did You try with a newer Version of Wine than v3.20 ?
See -> e.g. "... Wine 4.0 supports Direct2D ...".

If You already did and it's still not working:
I've already written a "minimalst" FFmpeg-ConsolePlayer with SDL2, based on 'ffplay.c', that I'll publish soon.
The Player's BasicStructure is the same as already posted for SDL1, here:,26666.msg196377.html#msg196377
-> download attached ''.

You may compile those SourceCodes on Your PC and check the Binaries for cross-platform Ability.  :)
« Last Edit: December 09, 2019, 10:19:14 am by metis »
Life could be so easy, if there weren't those f*** Details.


  • Full Member
  • ***
  • Posts: 172
Re: NON(!)-EXE FFPlay4Laz
« Reply #99 on: December 12, 2019, 12:47:33 pm »

Sorry, but I always get slightly nervous, when I'm told, that something does not work.

So, I took my old Thinkpad and put 'Linux Mint 17.2 32-bit' on a Drive, that I don't use.
With the 'Software Manager' I installed the preset Wine-Version = Wine v1.6.2.
Note: All Standard-Installation, w/o any special Settings.

Then I copied the complete FFPlay4Laz-Folder together with all required DLLs into DIR
[/home/user/.wine/drive_c], that had been created during Wine-Installation, just the
same Way as I would do on Windows
(see Screenshot 'FFPlay4LazFolderOnLinux.jpg').

Finally, I launched both FFPlay4Laz-Executables with the 'Wine Windows Program Loader', and...
- The ConsoleVersion works.
- The GUI-Version with external Videoscreen works (see Screenshot 'FFPlay4LazOnLinux.jpg')
- The GUI-Version with internal Videoscreen works with 3 minor Problems, which are Windows-API-dependent:
   1. The SystemMenu's [X] (= Close) of the SDL-Window is not visually deactivated
   2. RightClicking on the SDL-Screen (= Reset) is not detected, when the SDL-Window is captured
   3. The captured SDL-Window is not positioned correctly within the PlayerForm, nor resized with it.
       -> Preliminary Solution: Click on CheckBox 'chkAutoResize' (= Hint: "Resize the captured SDL-Window with the internal Videoscreen").

=> 'FFPlay4Laz v1.x' works on Linux with Wine, too (at least with my Linux-Version).  :)  :)  :)
« Last Edit: December 12, 2019, 12:54:19 pm by metis »
Life could be so easy, if there weren't those f*** Details.


TinyPortal © 2005-2018