Log in

View Full Version : Why won't WMP play my MPEG2s?


Pages : 1 [2]

zambelli
9th November 2007, 10:29
Exceptions proof the rule :)

And of course proprietary interfaces, such as DXVA, are a big problem for every OpenSource project ...
Umm, why? It's a Windows API, just like CreateProcess() or CreateFile(). Why couldn't an open source codec implement DXVA decoding?

LoRd_MuldeR
9th November 2007, 19:51
Umm, why? It's a Windows API, just like CreateProcess() or CreateFile(). Why couldn't an open source codec implement DXVA decoding?
Those functions you mention are very basic functions of the Windows API. They are pretty simply to use, don't need very much documentation to understand and they have a lot of sample codes available on the net. And most important: Most programing languages have easy-to-use wrappers for such basic functions in their standard-library. So most of the time you won't call those functions directly anyway...

If you follow the thread, which DigitalDeviant referred to, you will see that the API documentation for DXVA seems to be insufficient. Since it's ClosedSource, you can't look "inside" DXVA to get more information: It's impossible to examine the code behind the API, because you simply don't have that code! Hence you can't analyze any implementation details. Well, except reverse engineering, of course. So when the API documentation for a certain feature is missing, incomplete, unclear or even wrong - and we all know the problems with interface specs - then all you can do is getting support directly from M$. That's what companies, such as Cyberlink, obviously do. OpenSource developers can't effort that service and are pretty much lost with themselves! Furthermore if there was an OpenSource implementation of a working product based on that API available, then everybody could grab those codes and use them as a starting point for his own implementation. As long as we only have commercial products available, this isn't possible either...

zambelli
11th November 2007, 02:24
to, you will see that the API documentation for DXVA seems to be insufficient. Since it's ClosedSource, you can't look "inside" DXVA to get more information: It's impossible to examine the code behind the API, because you simply don't have that code! Hence you can't analyze any implementation details. Well, except reverse engineering, of course. So when the API documentation for a certain feature is missing, incomplete, unclear or even wrong - and we all know the problems with interface specs - then all you can do is getting support directly from M$. That's what companies, such as Cyberlink, obviously do. OpenSource developers can't effort that service and are pretty much lost with themselves! Furthermore if there was an OpenSource implementation of a working product based on that API available, then everybody could grab those codes and use them as a starting point for his own implementation. As long as we only have commercial products available, this isn't possible either...
Well, the idea behind any public API is to make it accessible to anybody. If anybody finds that the MSDN documentation for DXVA is insufficient - they should definitely let Microsoft know. The docs would need to be corrected. askdxva@microsoft.com is the DXVA support e-mail address.

Shakey_Jake33
5th December 2007, 22:44
Is there an actual reason why libmpeg2 is the default mpeg2 decoder in ffdshow, as opposed to libavcodec?

foxyshadis
6th December 2007, 18:02
It handles weird/broken streams much better, it's a tiny bit faster, and it used to handle aspect ratio better (but both work fine for that now).

Leak
6th December 2007, 19:07
It handles weird/broken streams much better, it's a tiny bit faster, and it used to handle aspect ratio better (but both work fine for that now).
Plus it actually works with DVDs in MPC - last time I tried libavcodec DVD video was playing at double speed for a second, then pausing for a second to let the sound catch up, then playing at double speed again etc. ad infinitum...

np: Boxcutter - Skuff'd (Oneiric)

blizard
6th December 2007, 21:29
Note that ffdshow has various Deinterlacing filters to choose:

http://img61.imageshack.us/img61/53/fileffdshowdeintjq3.png

Those work with all video formats, no matter which decoder library is involved for the individual format...

Sorry for this extreme long post!! Hope it can be of some use.

This is directed to Phædrus

Lord_Mulder have not said anything about how this filer chain is read by FFDSHOW. From the first line above where you codec to the last line where have different option how to output stream to be rendered (aka taken care by hardware and those driver that hardware have to support).

In the question about deinterlacing there is also the option that you don't use FFDSHOW deinterlacer as post processer, but let the FFDSHOW [output] use "bob" or "Wave" to tell renderer that it should deinterlace with hardware driver from video card, if they do support this feature.

What people here seem to forget are that FFDSHOW can scale very good after which type of hardware you have on your computer.

It can detect what kind of instruction that your CPU do support (SSE, MMX etc) to let decoder know and use those in the decoding process if there is, and then there is option to tweak with different post processing where you can also create different profiles to keep a setting for DivX that work some setting and fast switch to MPEG2 setting with Resize % Aspect to process video to fit your screen resolution as a mean to improve visual quality.

You can also use a white/black list to prevent some application like WMP, but allow other like MPC to use FFDSHOW to process either sound or video or both.

In short FFDSHOW is a very powerful tool and it will work with everything as you can change how FFDSHOW will output video or audio to renderer. I my use I would recommend to look at Haali splitter and Haali renderer as the first is very good at splitting containers information in video, audio and sub tittle among other streams to each filter chain, process it by different decoders like FFDSHOW and then let Haali renderer make the last processing to video card driver. Haali is the same person who is behind WMR9 which is used almost in other player (ex. MPC) to render video with, the difference is that you must have a shader modell 2.0 capable video processing unit (VPU) . The point with this is to show that you don't have to use Cyberlink decoder to get hardware support from your video card (DXVA) as FFDSHOW can also make use of it if you use the correct setting and renderer.

With FFDSHOW you can also decode or use pass-through to S/PDIF for AC3 and DTS encoded files. You can even decode AC3 or MP3/AAC, post process sound to create a surround sound from stereo in mixer and then encode that to AC3 (Here: you need to set resample to 48000 Hz and output six channel via mixer to get Dolby digital surround). S/PDIF make use of PCM (two channel) or compressed AC3 to send more then two channel sound to an external decoder. Use [I]Volume in post processing chain to reduce sound level as what is ok for analogue sound level could be to high when output as AC3/PCM.

When you use FFDSHOW to decode AC3 to an analogue signal it is then passed on to windows XPs K-mixer. On your system you should check the level for Wave as that is the master control for sound on Windows and can sometimes be set to low by other application. When you use FFDSHOW to process and encode an AC3 stream you by pass k-mixer on windows XP and might be to high/strong for your speaker or too low. In FFDSHOWs Volume you can set how strong sound should be before it is encoded to an AC3 stream - look above those visual graph for master sound level.

MPlayer or SMPlayer which is only a front end (GUI) that feeds command to MPlayer as MPlayer is a command line based player, offer a good way to control your recorded MPEG2 as it let you acess MPEG2 even during recording. That is something directshow will not let you do as it will need to have finished file, before it can process it. With MPlayer (or SMPlayer) you can with your keyboard control brightness, saturation and other setting on-the-fly, so I would recommend to use MPlayer.

MPlayer is (almost) always delivered with MEncoder which is the encoder that can create Xvid (all MPEG-4 ASP incl Divx), H.264/AVC (MPEG-4 AVC) and a lot of other codecs, but MEncoder is mainly designed to make use AVI which is not the best container to handle today codec, so you could make use of Automen (a simple GUI which let you create a bat fle, a file which can open with notapad (left click and there should be an EDIT option for those file with bat extension)). Use search on this forum and you will find more info about AutoMen for Buzz.

The point here is that MPlayer is not only a "player", but also a "reader", so in that combination you will see a window behind video window which will let you see libmpeg2 as video decoder for MPEG2 video and libmp3 for decoding sound (MP2) as default decoder. AC3 should be lib52 as far as I recall it.

All this (MPlayer/Mencoder) can be downloaded as one small ZIP file (or 7-ZIP) and un-zipped to one folder where you can drag and drop your video onto mplayer.exe to start playing it. I used MPlayer on a system with only 128 MB RAMBUS memory and a weak CPU, video processor unit was not the latest and greatest either, but it did well in processing video with an old Creative sound card. In short both FFDSHOW, MPlayer and VLC (best on streaming video or audio; have also capabilities to encode or capture streams) can be very useful tools.

_____
Personally I would un-install PowerDVD/Cyberlink and all related codecs as you have no use for those and avoid leftover in the future which might change their merit (see LM explanation for merit in Directshow) all of sudden. Also un-install DivX as that is not needed and you will have the same support from FFDSHOW or MPlayer to play those files.

phædrus
18th December 2007, 19:03
I hadn't looked at this thread in a while, so only today did I notice your long post, blizard. I appreciate that FFDSHOW can offer lots of options. Perhaps I will test it out, but with all the options, it would be for most people unnecessarily complicated to get the best performance from it. I'm thinking mainly about deinterlacing, which is my biggest complaint. Looking at the output from my MyHD video card, the deinterlacing is always perfect on any material, any output resolution (I am not using their DVI output card, just going directly from MyHD card to the monitor -- analog, IOW). On the other hand, with the VLC player, I found that deinterlacing of DVDs is often problematic, resulting in jerky playback and other little quirks. It probably works OK on mpeg files played from the hard disc or optical drive. There is no explanation in the documentation of the many deinterlacing options. I know what bob is, but X and Linear and Mean are not obviously clear to me as to what they exactly do. Sometimes one of the options seems to work well, and sometimes none of them seem to work very well.

So I understand the desire to use free open source software, but from my standpoint, some of this stuff just isn't ready for prime time. Sorry.

Right now I am using a very old InterVideo WinDVD2000 software, which was released in 1999, I think. It came free with my first DVD-ROM drive. It has its quirks, too -- watching old X-files DVDs when a scene changes you will sometimes see a very brief combing as apparently the field order is momentarily confused -- but overall renders a better looking output to my eye than VLC, or even the newer WinDVD I had used previously. Better yet, the motion seems smoother, with fewer little jumps and jerks, on almost all material. It seems to err always on the side of motion smoothness. And for film based, progressive encoded stuff, I simply like the way the image looks -- more filmlike somehow. Hard to put into words.

Still, I'm glad I have VLC for all the odd formats it will play. For my main player, though, I'd have to say no.

nesNYC
26th December 2007, 10:21
trouble playing perfectly good MPEG2 files.

They maybe perfectly good on the source computer but no where else, correct?

WOW! I just read through almost all these replies but not one actually touched on the problem (I think :confused: )

I think was is happening is that your source computer has a capture board and or a dedicated mpeg2 board and that comes with software to play those files back. Also, the application you're using to encode the files might also enable WMP to play back these files on the source computer.

So when you go outside of that envirnonment, these "codecs" are missing and therefore these files don't play back.

What you have to do is make sure the encoding app you're using isn't using some proprietary codec and just putting the output in a ".mpeg" file. You should read that documentation first.

Second, if the files you're making are truely mpeg2 files than any DVD playing codec pack should enable your WMP to play them back. You can go the open source route like the above posters point out but I'd stick to to comercial packs that work best on windows:

1. WinDVD Pack (http://www.corel.com/servlet/Satellite/us/en/Product/1177441133801)
2. nVidia Pure Video (http://store.nvidia.com/servlet/ControllerServlet?Action=DisplayPage&Env=BASE&Locale=en_US&SiteID=nvidia&id=ProductDetailsPage&productID=49548000)
3. Roxio DVD Decoder (http://www.roxio.com/enu/products/cineplayer/vista/requirements.html)

Now if there's some fancy code in that mpeg container, then the open source stuff might help you out but you may also try installing the encoding app in the target computer and see if that works first.

If you really want to get standardized, make sure you create real mpeg2 files by using a more modern encoder app or see if there's a setting in your encoder to accomplish this already (might have to turn compression to a standard level).

Cheers!