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.
Related
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?
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
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.
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.
I'm new to this site and I hope someone can help me with my problem.
I am using a Delphi language. And I would want to play a memorystream to windowsmediaplayer ActiveX. Is this possible? If it is, can someone give me a hint or something.. sample code maybe. Thanks.
I can't speak for Delphi 2009, but earlier version of Delphi didn't support this with the TMediaPlayer component. What you could do is write the MemoryStream to a temporary file, then have the TMediaPlayer load that file. That's going to be the easiest solution, though admittedly not ideal.
Not a free solution, but there is a commercial SDK, BoxedAppSDK, which allows you to access in-memory files as if they were on disk. One of their samples includes a media player accessing a file from memory.
http://www.boxedapp.com/boxedappsdk/
Years ago Nils Haeck posted an example on how to play an avi from a TMemoryStream on NLDelphi. He couldn't get it to play mp3's though. For that you should be looking at other solutions, like Un4Seen Bass
The code:
playfrommemory.zip