I am working on one of the media project (windows application). In this the flv, avi and mpeg are the main file types which i have to play in application. I can use wmpLib, but it will not play flv files. So what procedure should i follow and what tools or libraries should i use.Is there any free opensource libraries to do media work. Thanks in advance
Also you can use ffmpeg lib see here, I think it would be easy to convert to another format using that for playback I don't really know, maybe you can take a look at the source of vlc or take a look at some flv opensourced player around.
If you have the right direct show filters installed media player will play flv files.
Related
I'm looking for a way to stream video from an AXIS M10 IP camera, and display the feed using windows forms (or better, wpf). However, it need to be running on 64-bit platform.
This means that I can't use the AXIS Media Control ActiveX component.
Also, I found that these methods work but only in 32bit environment:
1.Using MediaElement Class for WPF
2.Using embedded media player
3.VlcLib (for dotnet)
So far it looks like my only option is to directly implement RTSP protocol and decode the given RTP/AVP stream using Media Foundation (for .net) and display it somehow. (I was able to get the camera to stream to a UDP port using RTSP calls).
I'm fairly new to RTSP/streaming, so I'm concerned that I might be missing the big picture - Will I be able to use media foundation to render/display videos on winform/wpf, or do I have to look at that functionality elsewhere?(from my research it looked like it could decode H.264 streams, but I did not see any video-playing capabilities). I also came across DirectShow - should I use DirectShow over Media Foundation?
Or better yet, is there a library that is able to handle RTSP streaming that runs in 64bit?
VisioForge Video Capture SDK .Net for example (but commercial), WPF controls included.
Decoding using FFMPEG, with DirectShow engine. Really, I don't see any Media Foundation advantages here.
Also any other way using FFMPEG.
Or, you can write RTSP source filter (based on DirectShow Push Source sample) with H264 output pin for video and G726/G711/AAC for audio. Also you can made virtual video capture source filter and use it in MF or DirectShow. You can use live555 library for RTSP implementation.
So, no simple ways here, if you are starting from zero.
If you just need the Video, I would prefer to just display the MJPEG stream of the camera. This is really easy done without the complexity of DirectShow or MediaFoundation. I display 12 cameras at the same time in my application with this little library in WPF: MJPEG Decoder. You can also use it in WinForms. It decodes the MJPEG Stream and gives you the images to display.
The 64 bits Axis Media Control SDK is available now, but requires an account on Axis web site to be downloaded.
After Sign in, you need to join Axis Developper program (free) and download the AMC SDK.
You will install a executable file (.exe), this install all the libs and samples in your Drive
C:\Program Files\Axis Communication\SDK
I found a way to use VLC in 64bits without ActiveX DLL :
The VLCSharp Library is composed of multiple NuGets to use VLC Player on severals platforms (WPF, Winforms, Xamarion, TvOS).
It is working fine on Onvif Cameras
I want to use a media player in C# that reads these extensions : wmv,api,flv,mp3,mp4 and swf..
I tried Silverlight media player but its working with wmv and mp3 only.. and the same with the mediaElement in silverlight.. And FlowPLayer will only play flv, mp4 and mp3.
Has anyone any suggestion ?
Thanks alot !!
Why don't you use VLC media Player ActiveX ,here is a Project that helps you to integrate http://vlcdotnet.codeplex.com/
since LongTail (aka JWplayer) can play flv files i converted all my files to flv and played them with LongTail
I have raw H264 video data that I want to wrap into some kind of container format so that I can play it in a video player like WMP or VLC, and I want to do this in .NET (C#), or C++. What is the easiest approach? Does anyone know of a free/open source SDK that would make this easy?
You can simply play it through a WPF media element if the computer has the appropriate Codec's installed.
i am using Windows Multimedia API winmm.dll library to play MP3 files and when i load a song it takes kins of 3-5 seconds to open and start the song . I wish to make a music app and that requires fast loading. Any ideas how i can improve the code ?
Here is the code i've used : http://www.geekpedia.com/code111_Play-MP3-Files-Using-Csharp.html
Regards,
Alexandru Badescu
I am not an audio/video expert but from my experience it's very limited in managed code. You either have to get into the win32 API or go the DirectX route. DirectSound cannot play mp3 files natively. You will need to use DirectX if you don't like the win32 PInvokes response times.
You will need the DirectX SDK and then import the audio video playback namespace.
Imports Microsoft.DirectX.AudioVideoPlayback
You can then use the directx objects to play an mp3 file.
Have you looked at this?
http://www.robburke.net/mle/mp3sharp/
He claims to have a sample, using DirectSound where he plays the MP3.
I'm wondering what the best way is to play back an MP4 video in a Windows Forms application (.NET 2.0) on Vista and XP.
You could Embed Windows Media Player on a Form.
UPDATE: WMP doesn't support MP4 out-of-the-box, but there are codecs packs that add such support. It's possible to bundle a codec installation with your setup, but I think WMP is able to fetch and install MP4 codec on its own.
Either embedding media player or look at managed DirectX (although MDX is a bit old now)
take a look at iSpy - it's open source and wraps VLC player for mp4 playback.
http://www.ispyconnect.com