[MPlayer-dvb] how to apply video-filters with mpegpes output

luukes luukes at gmx.at
Fri Apr 7 15:00:44 CEST 2006


Am Freitag, 7. April 2006 14:35 schrieb Nico Sabbi:
> luukes wrote:
> > hi
> >
> > thanks for your answer.
> >
> > my problem is not the scaling - that was just an -vf example. most of the
> > video-filters lead to a stuttering playback over my DVB-card while the
> > playback on X is fine.
> >
> > if i play my video without any video-filters, the playback is perfect.
> > mplayer -ao mpegpes -vo mpegpes myvideo.mpg
> >
> > so my question is - how to apply video-filters that i still get a smooth
> > playback?
> > mplayer -ao mpegpes -vo mpegpes -vf <filter> myvideo.mpg
> >
> > in my specific case i want to do some overlay with bmovl.
> >
> > all hints are welcome.
> > luk
>
> when you apply filters you have to decode+filter+re-encode to mpeg2,
> so if your computer isn't fast enough you will notice slowdowns
>

hi nico and juri!

i'm aware of the reencoding but i thought that should not be a
problem with a brand-new P4 2,8Ghz. 'top' tells me that mplayer
consumes 15 to 20% CPU-time - the CPU is 80% idle most of the
time.
at first i thought the bmovl-filter causes the slowdown, but
it doen't matter which filter i use.

i attached some verbose output (MPEG2 PAL video) that shows that mplayer
tries to arrange a working filter-chain. from the output it seems that
the filter should not work, but i see the overlay from bmovl.

thanks
lukas

# /usr/bin/mplayer -v -vo mpegpes -ao mpegpes -vf bmovl=0:0:/tmp/fifo 
test_pal.mpg

[...]
MPEG-PS file format detected.
Searching for sequence header... OK!
VIDEO:  MPEG2  720x576  (aspect 2)  25.000 fps  4000.0 kbps (500.0 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
[...]
==========================================================================
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 MMX optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer II, 44100 Hz 192 kbit Stereo, BPF: 627
Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Opening /dev/dvb/adapter0/video0+audio0
Opening video filter: [bmovl=0:0:/opt/allegra/comm/cmds]
vf_bmovl: Opened fifo /opt/allegra/comm/cmds as FD 7
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Trying filter chain: bmovl 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 bmovl vo
Opening video filter: [lavc]
Trying filter chain: bmovl lavc 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 bmovl lavc vo
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
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
AO: [mpegpes] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: DVB audio output
AO: Author: A'rpi
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...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Trying filter chain: bmovl lavc vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (720x576->768x576,flags=0,'MPlayer',0x32315659)
REQ: flags=0x101  req=0x0
[mpeg1video @ 0x85dc948]removing common factors from framerate
REQ: flags=0x103  req=0x0
VO: [mpegpes] 720x576 => 768x576 Mpeg PES
VO: Description: Mpeg-PES to DVB card
VO: Author: A'rpi
*** [bmovl] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [bmovl] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [lavc] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [vo] Exporting mp_image_t, 720x576x0bpp RGB packed, 0 bytes
*** [bmovl] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
MPEG Stream reached EOF-0.010 ct:  0.008 1122/1122  7% 35%  0.7% 0 0
ds_fill_buffer: EOF reached (stream: video)
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
EOF code: 1  45.3 A-V: -0.010 ct:  0.007 1122/1122  7% 35%  0.7% 0 0

Uninit audio filters...
[libaf] Removing filter dummy
uninit audio: mp3lib
uninit video: libmpeg2
vo: x11 uninit called but X11 not inited..

Exiting... (End of file)




More information about the MPlayer-dvb mailing list