Log in

View Full Version : mplayer not playing XviD properly.


Razorholt
10th January 2007, 08:03
Hello people of Doom9,

I'm having a very anoying problem. I recently setup a new winXP machine and loaded mplayer/MPUI, ffdshow, quicktime, Haali splitter and VirtualDubMOD.

I encoded some new files with XviD and used the MKV format. So far, no issue. It becomes weird when I try and play the freshly encoded MKV files in mplayer. I get nothing! the screen goes black and then I get the mplayer logo back. No error message, nothing. On the other hand, I can play any other XviD+MKV files that I encoded on another machine... and MOV won't play either.

I recently tried to encode a file in AVI this time but I couldn't make it play in mplayer...

Any idea, before I force my PC to commit a suicide?

Thanks,
- Dan.

pinkie_1
10th January 2007, 13:48
Post some info :
-setup of XviD for the encoding part
-mplayer's output (use -msglevel demux=9)

LoRd_MuldeR
10th January 2007, 17:00
You said you installed ffdshow and Haali Splitter. But those are DirectShow filters, so they are not related to MPlayer at all. Now the interesting question is, what happens when you play those files with a dshow-based player like MPC? And please post your MPlayer log ;)

Razorholt
10th January 2007, 17:01
Forgot to mention that:

1. - The new encoded files work fine with any other players but MPUI.
2. - They work fine with MPUI on 2 other machines - which rules out the encoding presets issue.
3. - The MKV/AVI files resolution are 1920x1080.

@pinkie_1: Thanks for your reply, here is the output (I think I have an idea on what's going on...):


********************************

command line:
"C:\Program Files\MPlayer for Windows\mplayer.exe" -slave -identify
-wid 2229480 -colorkey 0x101010 -nokeepaspect -framedrop -autosync 100
-vf screenshot -font C:\WINDOWS\Fonts\Arial.ttf -idx -ao
dsound:device=0 -vf-add pp=hb/vb/dr Z:\300\300_1920-4162-muxed.mkv

MPlayer dev-SVN-r21694-4.0.3 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.20GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
106 audio & 227 video codecs
C:\WINDOWS\Fonts\Arial.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: C:\WINDOWS\Fonts\Arial.ttf

Playing Z:\300\300_1920-4162-muxed.mkv.
ID_VIDEO_ID=0
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=und
[mkv] Track ID 2: audio (A_VORBIS), -aid 0, -alang und
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [XVID] 1920x800 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=Z:\300\300_1920-4162-muxed.mkv
ID_DEMUXER=mkv
ID_VIDEO_FORMAT=XVID
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=1920
ID_VIDEO_HEIGHT=800
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=2.4000
ID_AUDIO_FORMAT=vrbs
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=106.16
Opening video filter: [pp=hb/vb/dr]
Opening video filter: [screenshot]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
ID_VIDEO_CODEC=ffodivx
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
AO: [dsound] 44100Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=ffvorbis
Starting playback...
VDec: vo config request - 1920 x 800 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.40:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=2.4000
SwScaler: using unscaled yuv420p -> bgr24 special converter
VO: [directx] 1920x800 => 1920x800 Planar YV12
[ASPECT] Warning: No suitable new res found!
<vo_directx><ERROR>create surface failed with 0x88760168
<vo_directx><FATAL ERROR>can't use overlay mode: please use -vo directx:noaccel
FATAL: Cannot initialize video driver.

FATAL: Could not initialize video filters (-vf) or video output (-vo).


Exiting... (End of file)

********************************

Razorholt
10th January 2007, 17:09
I added -vo directx:noaccel in the option field and it worked :)
Now, will it affect the video quality?

Thanks,
- Dan

Razorholt
10th January 2007, 17:15
You said you installed ffdshow and Haali Splitter. But those are DirectShow filters, so they are not related to MPlayer at all. Now the interesting question is, what happens when you play those files with a dshow-based player like MPC? And please post your MPlayer log ;)

The dshow-based players handled the file just fine, including MPC.

Cheers,
- Dan

P.S: Don't move mate, I have a great question for you coming up in a new thread :D

LoRd_MuldeR
10th January 2007, 17:38
I added -vo directx:noaccel in the option field and it worked :)
Now, will it affect the video quality?

Yes, it will hurt Video quality if the video is scaled !!!
It should work without -vo directx:noaccel

Close all other apps that might use Overlay and try again!
If it still doesn't work, try to update your drivers...

pinkie_1
10th January 2007, 20:42
1. What video card/drivers do you have ?

2. [hint] ffodivx is a generic MPEG-4 decoder. For XviD content you could also try -vc xvid, (yeah, the coma is not a typo :))

Razorholt
11th January 2007, 00:51
1. What video card/drivers do you have ?

2. [hint] ffodivx is a generic MPEG-4 decoder. For XviD content you could also try -vc xvid, (yeah, the coma is not a typo :))


Video card: Intel(R) 82845G/GL/GE/PE/GV

and -vc xvid, did nothing :(

pinkie_1
11th January 2007, 01:24
82845G/GL/GE/PE/GV
I think that you'll be stuck on directx:noaccel. At least for HD content. If you're in a mood for experimenting, see if you can use -vo directx by itself with low res movies, i.e. < full SD.

The -vc command just proposes a decoder.

Razorholt
11th January 2007, 01:36
-vo directx works fine with any clips from SD to 1024x576.

So I guess I'm stuck on directx:noaccel :(

EDIT: I'm gonna check the latest drivers though, as Lord_Mulder_The_Great suggested :D

LoRd_MuldeR
11th January 2007, 01:39
Try to use MPlayer without MPUI. Still same problem?
mplayer.exe -vo directx -framedrop "c:\path to file\file.avi"

Razorholt
11th January 2007, 02:21
Ok, this is what I get:







MPlayer dev-SVN-r21694-4.0.3 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.20GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
106 audio & 227 video codecs

Playing Z:\300\300_1920-4162-muxed.mkv.
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_VORBIS), -aid 0, -alang und
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [XVID] 1920x800 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
AO: [dsound] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 1920 x 800 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.40:1 - prescaling to correct movie aspect.
VO: [directx] 1920x800 => 1920x800 Planar YV12
[ASPECT] Warning: No suitable new res found!
<vo_directx><ERROR>create surface failed with 0x88760168
<vo_directx><FATAL ERROR>can't use overlay mode: please use -vo directx:noaccel
FATAL: Cannot initialize video driver.

FATAL: Could not initialize video filters (-vf) or video output (-vo).


Exiting... (End of file)

C:\Program Files\MPlayer for Windows>

LoRd_MuldeR
11th January 2007, 02:53
maybe you try something like this:
-vf scale=960:400

Razorholt
11th January 2007, 03:24
yes, it works perfectly... So I can't watch anything higher than 900x400 with mplayer?

EDIT: -vf scale=1024:576 works fine too.

Razorholt
11th January 2007, 03:49
So, why mplayer cannot cope with HD resolutions and other players can (like VLC, MPC, etc..)? That's a rather bad news for me as I planned to create a GUI for mplayer in order to play HD files. I know some PC will able to play these files just fine, but what about users like me?

What's the solution you guys think might be? directx:noaccel ?

Thanks,
- Dan

pinkie_1
11th January 2007, 07:46
82845G/GL/GE/PE/GV
How much memory have you allocated to it ?

LoRd_MuldeR
11th January 2007, 13:37
So, why mplayer cannot cope with HD resolutions and other players can (like VLC, MPC, etc..)? That's a rather bad news for me as I planned to create a GUI for mplayer in order to play HD files. I know some PC will able to play these files just fine, but what about users like me?

What's the solution you guys think might be? directx:noaccel ?

Thanks,
- Dan

I think MPlayer can, but there is a bug/limitation in the directx renderer maybe. That would be something to post at the MPlayer mailing list, where the MPlayer devs are arround. BTW: Did you try to use GL renderer and see what happens?

mplayer.exe -vo gl -framedrop "c:\path to file\video.mkv"

BTW: Your screensize isn't 1920x800 ??? If so, downsizing to your actual screensize with "scale" filter won't hurt quality. Try like this in MPUI:

-vf-add scale=x:y -sws 9
where x and y is your screen resolution.

Razorholt
11th January 2007, 17:02
mplayer.exe -vo gl -framedrop "c:\path to file\video.mkv"

Yes, if works. I have the sound + video but it didn't rescale at all:





MPlayer dev-SVN-r21694-4.0.3 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.20GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
106 audio & 227 video codecs

Playing Z:\300\300_1920-4162-muxed.mkv.
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_VORBIS), -aid 0, -alang und
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [XVID] 1920x800 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
AO: [dsound] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 1920 x 800 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.40:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> rgb32 special converter
VO: [gl] 1920x800 => 1920x800 BGRA
[ASPECT] Warning: No suitable new res found!
New_Face failed. Maybe the font path is wrong.12 ??% ??% ??,?% 11 0
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
A: 33.5 V: 33.3 A-V: 0.195 ct: 0.010 799/799 45% 48% 4.7% 482 0
Exiting... (Quit)

Razorholt
11th January 2007, 17:06
-vf-add scale=x:y -sws 9

meaning that it can't auto scale?

Razorholt
11th January 2007, 17:08
Also, I noticed this ugly green window that flashes before the clip plays - with directx only. Can I avoid it?

LoRd_MuldeR
11th January 2007, 17:44
meaning that it can't auto scale?

it can! Try like this
-vf-add scale=x:-2 -sws9
where x is 1024 (or whatever suits your monitor) for example

Also, I noticed this ugly green window that flashes before the clip plays - with directx only. Can I avoid it?

That's caused by the Overlay. You have to select one key-color which is "transparent" and thus will let you see the Overlay through.
Seems they use some "green" color by default. Try this to change it to some "near black" color:
-colorkey 0x101010
Using pure black (-colorkey 0x000000) is a bad idea, because a lot off apps have black pixels. So Overlay would appear in Windows where you don't want to have it. Some "funny" effect though ;)

Razorholt
11th January 2007, 21:07
it can! Try like this
-vf-add scale=x:-2 -sws9
where x is 1024 (or whatever suits your monitor) for example

the -sws9 part didn't work but the rest did. I changed my screen resolution up to 1280x1024 and added -vf-add scale=1280:-2, the video didn't play. I simply can't play any video with mplayer that is higher than 1024x576... :(

EDIT: you meant "-sws 9" and not "-sws9", right?

That's caused by the Overlay. You have to select one key-color which is "transparent" and thus will let you see the Overlay through.
Seems they use some "green" color by default. Try this to change it to some "near black" color:
-colorkey 0x101010
Using pure black (-colorkey 0x000000) is a bad idea, because a lot off apps have black pixels. So Overlay would appear in Windows where you don't want to have it. Some "funny" effect though ;)

Worked like a charm!!! I have now the background of my GUI turning black when I quit the video, but at least it's not green :)


Thanks Lord_Mulder!
- Dan

Razorholt
11th January 2007, 21:39
Ok, this is the line I'm going to use:

mplayer.exe -vo gl -framedrop -quiet -noborder -fs -rootwin -colorkey 0x101010

It works very well with my little GUI. no background and it resizes well :D

Anything that I should add? Am I gonna get a quality as good as if I were using directx?


Thanks guys!

- Dan

pinkie_1
11th January 2007, 21:52
I will reiterate my question : how much of the system memory have you allocated to your "82845G/GL/GE/PE/GV" ?
(also it would be useful to know the type, total amount, latencies)
you meant "-sws 9" and not "-sws9", right?
It was indeed a typo. Forgive him. :)
Am I gonna get a quality as good as if I were using directx?
The perceptual quality should be about the same. Do take in consideration the fact that actual tastes might be different.

Razorholt
11th January 2007, 22:06
It was indeed a typo. Forgive him. :)

I have to forgive a Lord now? I thought it was working the other way around. ha. Yeah... I'll forgive him ;)

The perceptual quality should be about the same. Do take in consideration the fact that actual tastes might be different.

Got it. GL is pretty standard, right? So my GUI should work on winXP, win2000, win2003, Vista and NT. Correct?

Cheers mate!
- Dan

Razorholt
11th January 2007, 22:09
and here is the details you asked, Pinkie:


INTEL(R) EXTREME GRAPHICS REPORT


Report Date: 01/11/2007
Report Time[hr:mm:ss]: 14:59:46
Driver Version: 6.14.10.4342
Operating System: Windows NT* 5.1.2600 Service Pack 2
Default Language: English
DirectX* Version: 9.0
Physical Memory: 510 MB
Min. Graphics Memory: 1 MB
Max. Graphics Memory: 64 MB
Graphics Memory in use: 6 MB
Processor: x86
Processor Speed: 2192 MHZ
Vendor ID: 0x8086
Device ID: 0x2562
Device Revision: 1


* Output Devices Connected to Graphics Accelerator *

Active Monitors:1

LoRd_MuldeR
11th January 2007, 22:32
I have to forgive a Lord now? I thought it was working the other way around. ha. Yeah... I'll forgive him ;)



Got it. GL is pretty standard, right? So my GUI should work on winXP, win2000, win2003, Vista and NT. Correct?

Cheers mate!
- Dan

Yes. But MPlayer's GL renderer cannot be embedded in GUI apps.
The only working renderer for that is currently DirectX/Overlay :(

Razorholt
11th January 2007, 22:43
Having the video playing in an external window will not be a problem for me. So GL it is! :)

Cheers,
- Dan

Razorholt
11th January 2007, 23:18
Quick question: I took out all the codecs from the codecs folder and I'm still able to player my MKV files... is that normal?

Thanks,
- Dan

LoRd_MuldeR
11th January 2007, 23:31
Quick question: I took out all the codecs from the codecs folder and I'm still able to player my MKV files... is that normal?

Thanks,
- Dan

That's the basic idea of MPlayer:
One "self-contained" executable that plays everything!

There's no need for external Filters/Codecs/Plugsins/DLLs or whatever.
The "codecs" folder is optional, for additional codecs that are not built-in or cannot be built-in (like nasty WMV9).
You can delete the "codecs" folder and 99% of your files still play just fine :D

Razorholt
11th January 2007, 23:33
hmm.. I thought that MKV required some additional codecs... Hell, that's a great news :D

LoRd_MuldeR
11th January 2007, 23:36
hmm.. I thought that MKV required some additional codecs... Hell, that's a great news :D

MKV (Matroska) is just a container, not a video or audio format!
So MKV will never require a Codec, it just requires a suitable Splitter.
Of course MPlayer has MKV-Splitter built-in :D
Codecs are needed for the Video/Audio streams inside your MKV file.
But again those Codecs are built-in, so no additional files needed :cool:

pinkie_1
11th January 2007, 23:54
Alas, I've figured it out. At least partially.

General recommendations :
- set "Max. Graphics Memory" to at least 128 MB
- use 16 bpp instead of 32 bpp
- use -nodouble
- disable postprocessing, it's pointless for good sources

ToDo :
- try mplayer -vo directx -nodouble -noslices -msglevel vo=9 "path_to_file" for a full HD
- try mplayer -vo gl -nodouble -msglevel vo=9 "path_to_file" for a full HD
- submit the _lengthy_ output to me via PM

I thought that MKV required some additional codecs
First of all, MPlayer relies on internal parsers/splitters.
Second of all, it's based on libavcodec (FFmpeg), thus being able to decode quite a lot of streams all by itself.

For your amusement, use -vc help...

Razorholt
11th January 2007, 23:55
Ok, sorry. I meant I thought MKV needed a splitter, not a codec ... I know MKV is a container :) And you just answered my next question: MPlayer has MKV-Splitter built-in! Great.

Now, I know that Haali asked to disable Gabest splitter during its installation - because of a risk of a conflict or something - so, is there a risk having the mplayer MKV splitter as well as Haali's and/or Gabest's?

LoRd_MuldeR
11th January 2007, 23:59
Ok, sorry. I meant I thought MKV needed a splitter, not a codec ... I know MKV is a container :) And you just answered my next question: MPlayer has MKV-Splitter built-in! Great.

Now, I know that Haali asked to disable Gabest splitter during its installation - because of a risk of a conflict or something - so, is there a risk having the mplayer MKV splitter as well as Haali's and/or Gabest's?

You mix up DirectShow and MPlayer :scared:

MPlayer is not related to DirectShow at all.
So MPlayer can not use any DirectShow filters nor can it conflict with any of them!
There is just the MPlayer.exe itself and that's it. No other files are involved.

Well, MPlayer can load certain external DLLs form it's "codecs" folder.
But those are optional and they are not registered system-wide. So no possibility of any conflicts, that's for sure!
How could other Players/Filter conflict with something inside MPlayer.exe they can't even know about? ^^

Razorholt
12th January 2007, 00:12
So MPlayer can not use any DirectShow filters nor can it conflict with any of them!
There is just the MPlayer.exe itself and that's it. No other files are involved.

That's what I wanted to hear :D

Razorholt
12th January 2007, 00:19
General recommendations :
- set "Max. Graphics Memory" to at least 128 MB
- use 16 bpp instead of 32 bpp


Where do I go to change these settings?

pinkie_1
12th January 2007, 00:24
1. MGM from BIOS

2. bit depth from [display properties] -> [settings]

Razorholt
12th January 2007, 01:23
@pinkie_1: I'm gonna change the BIOS setting in a few minutes (I have an encoding process going on right now..:() 16bpp make the 1080p file look ugly...

@Lord_Mulder: I remember you saying that mplayer size can be around 4.5 MB instead of that 10 MB. Where can I find this light version?


Thanks guys.
- Dan

LoRd_MuldeR
12th January 2007, 01:30
@Lord_Mulder: I remember you saying that mplayer size can be around 4.5 MB instead of that 10 MB. Where can I find this light version?

hmm, when you built MPlayer, then you can disable certain features. This should make the EXE slightly smaller. The more features you disable, the smaller the file will be. But also more features (Filters, Codecs, Splitters and so on) will be missing! No idea where you can get such builds. Maybe you'll have to built yourself.

What you can do with existing MPlayer builds is using the UPX packer. Packed EXE files are a lot smaller!
You can get UPX at this (http://upx.sourceforge.net/download/upx203w.zip) location.

Commandline would be:
upx.exe --force --brute "c:\path to mplayer\mplayer.exe"

Razorholt
12th January 2007, 18:45
@Pinkie_1: I can't find the way to apply the modification for the Mem from the BIOS - I have a Dell Dimension 2400. Do you want me to run the 2 tests you asked as it is?

Also, why GL can't resize the screen when I quit the fullscreen mode? I mean, the size of the window doesn't respect the ratio of the video. I think it applies the 4:3 ratio. DirectX does that just fine. The cmd I use is: mplayer.exe -vo gl -framedrop -slave -vf-add scale=400:-2 -sws 9

pinkie_1
12th January 2007, 19:13
Take a look at this (http://www.techarp.com/showFreeBOG.aspx?lang=0&bogno=330), maybe it will help you. (quick googling)
If not, run the tests anyway.

About the resize issue :
1. you have a 4:3 screen, right ?
2. give it a shot with scale=400:-3

Razorholt
12th January 2007, 19:45
Thanks Pinkie. I'll have to upgrade my graphic card anyway, so I'll do that shortly.

Regarding the scale, I'm afraid it didn't work :( Even if I enter scale=160:90, at first it shows up at this size. Then I go fs and quit, but it doesn't resize at the scale I specified.

Razorholt
13th January 2007, 00:10
Well, I think I'll have to choose between:

1. DirectX: accurate scaling, no HD files.
2. GL: wrong scaling, HD files

Tough.

LoRd_MuldeR
13th January 2007, 14:31
what about -vo gl2 instead of gl ???

Razorholt
14th January 2007, 22:46
Sorry, same behaviour :(