Media Sink components fall into two general categories,renderer and archive sink. for playback, I can use windows default renderer. but now I want to encode some file, and write out to a file. does windows media foundation have some sample code about how to develop media sink(muxer). just like MPEG1SOURCE samplecode and decoder samplecode in the sdk.
thank you very much.
In SDK, there is a sample WAVSINK
Related
I have wrote a program using Media Foundation API that takes an AVI files and decodes it's video samples into uncompressed RGB frames.
Recently, I found an AVI file that contained both audio and video tracks, but the Windows Media Player was not playing the video track (audio was playing).
I tried to open the file with another player (Gom Player) and it suggested me to dowload additional codec pack: LEAD MJPG/MCMP Video Codec . After installing it the WMP started to decode and play video track. But after that I again was not able to decode the file using MF API.
My guess is that Media Foundation is limited to what Windows ships. Is that right?
Also, is a way to tell Media Foundation to decode using externally installed codec?
Media Foundation API offers extensibility however codecs acceptable by Media Foundation need to offer respective format: they should be available and registered as Media Foundation transforms. This is a rare case since Media Foundation is not popular overall and most of the downloadable codecs have DirectShow API interface, or Video For Windows API interface, but not the one for Media Foundation.
If you had a suitable codec, Media Foundation would have picked it up.
Windows Media Player attempts to play via Media Foundation or, in case of failure, falls back to DirectShow. This explains why downloadable codec fixes Windows Media Player but not Media Foundation.
I am developing a non-linear video editor. I need to have the support timeline, mixing of audio streams, the transitions between videos, etc. These all features are in DirectShow Editing Services, but it is no longer supported in the new versions of Windows. Instead, offer to use Microsoft Media Foundation. Is it possible to implement the same functionality in the MF or is using other SDK? For example, gstreamer. Maybe someone will recommend SDK for video editing on the basis of MF?
With Media Foundation you have to implement it all by yourself. For instance: video trimming could be implemented by Source Reader to Sink Writer and you have to manipulate the samples manually to compare their timestamps with the required range etc. Trimming has been implemented in the MFCopy Media Foundation example already. MFCopy uses the Source Reader/Sink Writer approach, because this way the app has more control over the timestamps.
For a Windows 10 UWP App you can use the Windows.Media.Editing.MediaComposition class.
Is there any way to get the live stream from the Epiphan device using Epiphan SDK to play the same in VLC or ffplay?
Using EPIPHAN SDK, I am able to grab the frames and also their SDK provides a way to convert the frames to GUI but i am not able to find a way to get the live stream of video.
Does ffmpeg lib provide a way to do so?
NitinG,
You don't need SDK itself for that. Epiphan driver already exposes the device via DirectShow/V4Lx interfaces (depending on the OS). It basically looks like a camera for VLC or ffmpeg. Start VLC and go to "Media"->"Open Capture Devices".
You need SDK only if you want to have programmatic access to more advanced, low level features that are difficult to expose over DirectShow or V4Lx interfaces.
Cheers.
I came across a H.264 video which i would like to play in my c++ application. Could anyone suggest what could be the easiest way of doing it? Or What library can be used for the purpose.
Thanks in advance..
Windows API are DirectShow and Media Foundation (mind availability across Windows verions). You need a codec installed in Windows to be able to play the file, stock codec is only provided with Windows 7 editions. A choice of third party codecs is available.
Another option is to use a different framework such as ffmpeg which includes support for container formats and decoders.
I have a mp4 file which is to be used in an application. Currently i am in the stage of figuring out the technology to be used for this job. I am familiar with flex and am hoping that i be able to use it for the application. But i can not figure out a way to play the file in flex. I have been able to play the file only in windows media player and that required the installation of three codecs : Mp4Audio.ax, Mp4Video.ax, Mp4Src.ax.
As i see it, it will be very convenient if i could embed a windows media player plugin in flex or i could specify the audio and video codecs in the flash player.
Else i will have to learn .Net, i guess.
Kindly help me out. Thanks in advance.
If you are creating an air app then you are able to start the windows-media-player using the NativeProcess. Anyway if you have a flex web app then you do not have any options on this. :(
My recommendation: Convert the video file to a valid mp4 file that can be played by flex. I suggest you to check ffmpeg library (and you could use it to convert the file to H264 format)