Forum > Audio and Video

NON(!)-EXE FFPlay4Laz

<< < (28/28)


--- Quote from: metis on February 20, 2021, 08:10:25 pm ---
--- Quote ---I thought that ffmpeg is a command line tool
--- End quote ---
The FFmpeg-Project consists of several CommandLine-Tools and Libraries, see here.1om]FFVCL-Site[/url].
--- End quote ---

In fact, as with most *nix born projects, command-line tools are basically front-ends for the underlying libs, so when you install the command tools the linraries are also installed as dependencies.

The distinction comes about when a third party program wants to use the provided features, because there are basically two ways of doing it: running the tools in an extra process or binding to and using the libraries.

If want one wants to do can be done with the tools, the first option is usually the more easy to implement but if one wants something more, or different, or to have even more control then one must use the libraries, which is usually (logically enough) more complex.

Which is basically what metis already said :-[

Hi metis
I'd like a copy of your code, sounds great  ;)
e-mail: cdbc40<at>
Regards Benny


--- Quote ---I'd like a copy of your code
--- End quote ---
'RunFFmpeg', which uses the FFmpeg-CLIs is here (totally open-source).
-> GoTo "RunFFmpeg".

The last Release of the complete Player, which uses the FFmpeg-LIBs, 'SDL' and 'Portaudio' is here (partially open-source).
This Version is still with 'SDL1'. I'm currently updating the entire PlayerCode to 'SDL2', and adding some more Features.

The FPC-SourceFile for a minimal MediaPlayer with FFmpeg-LIBs and 'SDL2' is here.

--- Quote ---sounds great
--- End quote ---


--- Quote ---command-line tools are basically front-ends for the underlying libs
--- End quote ---
In Case of 'FFmpeg', the static CommandLine-Tools are stand-alone Programs; no more Files needed to run them.

--- Quote ---so when you install the command tools the linraries are also installed as dependencies.
--- End quote ---
On Windows, there's no FFmpeg-Installation needed (on MacOS or LINUX, don't know - never tried it out).
You simply copy the FFmpeg-CommandLine-Tools and/or the FFmpeg-LIBs wherever You need them.
If You use the CommandLine-Tools as "shared", their Dependencies (= their LIBs) must be available, of course.

These are the Possibilities, where You can put FFmpeg-Files on Windows w/o Installation, because
Windows searches for Files in the following Sequence, when no Path is specified:
(This Explication is not meant for You, lucamar, but maybe interesting for those, You didn't know)
1. The Directory from which the Program loaded
2. The current Directory
3. The Windows SystemDirectories (= [C:\WINDOWS\system], [C:\WINDOWS\system32])
4. The Windows Directory (= [C:\WINDOWS])
5. The Directories, that are listed in the PATH EnvironmentVariable.
I use the first Option to keep may FFmpeg-Apps portabel.

Once I tried out the FFPlay4Laz-Player on LINUX with 'Wine', just out of Curiosity, and
it worked the same Way as if the Files were on Windows (only slower).

Here's the next Release of 'FFPlay4Laz2' (first fully-featured ConsoleVersion with SDL v2):

'FFPlay4Laz' is a portable, easy-to-use, ultrafast and highly responsive Lightestweight-Mediaplayer and -Engine
(no Installation needed, all in all only 88MB on Disk with all Codecs, runs from any Drive).
It renders all Audio- & VideoFormats supported by FFmpeg (, optionally with
outstanding, low-Latency PortAudio-Sound (

The currently used FFmpeg-Version is still v4.0.2 => current FFPlay4Laz-Version is v2.4.0.2.

'FFPlay4Laz v2' does the same as its Predecessor 'FFPlay4Laz v1', but
better & faster with some more PlayerFeatures added - in Detail...

> The entire PlayerCode has been updated to SDL2 - For Differences to SDL1, see "SDL vs. SDL2":,42698.msg376063.html#msg376063,
   and especially the 'SDL 1.2 to 2.0 Migration Guide':
   -> GoTo "Overview of new features - These are the most important new features in SDL 2.0".

-> Briefly spoken:
    - better Fullscreen-Support
    - better VideoQuality with less CPU-Load through Hardware-accelerated, Texture-based VideoRendering
    - better SDL-AudioQuality through 32-bit Audio (int and float)
    - many PlayerFeatures are much easier to implement with a little Help of 'SDL2', e.g.
      the whole WindowManagement and Touch-Support.

-> Simply spoken: The entire Player runs better, smoother & faster.

> Tested with FFmpeg v4.0 + v4.1.5 and SDL v2.0.7 - v2.0.18 on WinXP SP3, Win7 and Win10.

> Edited:
   - Open/Close the Player and Resizing the Videoimage within the SDL-Window were optimized
   - Pause/Resume (<Space>, <p>) is even more responsive, now (as good as no Lag, at all)
   - Seeking (<s>) and in particular Seeking PAUSED, as well as
      Opening PAUSED have been speeded up.

> Added:
   - Optionally block a ScreenSaver, while the Player is running
   - Optionally StayOnTop for the ConsoleVersion, too ('FFPlay4Laz1' did it only for the GUI)
   - Internet-Support (only Play and Pause/Resume, no Seeking)
   - Videoframe-Dropping to make highly compressed Videos playable on old PCs with slow CPUs
   - AutoPause additionally pauses/resumes OnMinimize/OnRestore
   - horizontal/vertical Flip (<h>) and continuous Rotation (<r>) of the Videoimage
   - Seeking in MJPEG-Files (= Motion JPEGs), too (was not implemented in 'FFPlay4Laz1' yet)
   - All Videoimage-Manipulations (= X/Y-Shift/AspectRatio/Zoom/Flip/Rotation) are exposed in
     the Snapshots (<F2>), so that even shifted/zoomed/flipped/rotated Videoimages can be
     copied & saved to ImageFiles.
   - Touch-Support:
     Beside the system-immanent Touchscreen-Functions (= Move/Resize, Minimize/Maximize, Close), currently
     Pause/Resume (tap once) and toggle between a bordered/borderless SDL-Window (tap twice) are available
     via Fingertouch - More Touch-Functions, like Seeking, Volume, Move&Zoom the Videoimage are projected.

> Known Issues:
   See "Known Bugs..." in 'README_Known Issues (Dec. 2021).txt'.

> Projected:
   See "ToDos/Projected..." in 'README_Known Issues (Dec. 2021).txt'.

Attached 'FFPlay4Laz2_Images.pdf' shows:
- The Player's Console, Opening a mp4- and a MPEG-File, within typical OpeningTimes of about 200-300Ms
  on my old WinXP-PC (= an INTEL Pentium DualCore 1,60GHz, 2 GB RAM + INTEL-GPU + SoundBlaster Audigy).
  The mp4-File is opened Playing with PortAudio+ASIO for maximal Sound with minimal Latency.
  The MPEG-File is opened Paused with SDL-Audio, which is an AudioOutput, that should work on every PC.
- Next to it on the right, the FFPlay4Laz2-Folder with all required Files for FFmpeg, SDL2 and PortAudio.
- Below, the Player's Videoscreen with diverse BorderColors, bordered(= resizable)/borderless SDL-Windows, and
  some Videoimage-Manipulations (= continuous X/Y-Shift/AspectRatio/Zoom, horizontal/vertical Flip, Rotation).

Attached 'FFPlay4Laz2_Files.7z' contains
all Files for the FFPlay4Laz2-Win32-ConsolePlayer, without Dependencies (= the FFmpeg-, SDL2- and PortAudio-DLLs).
There are two Executables enclosed: One compiled with ConsoleWindow, the other one without.
Get started with the one with ConsoleWindow, because it always shows Infos & Instructions for the User
-> No Helpfile needed.

See the README-Files 'PlayerFunctions' and 'PlayerOptions' for all currently implemented PlayerFeatures.

Have Fun with superior Sound, and
Merry X-Mas to all Lazarus-User !


[0] Message Index

[*] Previous page

Go to full version