hi, this patch is a  workaround (temporary,  until the bug is ever solved)

Note that this patch has a very high value cropdetect=80
the reason is that, in many Italian channels, there is a series of
"bits" transmitted on top of the vide frames, and those foul the
cropdetection otherwise.

a.

A Mennucc ha scritto:
> hi everybody,
> 
> I am informing you of an annoying bug I just noted re: cropdetect in
> reencoding.
> 
> First of all, some history. Some time ago (~1 year) I prepared a snippet
> of code for freevo , that nowadays sits inside the reencoding service:
> when you ask freevo to  reencode a video, the freevo 'encodingserver'
> tries to detect cropping; the command to do that is (more or less)
>   'mplayer -vf cropdetect -vo null -nosound  -sstep S video'
> where S was prepared so as to get ~20 frames at reasonable spacing in
> the video, so as to be fast but also to sample around the video to get
> good cropping parameters. At the time I wrote that code, it worked as a
> charm.
> 
> But in the recent past I realized that on all TV shows that I am
> recording and reencoding, cropping was never done... for some time I
> thought that this was due to commercials, that are not letterboxed, and
> foul the crop detection; but after a lot of fiddling around, I  found
> out that actually 'mplayer -sstep S' is broken; if I use it on any video
> in my freevo box, no frames are output on screen. The bug is already
> reported in
> http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1228
> 
> What to do? looking around, I found that an alternative way to achieve
> the same result is
> 'mplayer -vf framestep=I,cropdetect -vo null -nosound  video'
> but unfortunately it is much much slower, and the RPC connection between
> client and encodingserver times out before it ends; I am tring to find a
> workaround.
> 
> a.

--- encodingcore.py~1.8.3+svn	2009-01-10 18:43:09.000000000 +0100
+++ encodingcore.py	2009-01-11 17:38:20.000000000 +0100
@@ -411,9 +410,7 @@
         else:
             sstep = 60
 
-        arguments = self.timeslice_mencoder + [ "-vf", "cropdetect=30", "-nosound", "-vo", "null", "-fps", "540"]
-        if sstep > 0:
-            arguments +=  [ "-sstep", str(sstep)]
+        arguments = self.timeslice_mencoder + [ "-vf", "framestep=I,cropdetect=80", "-nosound", "-vo", "null", "-fps", "540", "-frames", "250"]
 
         if self.info.mime == 'video/dvd':
             arguments += [ '-dvd-device', self.source, 'dvd://%s' % self.chapter ]

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to