@Eleazar
Tnx for being interested in my FFPlay4Laz-Project.
Though You could find all Answers to Your Questions in this Thread, here's a Sort of
Summary...Previously I have incorporated a video player in my application with PaslibVLC, but I was looking at alternatives.
Same with me:
In the Past, I wrote diverse Player-FrontEnds with
Fmod/FmodEx (= Audio-only),
VLC and the
MPlayer, but none of them matched my Needs
:
I wanted a really fast and compact MediaPlayer, that would play any Audio and Video from anywhere with exceptional Sound.What exactly is FFPlay4Laz? + I'm trying to understand your FFPlay4Laz project.
FFPlay4Laz is a
portable Audio/Video-RenderingEngine, that does not depend on any other MediaPlayer-BackEnd, like
VLC,
MPlayer /
MPV or
GStreamer, so that their Installation is not required.
It's "lightestweight": The latest Release
(see above) requires only 47MB of Diskspace with all Codecs and Files, and
works
from WinXP to Win10 and on Linux&Wine (Win11, macOS not tested yet) w/o any Modifications to
play any Audio- and VideoFormat from the oldest to the latest one,
even on old and slow PCs.
Briefly spoken, FFPlay4Laz is ...
-
FFmpeg: Demuxer, Decoder, Timebases
+
SDL : cross-platform Threads, Events, Keyboard-/Mouse-/Touch-Input, Audio-/Video-Output
+
PortAudio: Low-Latency Realtime Audio-Output,
entirely written in FreePascal (FPC).
Thus merging ...
the Power&Performance of FFmpeg with the Speed&Responsiveness of SDL, proven in
many Videogames, plus
the unique,
crystal-clear Sound of PortAudio, which is used e.g. in
UOS,
Audacity,
Mixxx, or
LMMS, and
last but not least the
Advantages of FreePascal-Programs, like HiSpeed&Stability at LoMemUsage.
Note: All of these Projects that use PortAudio are Audio-only Projects, while FFPlay4Laz is the only Audio
and Video !
Having been inspired ...
initially by the
Dranger-Tutorial and finally by FFmpeg's TestPlayer
FFplay (source =
ffplay.c).
And having built in plenty of - partly "unusual" and unique! -
PlayerFeatures, such as ...
• reopen the last MRL with
all previous Settings (Videoscreen-Position&Size, PlayerPosition, Audio-/VideoSettings), optionally
paused• switch back and forth between two Videoscreens or Monitors with just one Keystroke (<Tab>), e.g. for VideoPresentations or
VJing• all VideoSettings (X/Y-Shift, AspectRatio, Zoom, Rotation) are step
less to
Adapt any MRL to any Screen (i.e. not only in fixed Steps, as usual)
• optionally step
multiple Audio-/VideoFrames at once (i.e. not only one Frame, as usual)
• seek/repeat/loop with
out Audio-/Video-Lags, nor Gaps
• several AutoPause-Options: OnMinimize/Restore, OnDeactivate/Activate (= Focus), OnLeave/Enter (= Hover)
• several EOF-Options: Wait, RepeatALL/FromCUEPosition, Stop, Exit
•
ASIO- /
JACK-Support via PortAudio
• Touch-Support for Touchscreens.
(see the first 2 attached ReadMe-Files for all currently implemented PlayerFeatures)
You probably won't feel and hear the Difference to other MediaPlayers, as long as You are only Watching Movies on Your PC or Laptop.
But, if You take it
for Music, MusicVideos (MV) or Video-Tutorials and -Presentations over HiQuality-SoundSystems, You will (or at least You should).
Info: I use FFPlay4Laz on Windows with
ASIO4ALL and on Linux&Wine with
PulseAudio.
I have tried to compile you minimalist version by gathering all necessary files ...
To compile it, You need the Delphi/FPC-Headers
for FFmpeg and
for SDL. To run the compiled Executable, You need their Libraries (
see above).
The currently used FPC-Headers are always listed in the respective README_Credits-TextFile (see attached 'README_Credits (Dec. 2022).txt').
FFmpeg is under heavy Development, so You always need the
corresponding FFmpeg-Headers and -LIBs. The SDL-API does not change that much.
That's why, I introduced a special Way of
VersionCounting in FFPlay4Laz,
here (-> GoTo
"Changed: VersionCounting").
This Way, You always know, which FFmpeg- and SDL-Version to use.
I'm trying to find a working example with required files included in your posts, ...
Can't post it here, because of the 500KB-Limitation for Attachments in this Forum, and especially because of
LicenceRestrictions with FFmpeg.
To avoid "LicenseIssues", it's better not to distribute FFmpeg directly, but to provide a Link to download it, like
this one.
It's also recommended to use the FFmpeg-LIBs (= DLLs in Windows) than to implement FFmpeg-SourceCode in a Project.
Could you build a videoplayer with it that is controlled from a GUI? As I understand you are currently working on a version that is embedded in a GUI?
Yes, via the
FFPlay4Laz-Library.
For FFPlay4Laz1 (= with SDL1), this was done together with a Demo-LCL-GUI and its Lazarus-ProjectFiles,
here.
-> Download attached 'FFPlay4Laz-1.4.0.2_CLI+LIB+GUI.7z': The Version is 'v1.4.0.2', so You need 'SDL v1.2.15' + 'FFmpeg v4.0.2' + PortAudio.
The latest Version of FFPlay4Laz2 (= with SDL2) is
posted above, along with the Links to all required LIBs and a Description of how to use them.
For the Moment, it's Console only. Lib and Demo-GUI are projected.
Hope, this Summary was helpful for You