Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Mplayer-plugin output blocky..




Hello Ari,

Hello Patrick,


What I mean by 'blockiness' is that when there's a lot of movement on
the screen
and there is an area of a particular color, I can seen that the area has
very easily
seen 'blocks'.

Maybe you can specify this 'blockiness' in some more detail. Are there
blocks with distorsions (e.g. black&white patterns) or are these blocks
someway not sharp or blury.

Well, I shot the TV with a digital camera and put the result here:
http://heechee.blogsite.org/tvshot.jpg

The shot is a small part of a frozen video. The blockines is apparent on the left side.
This looks worse than in reality, naturally.

As to your questions about encoding and playing:

ffmpeg -i 001.vdr -y -hq -b 1800 -ab 160 -f avi -vcodec mpeg4 -acodec mp3 -qmax 10 -4mv -deinterlace -pass 1 foo.avi
ffmpeg -i 001.vdr -y -hq -b 1800 -ab 160 -f avi -vcodec mpeg4 -acodec mp3 -qmax 10 -4mv -deinterlace -pass 2 foo.avi

logger: *** Starting mplayer.sh Version 0.8.4
logger: *** DEBUG: Variable CFGFIL has value "/usr/local/bin/mplayer.sh.conf"
logger: *** Use Option USERDEF at your own risk!
logger: *** Option DVDFiles not set correctly! You will not be able to play VCD/DVD
logger: *** INFO: Source Video has Resolution of 720 x 576 ...
logger: *** INFO: For Sqare Pixels we would scale to 1024 x 819 ...
MPlayer 1.0pre2-3.2.2 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton 1830 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file or directory
Reading config file /root/.mplayer/config
Reading /root/.mplayer/codecs.conf: Can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf
font: can't open file: /root/.mplayer/font/font.desc
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using Linux hardware RTC timing (1024Hz).
Can't open input config file /root/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config

Playing /data/avi/hercule_1800deint_test.avi
Cache fill: 0,00% (0 bytes) AVI file format detected.
VIDEO: [DIVX] 720x576 24bpp 25,000 fps 1800,2 kbps (219,8 kbyte/s)
==========================================================================
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: [lavc=5000:25.000]
Opening video filter: [expand w=720 h=576 x=-1 y=-1 osd=1]
Expand: 720 x 576, -1 ; -1 (-1=autodetect) osd: 1
Opening video filter: [scale w=720 h=576]
==========================================================================
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...
PLAYBACK STARTED
VDec: vo config request - 720 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.
SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
VO: [mpegpes] 720x576 => 768x576 Mpeg PES

The command encs up being:
/usr/local/bin/mplayer -vo mpegpes -ao mpegpes -afm 9 -vop lavc=5000:25.000,expand=720:576:-1:-1:1,scale=720:576 -cache 4096 -slave -nolirc -subpos 80 -sub-bg-color 0 -sub-bg-alpha 0 -quiet /data/avi/hercule_1800deint_test.avi

I use the (propritary & non-free) DivX libraries from divx.com for
encoding to MPEG4, as I made the experience, that they produce a better
quality at the same bitrate as ffmpeg. With a bitrate of about
1500kbit/s and a resolution of up to 1024x576 I never had any block
artefacts in the MPEG4 files.


Hmm, that's an idea.

Results:
(Only blockiness mentioned, of course the smaller kbit/s had other
effects as well.)
What are the "other effects", shortly?

Well, edges had noise in another scene, but I noticed that was actually there to begin with, and
after postprocessing there was bluriness where there used to be blockiness.


- For comparison I viewed the files with Xine on a computer monitor.
How about using mplayer (the exactly same binary as you use for DVB
output, if possible) to play the files on a computer monitor. I'm not
sure if the decoders, post-processors and their implementation in xine
and mplayer are the same.

Gmplayer on computer screen looked quite a bit like the TV output, but better. With Xine
the whole blockines disappeared when postprocessing was set to full. Couldn't do more than
enable/disable postprocessing in gmplayer, though.

 When I played any file with full postprocessing, there was no blockines.
 When I played the 1500/1800 kbit/s versions, with no postprocessing,
they had
  blockiness in them, 2500 had almost no blockiness.
So you see artefacts in the "low bitrate" files as well on your desktop.
This indicates, that the quality of the encoded video is not perfect.
That's strange as I never had artifacts in something I encoded with such
_high_ bitrates. Maybe you should consider using the DivX libs as I
mentioned above.

Well, I guess I partly messed it up because the 2500 kbit/s was not deinterlaced, and there's
interlaced text scrolling upwards. But still, I found that there was practically no difference
between 1800kbit/s+deint, 1800kbit/s(noint) or 2500kbit/s(noint).


Comments, suggestions? My hypothesis is that the MPEG-1 transfer rate of
my TT DVB-C 2.1
is not sufficient for playback You see, I tried setting the 5000kbit/s
rate to 10000kbit/s, and
the video started playing, hmm.. unevenly at those closing credits.
As far as I know, a bitrate of 10000kbit/sec and above is not possible
as the DVB hardware is to limited to play it smooth.
Maybe try 9000kbit/sec!

I guess that wasn't the problem.


Maybe the video
should be converted to MPEG-2 for playback?
Of course, that would be possible in theory. But you need a fast _and_
good MPEG2 endocer which can encode at least 25Frames/sec in a bitrate
below 10000kBit/sec. As far as I know, there exists only one MPEG2
encoder for linux at all: mpeg2enc, which is not as fast as required.
The last time I tested this, I used a 2.4GHz Pentium 4 with SMP _and_
hyperthreading and mpeg2enc made only 10-15fps. Ok, the output
resolution was 720x576 but you don't what much less as long as you want
a sharp picture.

That appears slow. The ffmpeg commands I list above run about real-time, that is,
if I have 30 min input video the two passes complete in about 60 min. Athlon XP 2500+.
I think Mpeg4 is supposed to be slower, right?

So in the end, either the encoding needs to be made better (adding kbit/s doesn't seem to help)
or postprocessing can be enabled for the result when played.


(*) There's more trapholes in the installation of this plugin than in
Swiss cheese.. and I fell in quite many of them. And the installation
instructions
are lousy. But still, it's in. :)

Maybe you could describe your problems and how you fixed them, so that
others can benifit of. I did not have much problems installing it, as
fas as I remember, but I use mplayer (selfcompiled) for a long time know.

Ok, I know, this will not help you to much, but maybe this will help you
to explain the problem in more detail to us.


Well, I
- put sources first in wrong directory (not VDR/PLUGINS/src) having no clue how plugins in VDR work
- messed up mplayer ./configure phase and *thought* I'd enabled DVB-output by enable-dvb, but it wasn't
enabled because I'd not put in the include dir for DVB HEAD (there's also another DVB include there
confusing innocent users that I ignored)
- used a lot of effort in vain to try to figure out why I got no video, and later noticed the grab.mpg
- had no idea for a long time what exactly is slave mode and how I enable it (OSD)
- didn't originally know I was supposed to get mplayer.sh written by somebody else

The problems in installation that still persist are
- still have no idea why the mplayer-plugin works if I start runvdr from a console, but doesn't work
if runvdr is run from /etc/inittab (it runs as root, secure, no, works, yes) (it's set to slave mode)
- I have fair chance of having VDR messed up when returning from playing an AVI. There's television
picture but VDR doesn't respond to LIRC, so I have to kill VDR manually; that's easy as by now
it's running on a console

I had more problems trying to get LIRC running. At least for mplayer I didn't have to recompile
the kernel.

BTW, I'd never really used Linux before I got this DVB card.. if that wasn't evident already :).

Ari




--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index