[MPlayer-users] RGB24 for DivX or MPEG2

James Ronald james.ronald at gmail.com
Thu Sep 20 01:10:01 CEST 2007


I currently have an ARM9 (AT91sam9261) development board that has an
24bpp LCD display wired RGB.  I have built mplayer with some effort
and it seems to work fairly well except that I can not get it to
display RGB only BGR.  It looks like all video codecs, less gifs, bmp
an the like, all output BGR.  Unless there is a magic switch, it looks
like I'm going to need to hack one of the codecs but even looking and
the source for a full day I can figure out what's what.  If someone
could point me in the right direction, rewiring is not an option at
this time, it would be greatly appreciated.

Below is what I used for configure and the debug info from the
execution of mplayer.

Thanks.
Jim

./configure --enable-fbdev
--prefix=/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr
--target=arm-linux --cc=arm-linux-gcc --host-cc=arm-linux-gcc
--as=arm-linux-as --enable-ossaudio --disable-mpdvdkit --disable-tv
--disable-tv-v4l1 --disable-tv-v4l2 --disable-tv-bsdbt848
--disable-dvdread --disable-x11 --enable-linux-devfs --disable-sdl
--disable-win32 --disable-network --disable-rtc --disable-tga
--disable-mencoder --enable-debug=3


$MPLAYER_VERBOSE=3 ./mplayer -vo fbdev -vf-add rgb2bgr -msglevel all=3
Winning\ The\ DARPA\ Grand\ Challenge.avi
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: ARM
Reading config file
/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/etc/mplayer/mplayer.conf
: No such file or directory
get_path('') -> '/tmp/.mplayer/'
get_path('config') -> '/tmp/.mplayer/config'
Reading config file /tmp/.mplayer/config
this_opt = option: vo
Setting vo=fbdev
this_opt = option: vf-add
Setting vf-add=rgb2bgr
this_opt = option: msglevel
Setting msglevel=all=3
get_path('codecs.conf') -> '/tmp/.mplayer/codecs.conf'
Reading /tmp/.mplayer/codecs.conf: Can't open
'/tmp/.mplayer/codecs.conf': No such file or directory
Reading /home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/etc/mplayer/codecs.conf:
Can't open '/home/jronald/buildroot/build_y
Using built-in default codecs.conf.
CommandLine: '-vo' 'fbdev' '-vf-add' 'rgb2bgr' '-msglevel' 'all=3'
'Winning The DARPA Grand Challenge.avi'
get_path('font/font.desc') -> '/tmp/.mplayer/font/font.desc'
font: can't open file: /tmp/.mplayer/font/font.desc
font: can't open file:
/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/share/mplayer/font/font.desc
Using Unoptimized OnScreenDisplay
Using nanosleep() timing
Terminal type `vt102' is not defined.
get_path('input.conf') -> '/tmp/.mplayer/input.conf'
Can't open input config file /tmp/.mplayer/input.conf: No such file or directory
Can't open input config file
/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/etc/mplayer/input.conf:
No such file or directy
Falling back on default (hardcoded) input config
get_path('Winning The DARPA Grand Challenge.avi.conf') ->
'/tmp/.mplayer/Winning The DARPA Grand Challenge.avi.conf'

Playing Winning The DARPA Grand Challenge.avi.
get_path('sub/') -> '/tmp/.mplayer/sub/'
[file] File size is 199315356 bytes
STREAM: [file] Winning The DARPA Grand Challenge.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x40
list_end=0x17A
======= AVI Header =======
us/frame: 33367  (fps=29.970)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 88287   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  480 x 360
==========================
list_end=0x108
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: divx (78766964)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 29969/1000 = 29.969
Start: 0   Len: 88287
Suggested BufferSize: 49163
Quality 0
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 480
  biHeight 360
  biPlanes 1
  biBitCount 24
  biCompression 2021026148='divx'
  biSizeImage 518400
===========================
Regenerating keyframe table for MPEG-4 video.
list_end=0x17A
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC: U (55)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 16000/1 = 16000.000
Start: 0   Len: 112775
Suggested BufferSize: 418
Quality 0
Sample size: 1
==========================
Found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 16000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=209
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
==========================================================================
list_end=0xBB0360C
Found movie at 0x186 - 0xBB0360C
Reading INDEX block, 201062 chunks for 88287 frames (fpos=196097556).
AVI index offset: 0x182 (movi=0x186 idx0=0x4 idx1=0x415A)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
AVI: Searching for audio stream (id:1)

Badly interleaved AVI file detected - switching to -ni mode...
XXX initial  v_pts=136.641  a_pos=0 (0.000)
AVI video size=147303989 (88287) audio size=47135346 (47135346)
VIDEO:  [divx]  480x360  24bpp  29.969 fps  400.0 kbps (48.8 kbyte/s)
[V] filefmt:3  fourcc:0x78766964  size:480x360  fps:29.97  ftime:=0.0334
get_path('sub/') -> '/tmp/.mplayer/sub/'
using /dev/fb0
Opening video filter: [rgb2bgr]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Joint-Stereo, BPF: 417
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
ao2: 44100 Hz  2 chans  s16le
audio_setup: using '/dev/sound/dsp' dsp device
audio_setup: using '/dev/sound/mixer' mixer device
audio_setup: using 'pcm' mixer device
[AO OSS] audio_setup: Can't open audio device /dev/sound/dsp: No such
file or directory
/mmc $ MPLAYER_VERBOSE=3 ./mplayer -vo fbdev -vf-add rgb2bgr -msglevel
all=3 Winning\ The\ DARPA\ Grand\ Challenge.avi
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: ARM
Reading config file
/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/etc/mplayer/mplayer.conf
: No such file or directory
get_path('') -> '/tmp/.mplayer/'
get_path('config') -> '/tmp/.mplayer/config'
Reading config file /tmp/.mplayer/config
this_opt = option: vo
Setting vo=fbdev
this_opt = option: vf-add
Setting vf-add=rgb2bgr
this_opt = option: msglevel
Setting msglevel=all=3
get_path('codecs.conf') -> '/tmp/.mplayer/codecs.conf'
Reading /tmp/.mplayer/codecs.conf: Can't open
'/tmp/.mplayer/codecs.conf': No such file or directory
Reading /home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/etc/mplayer/codecs.conf:
Can't open '/home/jronald/buildroot/build_y
Using built-in default codecs.conf.
CommandLine: '-vo' 'fbdev' '-vf-add' 'rgb2bgr' '-msglevel' 'all=3'
'Winning The DARPA Grand Challenge.avi'
get_path('font/font.desc') -> '/tmp/.mplayer/font/font.desc'
font: can't open file: /tmp/.mplayer/font/font.desc
font: can't open file:
/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/share/mplayer/font/font.desc
Using Unoptimized OnScreenDisplay
Using nanosleep() timing
Terminal type `vt102' is not defined.
get_path('input.conf') -> '/tmp/.mplayer/input.conf'
Can't open input config file /tmp/.mplayer/input.conf: No such file or directory
Can't open input config file
/home/jronald/buildroot/build_arm_nofpu/tinyroot/usr/etc/mplayer/input.conf:
No such file or directy
Falling back on default (hardcoded) input config
get_path('Winning The DARPA Grand Challenge.avi.conf') ->
'/tmp/.mplayer/Winning The DARPA Grand Challenge.avi.conf'

Playing Winning The DARPA Grand Challenge.avi.
get_path('sub/') -> '/tmp/.mplayer/sub/'
[file] File size is 199315356 bytes
STREAM: [file] Winning The DARPA Grand Challenge.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x40
list_end=0x17A
======= AVI Header =======
us/frame: 33367  (fps=29.970)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 88287   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  480 x 360
==========================
list_end=0x108
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: divx (78766964)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 29969/1000 = 29.969
Start: 0   Len: 88287
Suggested BufferSize: 49163
Quality 0
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 480
  biHeight 360
  biPlanes 1
  biBitCount 24
  biCompression 2021026148='divx'
  biSizeImage 518400
===========================
Regenerating keyframe table for MPEG-4 video.
list_end=0x17A
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC: U (55)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 16000/1 = 16000.000
Start: 0   Len: 112775
Suggested BufferSize: 418
Quality 0
Sample size: 1
==========================
Found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 16000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=209
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
==========================================================================
list_end=0xBB0360C
Found movie at 0x186 - 0xBB0360C
Reading INDEX block, 201062 chunks for 88287 frames (fpos=196097556).
AVI index offset: 0x182 (movi=0x186 idx0=0x4 idx1=0x415A)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
AVI: Searching for audio stream (id:1)

Badly interleaved AVI file detected - switching to -ni mode...
XXX initial  v_pts=136.641  a_pos=0 (0.000)
AVI video size=147303989 (88287) audio size=47135346 (47135346)
VIDEO:  [divx]  480x360  24bpp  29.969 fps  400.0 kbps (48.8 kbyte/s)
[V] filefmt:3  fourcc:0x78766964  size:480x360  fps:29.97  ftime:=0.0334
get_path('sub/') -> '/tmp/.mplayer/sub/'
using /dev/fb0
Opening video filter: [rgb2bgr]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 128 kbit Joint-Stereo, BPF: 417
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
ao2: 44100 Hz  2 chans  s16le
audio_setup: using '/dev/sound/dsp' dsp device
audio_setup: using '/dev/sound/mixer' mixer device
audio_setup: using 'pcm' mixer device
[AO OSS] audio_setup: Can't open audio device /dev/sound/dsp: No such
file or directory
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: Null audio output
AO: Author: Tobias Diedrich <ranma+mplayer at tdiedrich.de>
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
[ffmpeg] aspect_ratio: 1.333333
VDec: vo config request - 480 x 360 (preferred colorspace: Planar YV12)
Trying filter chain: rgb2bgr vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale rgb2bgr vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (480x360->480x360,flags=0,'MPlayer',0x32315659)
SwScaler: using unscaled yuv420p -> rgb24 special converter
REQ: flags=0x401  req=0x0
REQ: flags=0x403  req=0x0
VO: [fbdev] 480x360 => 480x360 BGR 24-bit
VO: Description: Framebuffer Device
VO: Author: Szabolcs Berecz <szabi at inf.elte.hu>
Can't set graphics mode: Invalid argument
var info:
xres: 480
yres: 272
xres_virtual: 480
yres_virtual: 272
xoffset: 0
yoffset: 0
bits_per_pixel: 24
grayscale: 0
red: 0 8 0
green: 8 8 0
blue: 16 8 0
transp: 0 0 0
nonstd: 0
fix info:
framebuffer size: 783360 bytes
type: 0
type_aux: 0
visual: 2
line_length: 1440 bytes
fb_bpp: 24
fb_pixel_size: 3 bytes
other:
in_width: 480
in_height: 360
out_width: 480
out_height: 360
first_row: 0
last_row: 360
pixel per line: 480
/mmc $ b2bgr] Allocating mp_image_t, 480x360x24bpp RGB packed, 518400 bytes
*** [scale] Allocating (slices) mp_image_t, 480x368x12bpp YUV planar,
264960 bytes
*** [vo] Allocating mp_image_t, 480x360x24bpp BGR packed, 518400 bytes
*** [scale] Allocating (slices) mp_image_t, 480x368x12bpp YUV planar,
264960 bytes
A:   3.2 V:   0.8 A-V:  2.331 ct: -0.000  26/ 26 111% 72% 194.6% 26 0

MPlayer interrupted by signal 2 in module: decode_video
Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: mp3lib
Uninit video: ffmpeg



More information about the MPlayer-users mailing list