windows-media-player

decode MPEG1/2 video with Media Foundation

℡╲_俬逩灬. 提交于 2019-12-04 16:45:41
I am using Media Foundation to play videos. On windows 7 some videos encoded with Mpeg1/Mpeg2 PS and Windows Media Player can play them, but Media Foundation does not(I tried to register a stub MPEG1Source but it still does not work). I noticed some of these files could be played with directshow but not Media foundation(can not be open at all). I guess "media player" does not use Media Foundation only? Is it possible to use Media Foundation to play these file? If it is not, how does Media player work? Thanks a lot. P.S. I have read the windows SDK and I registered a "fake" mpeg1 decode and it

Custom File Format And Codec?

走远了吗. 提交于 2019-12-04 14:08:42
I'm messed up with codec issue for days, and still couldn't see the big picture yet. It is my first time to deal with audio/video formats and codecs. So I really need some help about that. Here is the work. I'm writing several components that is responsible for encoding and decoding customized mpeg files. On top of standart de/compression process (for both audio and video) i will implement some custom de/encryption. Writing both codec and software libraries for this. Things i can't figure out are listed. For WMP, what is the codec locating policy. How do I differantiate my custom file format

How to use WebResponse to Download .wmv file

拜拜、爱过 提交于 2019-12-04 07:28:51
I'm using the following code to grab a wmv file through a WebResponse. I'm using a thread to call this function: static void GetPage(object data) { // Cast the object to a ThreadInfo ThreadInfo ti = (ThreadInfo)data; // Request the URL WebResponse wr = WebRequest.Create(ti.url).GetResponse(); // Display the value for the Content-Length header Console.WriteLine(ti.url + ": " + wr.Headers["Content-Length"]); string toBeSaved = @"C:\Users\Kevin\Downloads\TempFiles" + wr.ResponseUri.PathAndQuery; StreamWriter streamWriter = new StreamWriter(toBeSaved); MemoryStream m = new MemoryStream(); Stream

Access the Windows Media Player library C#

邮差的信 提交于 2019-12-02 08:09:07
问题 I am trying to find out how to access the Windows Media Player library in c#. I have had a look around the web and SO and have found many articles on controlling WMP. I am trying to access its library information however. I.e. its track names, file path and metadata. Is there a library for this or at least does it store it in some form of database somewhere? Thanks, Ben 回答1: Create a windows form and place a WMP component on it, named WMPLayer : AxWMPLib.AxWindowsMediaPlayer Player = form

Window Media Player issues two requests for the audio on web page

拥有回忆 提交于 2019-12-02 01:31:15
I'm using Windows Media Player in a web page. I have version 11 installed so that is the version I'm testing with right now. The player is embedded on the page with this HTML: <OBJECT id='MS_mediaPlayer' width="400" height="45" classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'> <param name='autoStart' value="false"> <param name='uiMode' value="invisible"> <param name='loop' value="false"> </OBJECT> I

How to remove the file which has opened handles?

[亡魂溺海] 提交于 2019-12-01 21:49:40
问题 PROBLEM HISTORY: Now I use Windows Media Player SDK 9 to play AVI files in my desktop application. It works well on Windows XP but when I try to run it on Windows 7 I caught an error - I can not remove AVI file immediately after playback . The problem is that there are opened file handles exist. On Windows XP I have 2 opened file handles during the playing file and they are closed after closing of playback window but on Windows 7 I have already 4 opened handles during the playing file and 2

How to remove the file which has opened handles?

余生颓废 提交于 2019-12-01 19:47:51
PROBLEM HISTORY: Now I use Windows Media Player SDK 9 to play AVI files in my desktop application. It works well on Windows XP but when I try to run it on Windows 7 I caught an error - I can not remove AVI file immediately after playback . The problem is that there are opened file handles exist. On Windows XP I have 2 opened file handles during the playing file and they are closed after closing of playback window but on Windows 7 I have already 4 opened handles during the playing file and 2 of them remain after the closing of playback window. They are become free only after closing the

How to jump X second with axWindowsMediaPlayer in C#

那年仲夏 提交于 2019-12-01 01:02:35
I am using axWindowsMediaPlayer, and I have a video loaded, but I want to jump X seconds. So, for example, if the current time is 1 minute into the video, I want to jump to 1 minute 10 seconds. Okay, I found my solution. I was actually running it correctly, but I was not accounting for the time it takes to load the video. Specifically, the needed code is like axWindowsMediaPlayer1.Ctlcontrols.currentPosition += 10; However I wrote a function to check to see if the video had finished loading and attached a timer to it private bool isPlaying() { return axWindowsMediaPlayer1.playState ==

best way to build graph for MPEG2 transport stream

怎甘沉沦 提交于 2019-11-30 23:33:57
on windows 7 the windows media player supports .ts files very well, in the sense that windows media player knows how to handle such files without any additional codec packs. however if I try to use graphedit to "render" a .ts file, it complains it doesnt know how to build a graph for it. what method does windows media player use to demux/decode these files? is it directshow? windows media foundation? BDA? Microsoft TV Technologies? unified tuning model? whatever the method they use, is available as an API to be used in my custom application? In DirectShow using only Microsoft filters it can be

Windows Media Player on top other DIV

回眸只為那壹抹淺笑 提交于 2019-11-29 12:03:40
I have an embed window media player which is always on top of other DIV tags. I used wmode = opaque; WindowlessVideo = -1 but it does not help. Does anyone know how to make it appear below a certain element of the page. <object type="application/x-oleobject" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" codebase= "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" width="345" height="45"><param name="URL" value= "http://nhacso.net/Music/nghe_song.aspx?id=100004995" /> <param name="EnableContextMenu" value="0" /> <param name="uiMode" value="full" />