[Mplayer-advusers] mplayer not working with dvb and dvbscale

Onno onnok at web.de
Fri May 16 23:05:32 CEST 2003


Hi,

between mplayer-rc5 and cvs from 15. may something big changed
with the way filters/plugins work, and that could have broken
the dvbscale plugin.
To explain, i use mencoder and a big script to automatically convert dvb 
recordings to ffmpeg-divx, including a step which cuts of any
black bars, detected by "mplayer -vop cropdetect".Since means, a 720x576 
transmission has an mpeg2 aspect of 1.78, is scaled to 480x360 and
then black bars (difference from 1.78 to 2.21) are cut of, leaving a
pixel resolution of 480x288 with an encoded aspect of 2.21, but a pixel 
aspect of 1.67.

Since this is not done inside mencoder, one needs to recalculate
the correct aspect and encode it into the mpeg4 data using mencoder
option "-aspect x.xx".
Those movies needed this mplayer option to play back correct:
mplayer -vo mpegpes -ao mpegpes -vop \
lavc=6:25.000,expand=0:576:-1:-1:1,scale=0:-1,dvbscale video.avi

this works for up until rc5 and all videos i have, regardless of their 
origin(i love mplayer!) and reduces scaling to a minimum.

the first version i tried which failed was 20030322.

To make my videos play i then calculated the y-expand value
by doing (Y-max / video-aspect * tv-out-aspect), 576 / 2.21 * 1.33=346,
this works with the newer mplayer:
mplayer -vo mpegpes -ao mpegpes \
-vf scale=480:346,expand=480:576:-1:-1:1,lavc=6:25

but this way i can't use "-autoq" since adding ",pp" only yields an 
error on opening the pp filter.

[user at host]# mplayer -autoq 100 -vo mpegpes -ao mpegpes \
-vf scale=480:432,expand=480:576:-1:-1:1,lavc=6:25.000  video.avi

Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MPlayer dev-CVS-030514-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: this codecs.conf is too old, 
incompatible with this mplayer release! at line 6
Reading /usr/local/etc/mplayer/codecs.conf: 55 audio & 144 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.avi
Cache fill:  0.00% (0 bytes)    AVI file format detected.
VIDEO:  [DIVX]  480x360  24bpp  25.00 fps  517.9 kbps (63.2 kbyte/s)
Clip info:
  Software: MEncoder 0.90rc4-3.2
==========================================================================
Trying to force audio codec driver family 9 ...
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 20000->192000 (160.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Opening /dev/dvb/adapter0/video0+audio0
Opening video filter: [pp]
Opening video filter: [scale]
Couldn't open video filter 'pp'
Opening video filter: [lavc=6:25.000]
Opening video filter: [expand w=480 h=576 x=-1 y=-1 osd=1]
Expand: 480 x 576, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [scale w=480 h=432]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
AO: [mpegpes] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Starting playback...
This file was encoded with libavcodec build 4655
VDec: vo config request - 480 x 360 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
VO: [mpegpes] 480x576 => 768x576 Mpeg PES
A:   1.0 V:   1.0 A-V: -0.002 ct: -0.043   25/ 25  11% 21%  1.2% 0 0 98%
Exiting... (Quit)


This is the output of the failing "dvbscale," try with newer mplayer:

[user at host]# mplayer -v -vo mpegpes -ao mpegpes \ 

  -vf dvbscale,scale=-1:0,expand=-1:576:-1:-1:1,lavc=6:25.000  video.avi 

Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MPlayer dev-CVS-030514-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: this codecs.conf is too old, 
incompatible with this mplayer rele
ase! at line 6
Reading /usr/local/etc/mplayer/codecs.conf: 55 audio & 144 video codecs
CommandLine: '-v' '-vo' 'mpegpes' '-ao' 'mpegpes' ' ' '-vf' 
'dvbscale,scale=-1:0,expand=-1:576:-1:-1:1,lavc=6:25.000' 'video.avi'
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
Font /root/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
get_path('input.conf') -> '/root/.mplayer/input.conf'
Parsing input config file /root/.mplayer/input.conf
Input config file /root/.mplayer/input.conf parsed : 50 binds
Setting up LIRC support...
get_path(' .conf') -> '/root/.mplayer/ .conf'

Playing
Not an URL!
File not found: ' '
Failed to open

get_path('video.avi.conf') -> '/root/.mplayer/video.avi.conf'

Playing video.avi
Not an URL!
[file] File size is 735977236 bytes
STREAM: [file] video.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x138
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 154822   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  480 x 288
list_end=0xD4
==> Found video stream: 0
======= STREAM Header =======
Type: vids   FCC: DIVX (58564944)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25000000/1000000 = 25.000
Start: 0   Len: 154822
Suggested BufferSize: 0
Quality -1
Sample size: 0
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 480
   biHeight 288
   biPlanes 1
   biBitCount 24
   biCompression 1482049860='DIVX'
   biSizeImage 414720
===========================
Regenerating keyframe table for DIVX 4 video
list_end=0x138
==> Found audio stream: 1
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 24000/1 = 24000.000
Start: 0   Len: 148616370
Suggested BufferSize: 0
Quality -1
Sample size: 1
found 'wf', 16 bytes of 18
======= WAVE Format =======
Format Tag: 80 (0x50)
Channels: 2
Samplerate: 48000
avg byte/sec: 24000
Block align: 1
bits/sample: 16
cbSize: 0
list_end=0x18C
hdr=Software  size=64
Software  : transcode-0.6.1
Broken chunk?  chunksize=1632  (id=JUNK)
list_end=0x2B92864C
Found movie at 0x800 - 0x2B92864C
Reading INDEX block, 309644 chunks for 154822 frames (fpos=0x2b928654)
AVI index offset: 0x0 (movi=0x800 idx0=0x800 idx1=0xE1C)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
AVI: Searching for audio stream (id:1)
XXX initial  v_pts=0.000  a_pos=0 (0.000)
AVI video size=579849638 (154822) audio size=148616370 (148616370)
VIDEO:  [DIVX]  480x288  24bpp  25.00 fps  749.0 kbps (91.4 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:480x288  fps:25.00  ftime:=0.0400
Clip info:
  Software: transcode-0.6.1
get_path('sub/') -> '/root/.mplayer/sub/'
get_path('default.sub') -> '/root/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer II, 48000 Hz 192 kbit Stereo, BPF: 576
Channels: 2, copyright: No, original: No, CRC: Yes, emphasis: 0
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 24000->192000 (192.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Opening /dev/dvb/adapter0/video0+audio0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 
and bps = 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
AO: [mpegpes] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: DVB audio output
AO: Author: A'rpi
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 
and bps = 2
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 
and bps = 2
Starting playback...
This file was encoded with libavcodec build 4655
[ffmpeg] aspect_ratio: 2.222222
VDec: vo config request - 480 x 288 (preferred csp: Planar YV12)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vop scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
Opening video filter: [lavc]
Trying filter chain: lavc vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.22:1 - prescaling to correct movie aspect.
VO Config (480x288->640x288,flags=0,'MPlayer',0x32315659)
REQ: flags=0x103  req=0x0
VO: [mpegpes] 480x288 => 640x288 Mpeg PES
VO: Description: Mpeg-PES to DVB card
VO: Author: A'rpi
*** [lavc] Allocating mp_image_t, 480x288x12bpp YUV planar, 207360 bytes
*** [vo] Exporting mp_image_t, 480x288x0bpp RGB packed, 0 bytes
*** [lavc] Allocating mp_image_t, 480x288x12bpp YUV planar, 207360 bytes
Uninit audio filters...-0.002 ct: -0.043   25/ 25   3% 16%  0.8% 0 0 0%
[libaf] Removing filter dummy
uninit audio: mp3lib
uninit video: ffmpeg
DEMUXER: freeing demuxer at 0x84cfe58
vo: x11 uninit called but X11 not inited..

Exiting... (Quit)


And a small glitch in the man page for dvbscale, the parameter example 
uses word splitting in the option "dvb-scale", but that only mentioned 
for completeness.

Apart from making me fear to never play back my divx without eggheads,
i strongly feel mplayer will last for much longer than expected :-)

Great work and support :-)

Regards Onno



More information about the MPlayer-advusers mailing list