[Mplayer-advusers] problem redirecting -vop cropdetect output for scripting
Onno
onnok at web.de
Fri Mar 28 19:37:32 CET 2003
Hi List,
i suffer the problem of not beeing able to redirect the output
of:
mplayer -vo null -ao null -vop cropdetect /video/mpegfile.mpg |tee -a
/tmp/croptdetect.out
successful, if it is _not_ started from a loginshell(my guess).
this lead to a lot of problems, while testting in X, or on the local
console, or via ssh, the redirect will work!
It _wont_ work if mplayer ist started via atd or via a script called
from init (actually its my vdr running from /etc/inittab starting a
script to detect crop parameters for encoding) but the file contains no
lines with "... -vop crop=...", all other mplayer info text appears ...!
started to test:
echo 'mplayer -vo null -ao null -vop cropdetect /video/mpegfile.mpg |tee
-a /tmp/croptdetect.out'|at -q a now
This happens on various versions of atd/mplayer and any kind of input
file and depends not on the redirection of std-err.(i tested a lot)
Other mplayer messages (all apart the "-vop crop...") apear:
Output (send via mail from atd):
**************************************************************
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale
MPlayer dev-CVS-030214-06:00-3.2 (C) 2000-2003 Arpad Gereoffy (see DOCS)
CPU: Advanced Micro Devices Athlon TB Thunderbird (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx
Reading config file /usr/local/etc/mplayer/mplayer.conf
Reading config file /root/.mplayer/config
Reading /root/.mplayer/codecs.conf: 50 audio & 135 video codecs
Font /root/.mplayer/font/font.desc loaded successfully! (206 chars)
Using Linux hardware RTC timing (1024Hz).
Input config file /root/.mplayer/input.conf parsed : 50 binds
Setting up LIRC support...
Playing /video/mpegfile.vob
MPEG-PES file format detected.
VIDEO: MPEG2 704x576 (aspect 2) 25.00 fps 18750.0 kbps (2343.8 kbyte/s)
Opening audio decoder: [dvdpcm] Uncompressed DVD/VOB LPCM audio decoder
AUDIO: 32000 Hz, 1 ch, 16 bit (0x10), ratio: 64000->64000 (512.0 kbit)
Selected audio codec: [dvdpcm] afm:dvdpcm (Uncompressed DVD/VOB LPCM)
==========================================================================
Opening video filter: [cropdetect]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 704 x 576 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
Opening video filter: [lavc]
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder v2.0
libmpeg2: Using MMXEXT for IDCT transform
libmpeg2: Using MMXEXT for motion compensation
VDec: vo config request - 704 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [null] 704x576 => 768x576 Mpeg PES
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
Checking audio filter chain for 32000Hz/1ch/16bit -> 32000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 1 ch, 32000 hz, little endian signed int
AF_pre: 32000Hz 1ch Signed 16-bit (Little-Endian)
AO: [null] 32000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 32000Hz/1ch/16bit -> 32000Hz/2ch/16bit...
Starting playback...
Too many video packets in the buffer: (4096 in 7817024 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
A: 0.1 V: 0.0 A-V: 0.049 ct: 0.000 1/ 1 0% 0% 0.0% 0 0 0%
Exiting... (End of file)
***************************************************************
the mpeg-decoder error also apears on an ssh login, but does not
prevent printing the rightlines:
########## from ssh login console ###############
[same as above]
Starting playback...
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
crop area: X: 44..575 Y: 46..512 (-vop crop=532:466:44:46) 0.0% 0 0 0%
crop area: X: 44..575 Y: 46..512 (-vop crop=532:466:44:46)
crop area: X: 44..575 Y: 46..512 (-vop crop=532:466:44:46)
crop area: X: 44..575 Y: 46..513 (-vop crop=532:468:44:46) 0.0% 0 0 0%
[ a lot of those]
crop area: X: 38..582 Y: 46..526 (-vop crop=544:480:38:46)
A: 0.1 V:4229.3 A-V:-4229.181 ct: -0.800 201/201 16% 47% 1.2% 0 0 0%
Exiting... (End of file)
#######################################################
Can anybody perhaps see an obvious pattern ?
Regards Onno Kreuzinger
P.S. the affected file is "libmpcodecs/vf_cropdetect.c"
an the code uses an printf call, not one of mplayers messaging subsystem
stuff(but i'am unfortunately no coder, so i cant go further...)
More information about the MPlayer-advusers
mailing list