[MPlayer-users] hardware video decoding and yuv dump with mplayer
pcuser p
pcuser.mails at gmail.com
Thu Oct 4 11:01:01 CEST 2012
Hi all,
I am working ARM based board having hardware video decoder modules (for
mpeg4,h.264)
I am trying to use mplayer to decode using hardware decoders and dump the
yuv.
mplayer binary is built from source with below config setting:
./configure --prefix=/usr --confdir=/etc --target=arm-linux
--host-cc=/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/ccache
/usr/bin/gcc
--cc=/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/ccache
/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
--as=/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-as
--charset=UTF-8 --extra-cflags= -pipe -Os -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --extra-ldflags= --yasm=
--disable-alsa --disable-big-endian --enable-largefiles --disable-sdl
--disable-freetype --enable-mplayer* --disable-mencoder --disable-mad
--disable-live --enable-armv5te --enable-cross-compile --disable-ivtv
--enable-dynamic-plugins --enable-v4l2 --enable-yuv4mpeg*
/dev/video0 is my V4L2 based hardware video decoder driver module in linux.
mplayer binary is executed with the below command line options:
*./mplayer -v driver=v4l2:device=/dev/video0 -vo yuv4mpeg
/root/apps/testseq/video.m4v* (mpeg4 video - elementry stream)
*Log messages of mplayer:*
./mplayer -v driver=v4l2:device=/dev/video0 -vo yuv4mpeg
/root/apps/testseq/video.m4v
---------------------------------------LOG MESSAGES FROM
MPLAYER---------------------------------------------------
./mplayer -v driver=v4l2:device=/dev/video0 -vo yuv4mpeg
/root/apps/testseq/video.m4v
MPlayer UNKNOWN-4.6.2 (C) 2000-2010 MPlayer Team
CPU: ARM
get_path('codecs.conf') -> '/root/.mplayer/codecs.conf'
Reading /root/.mplayer/codecs.conf: Can't open
'/root/.mplayer/codecs.conf': No such file or directory
Reading /etc/codecs.conf: Can't open '/etc/codecs.conf': No such file or
directory
Using built-in default codecs.conf.
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using Unoptimized OnScreenDisplay
Configuration: --prefix=/usr --confdir=/etc --target=arm-linux
--host-cc=/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/ccache
/usr/bin/gcc
--cc=/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/ccache
/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc
--as=/home/dave/buildroot/buildroot/buildroot-2012.02/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-as
--charset=UTF-8 --extra-cflags= -pipe -Os -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --extra-ldflags= --yasm=
--disable-alsa --disable-big-endian --enable-largefiles --disable-sdl
--disable-freetype --enable-mplayer --disable-mencoder --disable-mad
--disable-live --enable-armv5te --enable-cross-compile --disable-ivtv
--enable-dynamic-plugins --enable-v4l2 --enable-yuv4mpeg
CommandLine: '-v' 'driver=v4l2:device=/dev/video0' '-vo' 'yuv4mpeg'
'/root/apps/testseq/video.m4v'
Using nanosleep() timing
get_path('input.conf') -> '/root/.mplayer/input.conf'
Can't open input config file /root/.mplayer/input.conf: No such file or
directory
Can't open input config file /etc/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('video0.conf') -> '/root/.mplayer/video0.conf'
Playing driver=v4l2:device=/dev/video0.
get_path('sub/') -> '/root/.mplayer/sub/'
File not found: 'driver=v4l2:device=/dev/video0'
Failed to open driver=v4l2:device=/dev/video0.
get_path('video.m4v.conf') -> '/root/.mplayer/video.m4v.conf'
Playing /root/apps/testseq/video.m4v.
get_path('sub/') -> '/root/.mplayer/sub/'
[file] File size is 8976495 bytes
STREAM: [file] /root/apps/testseq/video.m4v
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: raw MPEG-4 video format
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename /root/apps/testseq/video.m4v ext: .m4v
Checking for Nullsoft Streaming Video
Checking for MOV
Checking for VIVO
header block 1 size: 0
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 71479, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=50331641
LMLM4 Stream Format not found
sync_mpeg_ps: seems to be MP3 stream...
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 1 p101: 0 p1B6: 74 p12x: 1 sli: 0 a: 0 b: 0 c: 0
idr: 0 sps: 0 pps: 0 PES: 0 MP3: 102, synced: 0
MPEG-ES file format detected.
==> Found video stream: 0
Searching for Video Object Start code... OK!
Searching for Video Object Layer Start code... M4V: 0x100
M4V: 0x120
OK! FPS SEEMS TO BE 0.000
Searching for Video Object Plane Start code... FPS seems to be: 23.976025
OK!
[V] filefmt:27 fourcc:0x10000004 size:0x8 fps:23.976 ftime:=0.0417
get_path('sub/') -> '/root/.mplayer/sub/'
using /dev/fb0
Can't open /dev/fb0: No such file or directory
[fbdev2] Using device /dev/fb0
[fbdev2] Can't open /dev/fb0: No such file or directory
VO: [v4l2] No such file or directory
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[IMGUTILS @ 0x560e04]Picture size 0x8 is invalid
[NULL @ 0x4c3438]ignoring invalid width/height values
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks.
Starting playback...
[ffmpeg] aspect_ratio: 1.333333
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (320x240->320x240,flags=0,'MPlayer',0x32315659)
VO: [null] 320x240 => 320x240 Planar YV12
VO: Description: Null video output
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
*** [vo] Allocating (slices) mp_image_t, 320x240x12bpp YUV planar, 115200
bytes
V: 0.0 1/ 1 ??% ??% ??,?% 0 0 $<50>
EOF code: 1
Uninit video: ffmpeg
Exiting... (End of file)
---------------------------------------END OF LOG MESSAGES FROM
MPLAYER---------------------------------------------------
I've few questions about mplayer command.
After browsing through mplayer documentation & googling a bit, I thought
this command will suffice for my requirement.
*./mplayer -v driver=v4l2:device=/dev/video0 -vo yuv4mpeg
/root/apps/testseq/video.m4v
*1) For the above command, mplayer identifies stream type & video
resolution correctly, but it is trying to use ffmpeg for video decoding.
I need to use hardware video decoders in my linux board for video
decoding, not ffmpeg.
I thought, driver=v4l2:device=/dev/video0 in command line, makes mplayer
to use registered v4l2 based video decoder (in my case, /dev/video0)
and setting -vo yuv4mpeg to get decoded yuv.
but both decoding & dumping failed with the above command.
2) Can some one suggest how to use mplayer for hardware decoding with right
commands?
Regards,
Dave
More information about the MPlayer-users
mailing list