Log in

View Full Version : MPlayer flashing video when using crop&scale


Selur
8th January 2010, 18:14
Using MPlayer Sherpya-SVN-r30075-4.2.5 (and MPlayer Sherpya-SVN-r29851-4.2.5) on Windows 7 64bit I wanted to play the first chapter of a DVD (Elephants Dream), but I only wanted to see the upper 400x400 pixel an resize them to 600x600.
To archive this I used:
mplayer dvd://1 -dvd-device "D:\ElephantsDream\VIDEO_TS" -chapter 1-1 -lavdopts threads=1 -vid 0 -vf crop=400:400:0:0,scale=600:600 -sws 10 -forcedsubsonly -fps 25 -aspect 1.7775:1 -aid 128 -vo direct3d which resulted in a flashing screen. :(
The interessting part is probably -vf crop=400:400:0:0,scale=600:600 -sws 10 If I skip the ,scale=600:600 -sws 10 part, playback is fine.
Chainging the resizer (via -sws x) doesn't help and the same happend when I shrink the view via ",scale=200:200 -sws 10".

Also happend when using crop=320:320:0:0.

MPlayer complains with:
[swscaler @ 00F571D4]Slices start in the middle!
but I have no clue how to 'fix' this. :)


Does anyone know what went wrong?
Did I do something wrong or is it a mplayer bug?



Cu Selur

Reimar
8th January 2010, 19:49
If you only want to play back, use dsize to make Direct3D do the scaling which should avoid this issue.
You could also scale first and then crop, though that wastes CPU.

Selur
8th January 2010, 19:52
Since the same happens with mencoder dsize isn't an option and will think about the scale then resize way, but another way would be preferred, especially when resizing larger ratios. ;)

Reimar
8th January 2010, 20:22
Fixed in MPlayer SVN r30245.

Selur
8th January 2010, 20:23
Thanks :)