Using MediaElement to play video from Stream
Is it possible to use the WPF MediaElement to play streaming video from a System.IO.Stream object? The Stream object is being retrieved from a WCF service that stores the media files.
c# wpf wcf mediaelement
add a comment |
Is it possible to use the WPF MediaElement to play streaming video from a System.IO.Stream object? The Stream object is being retrieved from a WCF service that stores the media files.
c# wpf wcf mediaelement
add a comment |
Is it possible to use the WPF MediaElement to play streaming video from a System.IO.Stream object? The Stream object is being retrieved from a WCF service that stores the media files.
c# wpf wcf mediaelement
Is it possible to use the WPF MediaElement to play streaming video from a System.IO.Stream object? The Stream object is being retrieved from a WCF service that stores the media files.
c# wpf wcf mediaelement
c# wpf wcf mediaelement
asked Aug 19 '11 at 6:07
rafalerafale
78452241
78452241
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
IF you can make the WCF deliver the Media Object via a http-URL (GET)
then you can just assign that URL to the MediaElement.Source
property - see http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx.
For cases where such URL is not available/possible:
Assigning a Stream is currently not possible - although there are some hacks to make that happen, for a DirectShow-based example see http://social.msdn.microsoft.com/forums/en-US/wpf/thread/6191ef1a-0010-4294-a5b4-451bbadca33a/ and http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/15/WPF-Hackery-Part-I.aspx .
Another option would be to somehow host the Silverlight MediaElement
and use the SetSource
method which can take a stream and play it... see http://silverlightviewport.codeplex.com/SourceControl/list/changesets and http://msdn.microsoft.com/en-us/library/cc190669%28v=vs.95%29.aspx
add a comment |
It might be too late, hopefully this might help if you're still looking for an answer.
Yes you can play video from Memory stream using WPF media element.
I have used a third party component called boxed app, A million thanks to BoxedApp - http://www.boxedapp.com/boxedappsdk/
I have to update the code a tiny bit to make it work for byte. Copy the below constructor to CustomFileStream class from BoxedApp
public CustomFileStream(byte data)
_Stream = new MemoryStream(data);
_Length = _Stream.Length;
_data = data;
_Offset = 0;
Create a wpf application and add a media element and a button and copy the below code
public MainWindow()
BoxedAppSDK.NativeMethods.BoxedAppSDK_Init();
InitializeComponent();
private void button2_Click(object sender, RoutedEventArgs e)
var MyFileStream = new CustomFileStream(File.ReadAllBytes(@"wildlife.wmv"));
IntPtr ptr = BoxedAppSDK.NativeMethods.BoxedAppSDK_CreateVirtualFileBasedOnIStream(
@"1.wmv",
BoxedAppSDK.NativeMethods.EFileAccess.GenericWrite,
BoxedAppSDK.NativeMethods.EFileShare.Read,
IntPtr.Zero,
BoxedAppSDK.NativeMethods.ECreationDisposition.New,
BoxedAppSDK.NativeMethods.EFileAttributes.Normal,
IntPtr.Zero,
MyFileStream);
using (new SafeFileHandle(ptr, true))
mediaElement1.Source = new Uri(Path.GetFullPath("1.wmv"));
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Play();
- for boxed app please follow the samples and that's it.. you're in a happy world...
It's the same thing for QT Player as well.
Based on the response I'll add a complete example if the information provided isn't enough.
Happy coding....
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
add a comment |
Before anyone wastes hours finding this out for themselves: it is impossible to host the Silverlight MediaElement in a WPF application. The reason for this is that it is one of a number of types that appear in PresentationFramework.dll (unavoidable for WPF) and System.Windows.dll (Silverlight versions) that have the same names and the same namespaces, but are different types.
(Someone should explain why we have namespaces to microsoft!)
1
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
4
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
1
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
add a comment |
I know this isn't what you asked for but you can host a VLC ActiveX component inside a window in WPF and then use that VLC control to connect to the stream and display the stream. This is how I got streaming working through WPF.
Edit: this page has an example of how to host an ActiveX control inside WPF
2
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
add a comment |
As WPF mediaelement internally uses windows media player. If you alter the buffer settings of media player from default buffer setting to custom. Open windows media player Tools Options Performance.
When you choose “Buffer” option and set “Seconds of content” to 2. The following registry values will be added under media player.
HKEY_CURRENT_USERSoftwareMicrosoftMediaPlayerPreferences
UseDefaultBufferTime=0
CustomBufferTime=2000
You can use dotnet registry class to make changes.
Refer this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1b4b8fb9-ff8f-4861-8e99-4a7a4fc75596/setting-windows-media-player-properties-in-wpf?forum=wpf#ac879a7f-37bc-4ccc-854d-ab6e047086e5
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f7117589%2fusing-mediaelement-to-play-video-from-stream%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
IF you can make the WCF deliver the Media Object via a http-URL (GET)
then you can just assign that URL to the MediaElement.Source
property - see http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx.
For cases where such URL is not available/possible:
Assigning a Stream is currently not possible - although there are some hacks to make that happen, for a DirectShow-based example see http://social.msdn.microsoft.com/forums/en-US/wpf/thread/6191ef1a-0010-4294-a5b4-451bbadca33a/ and http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/15/WPF-Hackery-Part-I.aspx .
Another option would be to somehow host the Silverlight MediaElement
and use the SetSource
method which can take a stream and play it... see http://silverlightviewport.codeplex.com/SourceControl/list/changesets and http://msdn.microsoft.com/en-us/library/cc190669%28v=vs.95%29.aspx
add a comment |
IF you can make the WCF deliver the Media Object via a http-URL (GET)
then you can just assign that URL to the MediaElement.Source
property - see http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx.
For cases where such URL is not available/possible:
Assigning a Stream is currently not possible - although there are some hacks to make that happen, for a DirectShow-based example see http://social.msdn.microsoft.com/forums/en-US/wpf/thread/6191ef1a-0010-4294-a5b4-451bbadca33a/ and http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/15/WPF-Hackery-Part-I.aspx .
Another option would be to somehow host the Silverlight MediaElement
and use the SetSource
method which can take a stream and play it... see http://silverlightviewport.codeplex.com/SourceControl/list/changesets and http://msdn.microsoft.com/en-us/library/cc190669%28v=vs.95%29.aspx
add a comment |
IF you can make the WCF deliver the Media Object via a http-URL (GET)
then you can just assign that URL to the MediaElement.Source
property - see http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx.
For cases where such URL is not available/possible:
Assigning a Stream is currently not possible - although there are some hacks to make that happen, for a DirectShow-based example see http://social.msdn.microsoft.com/forums/en-US/wpf/thread/6191ef1a-0010-4294-a5b4-451bbadca33a/ and http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/15/WPF-Hackery-Part-I.aspx .
Another option would be to somehow host the Silverlight MediaElement
and use the SetSource
method which can take a stream and play it... see http://silverlightviewport.codeplex.com/SourceControl/list/changesets and http://msdn.microsoft.com/en-us/library/cc190669%28v=vs.95%29.aspx
IF you can make the WCF deliver the Media Object via a http-URL (GET)
then you can just assign that URL to the MediaElement.Source
property - see http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx.
For cases where such URL is not available/possible:
Assigning a Stream is currently not possible - although there are some hacks to make that happen, for a DirectShow-based example see http://social.msdn.microsoft.com/forums/en-US/wpf/thread/6191ef1a-0010-4294-a5b4-451bbadca33a/ and http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/15/WPF-Hackery-Part-I.aspx .
Another option would be to somehow host the Silverlight MediaElement
and use the SetSource
method which can take a stream and play it... see http://silverlightviewport.codeplex.com/SourceControl/list/changesets and http://msdn.microsoft.com/en-us/library/cc190669%28v=vs.95%29.aspx
answered Aug 19 '11 at 6:22
YahiaYahia
62.9k790121
62.9k790121
add a comment |
add a comment |
It might be too late, hopefully this might help if you're still looking for an answer.
Yes you can play video from Memory stream using WPF media element.
I have used a third party component called boxed app, A million thanks to BoxedApp - http://www.boxedapp.com/boxedappsdk/
I have to update the code a tiny bit to make it work for byte. Copy the below constructor to CustomFileStream class from BoxedApp
public CustomFileStream(byte data)
_Stream = new MemoryStream(data);
_Length = _Stream.Length;
_data = data;
_Offset = 0;
Create a wpf application and add a media element and a button and copy the below code
public MainWindow()
BoxedAppSDK.NativeMethods.BoxedAppSDK_Init();
InitializeComponent();
private void button2_Click(object sender, RoutedEventArgs e)
var MyFileStream = new CustomFileStream(File.ReadAllBytes(@"wildlife.wmv"));
IntPtr ptr = BoxedAppSDK.NativeMethods.BoxedAppSDK_CreateVirtualFileBasedOnIStream(
@"1.wmv",
BoxedAppSDK.NativeMethods.EFileAccess.GenericWrite,
BoxedAppSDK.NativeMethods.EFileShare.Read,
IntPtr.Zero,
BoxedAppSDK.NativeMethods.ECreationDisposition.New,
BoxedAppSDK.NativeMethods.EFileAttributes.Normal,
IntPtr.Zero,
MyFileStream);
using (new SafeFileHandle(ptr, true))
mediaElement1.Source = new Uri(Path.GetFullPath("1.wmv"));
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Play();
- for boxed app please follow the samples and that's it.. you're in a happy world...
It's the same thing for QT Player as well.
Based on the response I'll add a complete example if the information provided isn't enough.
Happy coding....
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
add a comment |
It might be too late, hopefully this might help if you're still looking for an answer.
Yes you can play video from Memory stream using WPF media element.
I have used a third party component called boxed app, A million thanks to BoxedApp - http://www.boxedapp.com/boxedappsdk/
I have to update the code a tiny bit to make it work for byte. Copy the below constructor to CustomFileStream class from BoxedApp
public CustomFileStream(byte data)
_Stream = new MemoryStream(data);
_Length = _Stream.Length;
_data = data;
_Offset = 0;
Create a wpf application and add a media element and a button and copy the below code
public MainWindow()
BoxedAppSDK.NativeMethods.BoxedAppSDK_Init();
InitializeComponent();
private void button2_Click(object sender, RoutedEventArgs e)
var MyFileStream = new CustomFileStream(File.ReadAllBytes(@"wildlife.wmv"));
IntPtr ptr = BoxedAppSDK.NativeMethods.BoxedAppSDK_CreateVirtualFileBasedOnIStream(
@"1.wmv",
BoxedAppSDK.NativeMethods.EFileAccess.GenericWrite,
BoxedAppSDK.NativeMethods.EFileShare.Read,
IntPtr.Zero,
BoxedAppSDK.NativeMethods.ECreationDisposition.New,
BoxedAppSDK.NativeMethods.EFileAttributes.Normal,
IntPtr.Zero,
MyFileStream);
using (new SafeFileHandle(ptr, true))
mediaElement1.Source = new Uri(Path.GetFullPath("1.wmv"));
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Play();
- for boxed app please follow the samples and that's it.. you're in a happy world...
It's the same thing for QT Player as well.
Based on the response I'll add a complete example if the information provided isn't enough.
Happy coding....
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
add a comment |
It might be too late, hopefully this might help if you're still looking for an answer.
Yes you can play video from Memory stream using WPF media element.
I have used a third party component called boxed app, A million thanks to BoxedApp - http://www.boxedapp.com/boxedappsdk/
I have to update the code a tiny bit to make it work for byte. Copy the below constructor to CustomFileStream class from BoxedApp
public CustomFileStream(byte data)
_Stream = new MemoryStream(data);
_Length = _Stream.Length;
_data = data;
_Offset = 0;
Create a wpf application and add a media element and a button and copy the below code
public MainWindow()
BoxedAppSDK.NativeMethods.BoxedAppSDK_Init();
InitializeComponent();
private void button2_Click(object sender, RoutedEventArgs e)
var MyFileStream = new CustomFileStream(File.ReadAllBytes(@"wildlife.wmv"));
IntPtr ptr = BoxedAppSDK.NativeMethods.BoxedAppSDK_CreateVirtualFileBasedOnIStream(
@"1.wmv",
BoxedAppSDK.NativeMethods.EFileAccess.GenericWrite,
BoxedAppSDK.NativeMethods.EFileShare.Read,
IntPtr.Zero,
BoxedAppSDK.NativeMethods.ECreationDisposition.New,
BoxedAppSDK.NativeMethods.EFileAttributes.Normal,
IntPtr.Zero,
MyFileStream);
using (new SafeFileHandle(ptr, true))
mediaElement1.Source = new Uri(Path.GetFullPath("1.wmv"));
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Play();
- for boxed app please follow the samples and that's it.. you're in a happy world...
It's the same thing for QT Player as well.
Based on the response I'll add a complete example if the information provided isn't enough.
Happy coding....
It might be too late, hopefully this might help if you're still looking for an answer.
Yes you can play video from Memory stream using WPF media element.
I have used a third party component called boxed app, A million thanks to BoxedApp - http://www.boxedapp.com/boxedappsdk/
I have to update the code a tiny bit to make it work for byte. Copy the below constructor to CustomFileStream class from BoxedApp
public CustomFileStream(byte data)
_Stream = new MemoryStream(data);
_Length = _Stream.Length;
_data = data;
_Offset = 0;
Create a wpf application and add a media element and a button and copy the below code
public MainWindow()
BoxedAppSDK.NativeMethods.BoxedAppSDK_Init();
InitializeComponent();
private void button2_Click(object sender, RoutedEventArgs e)
var MyFileStream = new CustomFileStream(File.ReadAllBytes(@"wildlife.wmv"));
IntPtr ptr = BoxedAppSDK.NativeMethods.BoxedAppSDK_CreateVirtualFileBasedOnIStream(
@"1.wmv",
BoxedAppSDK.NativeMethods.EFileAccess.GenericWrite,
BoxedAppSDK.NativeMethods.EFileShare.Read,
IntPtr.Zero,
BoxedAppSDK.NativeMethods.ECreationDisposition.New,
BoxedAppSDK.NativeMethods.EFileAttributes.Normal,
IntPtr.Zero,
MyFileStream);
using (new SafeFileHandle(ptr, true))
mediaElement1.Source = new Uri(Path.GetFullPath("1.wmv"));
mediaElement1.LoadedBehavior = MediaState.Manual;
mediaElement1.Play();
- for boxed app please follow the samples and that's it.. you're in a happy world...
It's the same thing for QT Player as well.
Based on the response I'll add a complete example if the information provided isn't enough.
Happy coding....
answered Dec 21 '11 at 8:53
user1108125user1108125
13114
13114
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
add a comment |
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
Great answer, thanks a lot!
– Mafii
Jan 23 '18 at 8:27
add a comment |
Before anyone wastes hours finding this out for themselves: it is impossible to host the Silverlight MediaElement in a WPF application. The reason for this is that it is one of a number of types that appear in PresentationFramework.dll (unavoidable for WPF) and System.Windows.dll (Silverlight versions) that have the same names and the same namespaces, but are different types.
(Someone should explain why we have namespaces to microsoft!)
1
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
4
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
1
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
add a comment |
Before anyone wastes hours finding this out for themselves: it is impossible to host the Silverlight MediaElement in a WPF application. The reason for this is that it is one of a number of types that appear in PresentationFramework.dll (unavoidable for WPF) and System.Windows.dll (Silverlight versions) that have the same names and the same namespaces, but are different types.
(Someone should explain why we have namespaces to microsoft!)
1
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
4
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
1
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
add a comment |
Before anyone wastes hours finding this out for themselves: it is impossible to host the Silverlight MediaElement in a WPF application. The reason for this is that it is one of a number of types that appear in PresentationFramework.dll (unavoidable for WPF) and System.Windows.dll (Silverlight versions) that have the same names and the same namespaces, but are different types.
(Someone should explain why we have namespaces to microsoft!)
Before anyone wastes hours finding this out for themselves: it is impossible to host the Silverlight MediaElement in a WPF application. The reason for this is that it is one of a number of types that appear in PresentationFramework.dll (unavoidable for WPF) and System.Windows.dll (Silverlight versions) that have the same names and the same namespaces, but are different types.
(Someone should explain why we have namespaces to microsoft!)
answered Nov 8 '11 at 10:37
RobertRobert
12113
12113
1
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
4
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
1
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
add a comment |
1
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
4
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
1
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
1
1
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
This is true. Unfortunately I had to find this out the hard way. :(
– rafale
Nov 11 '11 at 3:42
4
4
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
I know this is a year-old answer, but aren't "multiple distinct types with the same name in the same namespace" the reason that reference aliases exist?
– Damien_The_Unbeliever
Nov 5 '12 at 9:19
1
1
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
It is always possible to make Silverlight Website and use MediaElement there and in WPF applicatione add WebBrowser control with source to that Silverlight website and it is done.
– Academy of Programmer
Feb 6 '13 at 11:50
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
yes @Damien_The_Unbeliever my thought at first - but it depends on how it plays out and I've seen situations where similar tricks aren't possible. Though I'd say this still 'might' be possible, with some hacking. Haven't tried though, looks like trouble
– NSGaga
Apr 12 '14 at 19:54
add a comment |
I know this isn't what you asked for but you can host a VLC ActiveX component inside a window in WPF and then use that VLC control to connect to the stream and display the stream. This is how I got streaming working through WPF.
Edit: this page has an example of how to host an ActiveX control inside WPF
2
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
add a comment |
I know this isn't what you asked for but you can host a VLC ActiveX component inside a window in WPF and then use that VLC control to connect to the stream and display the stream. This is how I got streaming working through WPF.
Edit: this page has an example of how to host an ActiveX control inside WPF
2
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
add a comment |
I know this isn't what you asked for but you can host a VLC ActiveX component inside a window in WPF and then use that VLC control to connect to the stream and display the stream. This is how I got streaming working through WPF.
Edit: this page has an example of how to host an ActiveX control inside WPF
I know this isn't what you asked for but you can host a VLC ActiveX component inside a window in WPF and then use that VLC control to connect to the stream and display the stream. This is how I got streaming working through WPF.
Edit: this page has an example of how to host an ActiveX control inside WPF
edited Jun 24 '16 at 22:34
Travis
69111235
69111235
answered Aug 19 '11 at 6:32
stuartmclarkstuartmclark
9131119
9131119
2
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
add a comment |
2
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
2
2
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Can I see an example of a WPF application running VLC as an ActiveX component? I'd like to see what it looks like and what's involved in getting it running before I actually go for it.
– rafale
Aug 20 '11 at 6:02
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
Hi Stuart, could you post your example using VLC somewhere so that I can have a look. Thanks.
– Toan Nguyen
Jan 29 '15 at 6:06
add a comment |
As WPF mediaelement internally uses windows media player. If you alter the buffer settings of media player from default buffer setting to custom. Open windows media player Tools Options Performance.
When you choose “Buffer” option and set “Seconds of content” to 2. The following registry values will be added under media player.
HKEY_CURRENT_USERSoftwareMicrosoftMediaPlayerPreferences
UseDefaultBufferTime=0
CustomBufferTime=2000
You can use dotnet registry class to make changes.
Refer this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1b4b8fb9-ff8f-4861-8e99-4a7a4fc75596/setting-windows-media-player-properties-in-wpf?forum=wpf#ac879a7f-37bc-4ccc-854d-ab6e047086e5
add a comment |
As WPF mediaelement internally uses windows media player. If you alter the buffer settings of media player from default buffer setting to custom. Open windows media player Tools Options Performance.
When you choose “Buffer” option and set “Seconds of content” to 2. The following registry values will be added under media player.
HKEY_CURRENT_USERSoftwareMicrosoftMediaPlayerPreferences
UseDefaultBufferTime=0
CustomBufferTime=2000
You can use dotnet registry class to make changes.
Refer this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1b4b8fb9-ff8f-4861-8e99-4a7a4fc75596/setting-windows-media-player-properties-in-wpf?forum=wpf#ac879a7f-37bc-4ccc-854d-ab6e047086e5
add a comment |
As WPF mediaelement internally uses windows media player. If you alter the buffer settings of media player from default buffer setting to custom. Open windows media player Tools Options Performance.
When you choose “Buffer” option and set “Seconds of content” to 2. The following registry values will be added under media player.
HKEY_CURRENT_USERSoftwareMicrosoftMediaPlayerPreferences
UseDefaultBufferTime=0
CustomBufferTime=2000
You can use dotnet registry class to make changes.
Refer this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1b4b8fb9-ff8f-4861-8e99-4a7a4fc75596/setting-windows-media-player-properties-in-wpf?forum=wpf#ac879a7f-37bc-4ccc-854d-ab6e047086e5
As WPF mediaelement internally uses windows media player. If you alter the buffer settings of media player from default buffer setting to custom. Open windows media player Tools Options Performance.
When you choose “Buffer” option and set “Seconds of content” to 2. The following registry values will be added under media player.
HKEY_CURRENT_USERSoftwareMicrosoftMediaPlayerPreferences
UseDefaultBufferTime=0
CustomBufferTime=2000
You can use dotnet registry class to make changes.
Refer this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/1b4b8fb9-ff8f-4861-8e99-4a7a4fc75596/setting-windows-media-player-properties-in-wpf?forum=wpf#ac879a7f-37bc-4ccc-854d-ab6e047086e5
answered Jul 10 '15 at 4:11
somusomu
62
62
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f7117589%2fusing-mediaelement-to-play-video-from-stream%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown