Where can I find a free/opensource Delphi multimedia component? - delphi

I was in a project where I must be able to play almost audio/video files (format).
The requirements:
Video:
.dat (vcd & svcd)
.vob (dvd)
.rmvb (real media)
.mp4 (mpeg4/x264/h264)
.wmv/.asf (windows media)
.avi (xvid/divx/mpeg2,etc...)
.mkv (matroska, optional)
Audio:
.mp3 (you probably know this)
.ogg (vorbis)
.wma (windows media)
.wav (wave)
I already have all of the above codecs installed and working perfect on my system (tried it with WMP 10, Media Player Classic Home Cinema, VLC & Zoom Player).
And I have already tried the basic TMediaPlayer but can't work on other beside .avi for video, then i grab DSPack but it can't play .avi (xvid/divx) nor .mkv, i grab VLC but it's only gave me more headache because it was only ActiveX wrapper (no pure vcl component).
Can someone suggest another component? Free or open source would be preferred.
Edit:
I already solve issue with DSPack, it looks like I have to use always FDDShow for video playing using DSPack.

You can import the WMP 10 ActiveX control (Component->Import Component menu item), and then embed WMP into your application.
Since it's part of the operating system, can't get any more free than that; if you can run your Delphi app, the OS is there. :-)

DSPack was going to be my suggestion. I'm not sure what problems you had with DivX - I've used the free DivX codec with a DSPack-based program for years. FFDShow looks like a promising solution, too, although I've experienced problems with the quality of playback (tearing, low frame rates, instability when playing for a long periond, etc.) for some types of files. The video hardware and drivers are also very important, and unless you're supplying the complete hardware, software and image package, the users of your program may run into different problems in terms of the subjective acceptability (to them) of the playback. Keep that in mind - codec versions are important, driver versions are crucial, and some hardware just doesn't work right, no matter what the manufacturer says.

Related

Encoding of video using built in Windows functionality (Media Foundation)?

I've been investigating various method of exporting video from my FMX application, in particular mp4 using the h.264 codec. One method is to use FFmpeg with the FFVCL components. The down side of this is that including FFmpeg dlls with my application increases the download size. The other problem is the licensing issue of using the libx264 encoder. There is a free to use libopenh264 encoder but isn't as good as it only supports the Baseline profile.
However, Windows has video encoding built in which includes the full h.264 with High profile (mfh264enc.dll). This seems like the ideal solution for high quality video export while minimising the size of my application and avoiding licensing problems. The following page gives information on the video encoding interface in Windows.
https://learn.microsoft.com/en-us/windows/win32/medfound/overview-of-encoding-in-media-foundation
My question is how can I call this from Delphi to export video from a sequence of images stored in TBitmap? My application is FMX but initially only for Windows. Has anyone already created a Delphi interface for video encoding using the built in Windows dlls? I don't have much experience with calling dlls from Delphi. How much work would it be to create an interface myself?

TMediaPlayer Error - Unsupported Media File

I am trying to play a mp3 file from Firemonkey XE7 windows application. It should have been a simple task by putting a TMediaPlayer component, assigning it a .mp3 file, and just playing it. However, I get the following error:
Application Error
Exception EReadError in module MediaPlayerTest.exe at 00000000000012139E.
Error reading MediaPlayer1.FileName: Unsupported media file testfile.mp3.
I have also tried .wav, and it didn't work either.
(Audio codec have already been installed and the media files can successfully be played by windows media player.)
I then try compiling the very same program on another computer, and it can be compiled successfully and the mp3 plays just fine.
Does anyone know why it doesn't compile on one computer but does on another?
XE7 used DirectX for audio/video playback. Likely something is messed up with your directx installation. I noticed this problem first on a VMWare virtual machine, TMediaPlayer is unable to play anything all file types are unsupported. However same program running on my host worked fine.
Try reinstalling DirectX.
Same problem here In a VM, host machine.. tested on a few other PC's as well with the same result. Delphi 10.2.
I tracked it down to TWindowsMedia.InitVideoMixingRenderer9 in FMX.Media.Win which includes this in calculating Result:
Succeeded(FVMRFilterConfig9.SetRenderingMode(VMR9Mode_Windowless));
GetLastError returns 126,
ERROR_MOD_NOT_FOUND
126 (0x7E)
The specified module could not be found.
Changing that call to pass in VMR9Mode_Renderless works (at least for me). I didn't dig into the why/what of this. I'm also just playing audio, no video.
Just thought I'd pass along a workaround in case it's helpful.
It appears to be a limitation of Direct X when installed in a VM. I installed a different media codec (the basic k-lite codec pack) and the player worked fine after that without any code changes. Also, filed a bug report so hopefully R&D can address it
I've got some very similar errors.
And there are more than one cases:
Problem in mp3. Some Mp3 is unsopported by standard TMediaPlayer. May be it can be fixed by registering of your codec (view list item 3)
If you tried to use TMedia you can't open any media file until
you not created TMediaPlayer in any place of your code and filled
its FileName property. It's very strange, because
TMediaCodecManager.RegisterMediaCodecClass('.mp3', SVMP3Files,
TMediaType.Audio, TWindowsMediaCodec); is called if you have
FMX.Media in uses.
Problems in codecs. You can find example in FMX.Media.Win unit, how to register new codec for your app.
Hope this information will help you.
I'm not familiar with XE7, but in earlier versions the TMediaplayer used the windows mediaplayer. So the behaviour relies on the actual installed version of the windows player on the computer. This explains the different behaviour on the two computer.
You also can use an external player such as real player or other. Use shellexecute to start the external player. Third party player give more details to run mp3.

Determining video file properties using DSpack and Delphi7

I would like to determine various properties from a video file (eg MP4) such as the length of the video etc but I have no experience of working with multimedia Can anyone help
Thanks
MIke
You don't need to use DSPack for this task.
Use the dll version of the MediaInfo library (the download comes with a Pascal demo and Google/Bing/Yahoo!/whatever come for more). Plus, you don't rely on the installed codecs of a machine as MediaInfo is independent.

delphi webcam capture : why does it not work on laptop?

I have tried many webcam components for delphi XE (Tcamera, TJVAviCapture, sources codes I found...) Mostly of them work on my desktop computers, but does not work on my maptop (tested with 2 laptops).
They open this source video window, and then webcam panel.
Some of them work in DELPHI IDE but not in .exe generated by delphi !
Does someone know a reliable component (or a snippet) that simply display the webcam on any laptop or dektop without showing that video source window ?
Regards
I've been using the Mitov Video Library for several years to do this sort of thing and am very happy with it. It's run my webcam application on many hundreds laptops and desktops all over the world without any problems. Free for non-commercial use. Regularly updated. Good support. Source code available.
http://www.mitov.com/screenshots/videolab

Library or component for creating video files (AVI, etc.) with Delphi 6 (C/C++ OK too)?

I have a stream of JPEG frames and accompanying audio buffers that I want to write to a video file. If possible, I'd like to let the user choose their format from the available Windows codecs if the library/component supports the use of those. If not, then if it can create something popular like AVI, WMV, or MOV format files then that would be fine. Does anyone know of a good library or component compatible with Delphi 6 that can do this? If not, a C/C++ sample would work too.
For AVI you may want to check if you have access to the AVIFile APIs from Delphi. This question suggests it is possible.
For WMV look for DirectShow access.
For MOV you can use the free Quicktime SDK.
It appears the JEDI site might have some API bindings that you can use.

Resources