[mythtv] [PATCH]Black border filter

Cedric Tefft cedric at phreaker.net
Wed Sep 1 12:20:42 EDT 2004


Kristof Pelckmans wrote:

>>Sounds like a good idea.   Unfortunately, I wasn't able to get it do to
>>anything.  I was somewhat confused by the explanation of the parameters...
>>    
>>
>
>Ok, I've overlooked one, I'll try again :
>
>example :
>blackborder=0:70:76:430:18:20,blackborder=0:40:46:490:18:20
>
>The first filter detects a 16:9 video stream in a 4:3 capture stream
>and the second is for a 14:9 video stream in a 4:3 capture stream.
>
>The different parameters :
>1) 0 for horizontal, 1 for vertical (not implemented)
>2) start line for detection of first line of video
>3) end line for detection of first line of video
>4) number of lines to consider when a black border is found
>   this number depends on the aspect ratio you are looking for and the width of
>the video - I guess expressing this as an aspect would make it more general...
>5) 'black' pixel threshold : all pixels below this threshold will be
>   considered as black
>   range : from 0 to 255, 0 for a black pixel, 255 for a white pixel
>6) 'black' line threshold : minimum number of black pixels that have to be
>   present to consider a line 'black'
>   range : from 0 to video capture width - see comment below
>  
>
Hmm... still no effect as far as I can see.  I've played around with 
different sets of parameters, but nothing seems to have any effect.  
Even using parameters which I believe should force it to crop the frame 
excessively, it doesn't look like the frame is being altered at all:

blackborder=0:30:35:200:255:1

frontend output is:

2004-09-01 08:10:14 mythfrontend version: 0.15.20040528-1 www.mythtv.org
2004-09-01 08:10:14 Enabled verbose msgs : important general
2004-09-01 08:10:15 Registering Internal as a media playback plugin.
2004-09-01 08:10:15 Registering MythMusic Media Handler as a media handler
2004-09-01 08:10:15 Starting media monitor.
2004-09-01 08:10:18 All Programs
2004-09-01 08:10:19 Connecting to backend server: 127.0.0.1:6543 (try 1 
of 5)
2004-09-01 08:10:19 Using protocol version 13
2004-09-01 08:10:19 Using protocol version 13
2004-09-01 08:10:20 Opening OSS audio device '/dev/dsp'.
2004-09-01 08:10:20 Audio fragment size: 4096
filter_blackborders: Initialize filter (0x41fff1c0) start : 30, end : 
352004-09-01 08:10:20 Using XV port 145
2004-09-01 08:10:21 Changing from None to WatchingPreRecorded
filter_blackborders: counter init : 0
2004-09-01 08:10:31 Changing from WatchingPreRecorded to None
2004-09-01 08:10:31 Changing from None to None
Not removing top-most widget

>
>Internally it is converted to percentage, but I didn't do it to not
>overcomplicate the parameters : that would make :
>blackborder=0:40:46:490:18:0.2
>
Still, I think the increased power of the filter would more than make up 
for the trickiness in the parm string.

>What output plugin are you using ? I have some code that grabs an image when
>you press pause so you can use it with The Gimp...
>  
>
Whatever the default is  ... the 'internal' one I guess.

- Cedric





More information about the mythtv-dev mailing list