I'm trying to create my own Media Player application using a WPF MediaElement. I know that the MediaElement actually uses Windows Media Player as its source and that's why it also loads the .srt (subtitle) file and shows subtitles below the video.
My application is actually supposed to override default subtitle rendering and show its own version of subtitles, so I need the MediaElement to ignore loading and displaying the .srt file.
How do I do this through WPF?
Thought I answer it for other people.
Loading subtitles may be related to the CODEC that's being used. Modifying the configuration of the CODEC through the configuration app it was provided with must solve the problem.
Related
I want to stream video in a WPF application. There are two potential ways:
Embed VLC. Problem: I know how to embed VLC in a WinForm application but not in a WPF one.
Use MediaElement. Problem: I know how to play a wmv file, but I don't know how to play a stream.
So what can I do to play video streams in WPF?
It's very easy task. You can find out VlcDotnet. it's open source and using the VLC libraries. This is the Github link. It is fit with WPF.
Source File
Is codenameone support add flash file.
Is codenameone support add Gif Image programmatically.
how to use create Graphics object.
Codename One or any modern mobile doesn't support adding flash files as those aren't designed for the mobile world.
You can add a gif image by using the "Add Animation" option in the designer tool and then using the getImage(String) method of the Resources object. That means you can't download an arbitrary gif off the internet but you can convert it to a res file and download that dynamically.
You can get a graphics object either by overriding paint(Graphics), implementing a painter etc. or by getGraphics on a mutable image see more here.
This should be something that a quick google search should have resolved but thus far has not.
I have an embedded AxShockwaveFlash object that loads a specific swf file. The file responds to commands that are sent it via the CallFunction method on the AxShockwaveObject.
What properties do I need to set in the designer to make the .swf video stretch to fit the AxShockwavePlayer object?
As an example, what I am looking for is behavior similar to this, only in a C# WinForms application and part of the screen will be occupied by controls and components.
You don't set the Flash size via CallFunction, instead define the embed properties width and height.
http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html
How do you embed the flash object in the HTML?
I have some simple WPF with a MediaElement which is, generally, working.
I have some simple AVIs and WMVs which are working.
I have a DivX AVI that works fine in Media Player but doesn't render at all in the WPF MediaElement control. It plays the audio fine, but graphically has zero size and doesn't render any video!
I have tried using the WPF Media Kit at wpfmediakit.codeplex.com and manage to extract an error from that: Could not render any streams from the source Uri.
The RenderCapability.Tier reports 0x00020000 (Tier 2) - the graphics card should be capable!
Are you on an x64 operating system? If so compile your application as x86 instead of any CPU. This will ensure your application will be able to load what are most likely 32bit DirectShow filters.
You need to use a codec that is supported under WPF. DivX isn't.
I am using media element to render video in WPF. All videos are working fine except H.264 videos. They have some stuttering problem while they are rendered on screen. My machine configuration is much more than the recommended requirement to play for this video. Another surprising fact is that the video renders perfectly fine when I play this in Window Media Player or any other player.
Any solution or any alternative to MediaElement?
You can try my MediaUriElement from my open source project here: http://wpfmediakit.codeplex.com
It has better media compatibility than MediaElement, but if it's a decoder filter problem or a performance problem, my project won't be able to help. What h264 codec are you using. You may want to try out ffdshow from http://ffdshow-tryout.sourceforge.net/.
-Jer
WPF does not support H.264 videos