Recent

Author Topic: [Open source] LibFFPlay  (Read 12209 times)

metis

  • Full Member
  • ***
  • Posts: 154
Re: [Open source] LibFFPlay
« Reply #15 on: August 08, 2016, 01:30:13 pm »
@mercury

Quote
it’s no need to change LibFFplay when update ffmpeg to a new version
It's not that simple: Have a Look at former Versions of FFmpeg/FFPlay, and You'll see, that the Developers do
Changes quite often (Restructuring Code, diverse Renamings, Changing DataStructures, etc.).
But, of course, 'LibFFplay' needs much less Adaptations to newer FFmpeg-Versions than my 'FFPlay4Laz'.

Quote
See http://dranger.com... + You must synchronize it yourself
Thanks - I know that Link, and the Tutorial, and its Content.
I wasn't talking about the Synchronization of VideoFrames by Time, only about the Order, in which they are output by FFmpeg.

Quote
Please post your environment details
OS          : WinXP SP3 32bit.
Compiler: MinGW32 with the 'gcc v4.9.2', that comes with CodeBlocks v16.01.
FFmpeg  : Zeranoe's Dev-Build of FFmpeg v2.8.6 for Windows 32bit, see:
                https://ffmpeg.zeranoe.com/builds/win32/dev/ -> 'ffmpeg-2.8.6-win32-dev.7z'

Quote
The pre-compiled library...
Which "pre-compiled library" ? - You included the Headers, but Your 'LibFFplay\lib'-Folder is empty.
Quote
...and demo are tested under Windows XP to 8.1 both x86 & x64.
Sorry, but whatever I tried, either with Your compiled Binaries ('libffplay.dll', 'project1.exe'), or
with Your CodeBlock-/Lazarus-ProjectFiles, I always got the same Result:
The Host-App opens; Audio- and Video-Files are loaded and played; Seeking, Audio-Playback and VolumeSetting work, but:

There is no VideoImage, even not a black Screen.

So I had a deeper Look on Your Code...and made some Changes on it.

MainChanges:

- Added: '#define MAKE_FFPLAY_DLL' for conditional Compilation.
  -> Now, You can switch between the original EXE-Code, and the modified DLL-Code.
     Furthermore, anyone can find easily the Modifications for the DLL, w/o further Documentation.

- Deleted: Your Code to "Create a 32-bit surface"; it's not needed to export VideoFrame-Data itself.

- Rewritten: The Code to export the VideoFrames (= still BEFORE being put into the FrameQueue).
  -> Now(!), I have a runnig Video, furthermore with fewer Modifications on the original C-File.

- Reactivated: The Code to display and resize the SDL-Screen.
  -> Now, You can see the original SDL-Screen and the currently exported VideoImages simultaneously.
     -> Indeed, the Sync-Difference is not very big, but there is, specially after Seeking.
        => Consider exporting VideoData AFTER the FrameQueue.

- I used Zeranoe's Dev-Builds:
  -> Pros: - No Need to build the entire FFmpeg-Project -> faster.
                - No Internet needed for Building.
                  (BTW: Afaik, building FFmpeg is as good as impossible w/o InternetConnection.)
                - The resulting 'libffplay.dll' is much smaller (only 136KB) -> easier to redistribute.
  -> Cons: - No more single LibFFPlay-DLL.
                 - You have to add the corresponding FFmpeg-DLLs, downloadable e.g. here:
                   https://ffmpeg.zeranoe.com/builds/win32/shared/ -> Download 'ffmpeg-2.8.6-win32-shared.7z'.


The 'ffplay.c' with my Modifications and the resulting 'libffplay.dll' are in the Attachment
(= 'LibFFPlay_ModifiedByMetis_01.7z').

Note:
Pause/Resume will raise Error "Invalid floating point operation" with Your 'project1.exe', but
this is not the DLL's Fault.
-> You should check Your 'Demo Pascal' in Debug-Mode - You will be surprised.


Keep on going - will be nice.

What's Your DeadLine ?
Life could be so easy, if there weren't those f*** Details.

mercury

  • Full Member
  • ***
  • Posts: 151
Re: [Open source] LibFFPlay
« Reply #16 on: August 13, 2016, 01:24:26 pm »
OS          : WinXP SP3 32bit.
Compiler: MinGW32 with the 'gcc v4.9.2', that comes with CodeBlocks v16.01.
FFmpeg  : Zeranoe's Dev-Build of FFmpeg v2.8.6 for Windows 32bit, see:
                https://ffmpeg.zeranoe.com/builds/win32/dev/ -> 'ffmpeg-2.8.6-win32-dev.7z'
That's the problem. You shouldn’t use a pre-compiled FFmpeg. The header files produce by "make install" is not enough for LibFFplay. Please follow my guide.

Which "pre-compiled library" ? - You included the Headers, but Your 'LibFFplay\lib'-Folder is empty.
You can put FFmpeg's .a files into "LibFFplay\lib". They are so big so I didn't include them in the archive.

So I had a deeper Look on Your Code...and made some Changes on it.
Maybe I can merge to the next version.

Keep on going - will be nice.
What's Your DeadLine ?
The school's deadline, it's finished now. Now I'm making a full featured player base on LibFFplay (including play list, subtitle, glsl, etc). It's a hobby project. I can’t have much time on it. So, it won't be ready in the near future.


metis

  • Full Member
  • ***
  • Posts: 154
Re: [Open source] LibFFPlay
« Reply #17 on: August 16, 2016, 07:04:34 pm »
@mercury
Quote
That's the problem. You shouldn’t use a pre-compiled FFmpeg.
As told above, I had "no VideoImage, even not a black Screen" with Your 'libffplay.dll' and Your 'project1.exe', otherwise I wouldn't have started to find a Solution for You.

Waiting for the next Release of Your 'libffplay.dll'...
« Last Edit: August 19, 2016, 06:33:38 pm by metis »
Life could be so easy, if there weren't those f*** Details.

metis

  • Full Member
  • ***
  • Posts: 154
Re: [Open source] LibFFPlay
« Reply #18 on: February 18, 2019, 12:59:36 pm »
@mercury

Maybe this is interesting for You, too:
http://forum.lazarus.freepascal.org/index.php/topic,44247.0.html

 ;)
Life could be so easy, if there weren't those f*** Details.