Playing FLV files

Sep 29, 2010 at 1:53 PM

Hi, I tried playing FLV files in your application and got the following error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)at System.Delegate.DynamicInvokeImpl(Object[] args)at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)at System.Windows.Controls.MediaElement.OnMediaFailed(Object sender, ExceptionEventArgs args)at System.Windows.Controls.AVElementHelper.OnMediaFailed(Object sender, ExceptionEventArgs args)at System.Windows.Media.UniqueEventHelper`1.InvokeEvents(Object sender, TEventArgs args)at System.Windows.Media.MediaEventsHelper.OnMediaFailed(Object o)at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)--------------------------------System.Exception: WPF Media Element can't play media stream.
at Media_glass.MediaWindow.mediaElement_MediaFailed(Object sender, ExceptionRoutedEventArgs e)

Coordinator
Oct 24, 2010 at 11:19 AM

Hi, sory I was very busy.

1. Try ro play flv files using Windows Media Player.

2. If it is not played flv files you need to install good codec pack. I wrote about it on the main page. I reccomend CCCP or KLight codec pack. You will install flv codec for flv files.

3. After it my application must play flv.

I think you haven't installed flv codec on your computer.

Jun 12, 2011 at 6:44 PM

Yes, I had the same error. I had a codec installed, but I guess it didn't cut it. I downloaded the K-Lite package and it's working now. The other codec even played the .flv in Windows Media Player, still it wasn't enought for the MediaElement control in WPF.