[MPlayer-dev-eng] [PATCH] fix fraps playback

Andrew Wason rectalogic at rectalogic.com
Mon Oct 18 21:57:46 CEST 2010


ffmpeg commit r25308 changed fraps pix_fmt from PIX_FMT_YUV420P to
PIX_FMT_YUVJ420P

I have an FPS1 sample (uploaded to MPlayer/incoming/fraps/fraps.avi)
that no longer plays after this change, attached patch fixes it.


$ ./mplayer /Volumes/Passport/bugs/mplayer-fraps/fraps.avi
MPlayer SVN-r32511-4.2.1 (C) 2000-2010 MPlayer Team

Playing /Volumes/Passport/bugs/mplayer-fraps/fraps.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [FPS1]  640x512  24bpp  60.000 fps  39464.6 kbps (4817.5 kbyte/s)
==========================================================================
Requested video codec family [fraps] (vfm=vfw) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [fffraps] vfm: ffmpeg (FFmpeg Fraps)
==========================================================================
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [coreaudio] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[fraps @ 0x1007fe1a0]pic->data[0]!=NULL in avcodec_default_get_buffer
[fraps @ 0x1007fe1a0]reget_buffer() failed
Error while decoding frame!

FATAL: Could not initialize video filters (-vf) or video output (-vo).
-------------- next part --------------
Index: libmpcodecs/vd_ffmpeg.c
===================================================================
--- libmpcodecs/vd_ffmpeg.c	(revision 32511)
+++ libmpcodecs/vd_ffmpeg.c	(working copy)
@@ -158,7 +158,7 @@
         case IMGFMT_IYUV:
         case IMGFMT_I420:
             // "converted" using pointer/stride modification
-            if(avctx->pix_fmt==PIX_FMT_YUV420P) return CONTROL_TRUE;// u/v swap
+            if(avctx->pix_fmt==PIX_FMT_YUV420P || avctx->pix_fmt==PIX_FMT_YUVJ420P) return CONTROL_TRUE;// u/v swap
             if(avctx->pix_fmt==PIX_FMT_YUV422P && !ctx->do_dr1) return CONTROL_TRUE;// half stride
             break;
 #if CONFIG_XVMC


More information about the MPlayer-dev-eng mailing list