Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168012 - media-video/acidrip needs changes to work with recent mplayer
Summary: media-video/acidrip needs changes to work with recent mplayer
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-22 15:55 UTC by Daniel Gryniewicz (RETIRED)
Modified: 2008-06-10 15:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix acidrip to work with newer mplayer (acidrip-0.14-mplayer-compat.patch,1.59 KB, patch)
2007-02-22 15:57 UTC, Daniel Gryniewicz (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Gryniewicz (RETIRED) gentoo-dev 2007-02-22 15:55:53 UTC
recent mplayer has made some subtle changes to it's output that broke the regular expression parsing for both crop detection and for output of encoding status.  Attached is a patch to make acid rip work for me with mplayer-1.0_rc1-r2
Comment 1 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-02-22 15:57:44 UTC
Created attachment 110985 [details, diff]
Fix acidrip to work with newer mplayer

The -sstep 61 is just me being lazy; it looks like it used to divide the whole movie into 10 chunks and step that way, but every movie I've tried gets good crop detection within the first 10 minutes, and I didn't want to fix the length parsing.  Feel free to fix that portion correctly.
Comment 2 Alexis Ballier gentoo-dev 2007-04-15 12:27:27 UTC
this probably has to go upstream, but last release on sf.net is : September 25, 2004... so I dunno what to do here
Comment 3 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-04-15 13:17:31 UTC
Sure, that's why I posted it here.  Upstream appears to be dead, but it's a fairly minor set of changes just to track changes in mplayer, so I suspect it'd be fine if we kept it here.

I just wish there was a viable alternative to acidrip.
Comment 4 Alexis Ballier gentoo-dev 2007-04-15 13:39:36 UTC
(In reply to comment #3)
> Sure, that's why I posted it here.  Upstream appears to be dead, but it's a
> fairly minor set of changes just to track changes in mplayer, so I suspect it'd
> be fine if we kept it here.

then if you're using it, I have absolutely no objection that you commit the fix . As mplayer 1.0 rc1 is now stable everywhere, it can only help.

> I just wish there was a viable alternative to acidrip.

FWIW, there are some : dvdrip, ogmrip or winki
but I dunno what you mean by "viable" ;)
Comment 5 Chris 2007-06-07 19:34:31 UTC
(In reply to comment #3)
> Sure, that's why I posted it here.  Upstream appears to be dead, but it's a
> fairly minor set of changes just to track changes in mplayer, so I suspect it'd
> be fine if we kept it here.


(In reply to comment #3)
> Sure, that's why I posted it here.  Upstream appears to be dead, but it's a

FYI here is an email from a similar patch I had sent to Chris Phillips:

i'm no longer actively developing it to be honest, sorry... feel free to fork it...

tasmac at student dot gvsu dot edu wrote:
> Hi there,
>
> I'm not sure if you are still doing much with this anymore, but I
> thought I would send this to you anyway.  I like your program, but
> someone working on mplayer got bored, and changed the case of some of
> the letters in the output and so on.  This made acidrip's status window
> quit working.  Also, mplayer now seems to puke with the combination of
> parameters that you were using to find the crop window (if I remember,
> it was the -vo null). I changed a
> few things to make it work for me again, so I thought I would send the
> patch in case you would want it.
>
> Chris
>
>
>   ------------------------------------------------------------------------
>
> --- acidrip-0.14.old/AcidRip/acidrip.pm    2004-07-25 10:03:09.000000000 -0400
> +++ acidrip-0.14/AcidRip/acidrip.pm    2007-05-08 16:11:12.577283982 -0400
> @@ -358,7 +359,7 @@
>    return "$::settings->{'mplayer'} $menc{'dvdplay'} $menc{'chapter'} -v -v -dumpstream -dumpfile \"$menc{'cache'}\""
>      if $command eq "cache";
>  
> -  return "$::settings->{'mplayer'} $menc{'vf'} cropdetect $menc{'dvdplay'} -nosound -vo null $menc{'frames'} -nocache"
> +  return "$::settings->{'mplayer'} $menc{'vf'} cropdetect $menc{'dvdplay'} -nosound  $menc{'frames'} -nocache"
>      if $command eq "cropdetect";
>  
>    return "$::settings->{'mencoder'} $menc{'cache'} $menc{'audio'} $menc{'audio_track'} $menc{'af'} -ovc frameno -o frameno.avi"
> @@ -680,7 +681,7 @@
>      message( "Running " . get_command("cropdetect") );
>      open( CROP, get_command("cropdetect") . " 2>&1 |" );
>      while (<CROP>) {
> -      if ( $_ =~ /crop area.*\s(crop=\d*:\d*:\d*:\d*)/ ) { $crop{$1}++ }
> +      if ( $_ =~ /Crop area.*\s(crop=\d*:\d*:\d*:\d*)/ ) { $crop{$1}++ }
>        $crop_output .= $_;
>        gui_check($_);
>      }
> @@ -863,7 +864,7 @@
>      if ( $::settings->{'mencoder_pid'} = open( MENCODER, "$menc 2>&1 |" ) ) {
>        $/ = "\r";
>              while (<MENCODER>) {
> -        if (/^Pos:\s*(\d+).\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) {
> +        if (/^Pos:\s*(\d+).\ds\s+(\d+)f\s+\(\s*(\d+)%\)\s+(\d+.\d+fps)\sTrem:\s+(\d+min)\s+(\d+mb).+\[([\d:]+)\]/) {
>            if ( $1 ne $sec )  { $sec  = $1; $::widgets->{'menc_seconds'}->set_text( hhmmss($1) ) }
>            if ( $4 ne $fps )  { $fps  = $4; $::widgets->{'menc_fps'}->set_text($4) }
>            if ( $6 ne $size ) { $size = $6; $::widgets->{'menc_filesize'}->set_text($6) }
> @@ -912,7 +913,7 @@
>    'audio_mp3lame_options'   => 'abr:br=128',
>    'audio_lavc_options'      => 'acodec=mp3:abitrate=128',
>    'video_codec'             => 'lavc',
> -  'lavc_options'            => 'vcodec=mpeg4:vhq:v4mv:vqmin=2',
> +  'lavc_options'            => 'vcodec=mpeg4:vhq:v4mv:vqmin=2:autoaspect',
>    'divx4_options'           => '',
>    'xvid_options'            => '',
>    'vuv_options'             => '',
>
>   




Comment 6 Chris 2007-06-07 19:49:14 UTC
Dang, sorry about leaving all the garbage in that last comment.  I hit commit without thinking.  I see the reason for not being able to edit comments, but sometimes it _is_ embarrassing.
Comment 7 Evil Compile Person 2008-01-13 12:54:02 UTC
This packages also misses a "built_with_use mplayer encode" check and will thus randomly not build. Looks unmaintained, stale, broken.

treecleaners: might be a candidate :)
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2008-01-17 01:23:11 UTC
Seems fixable.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2008-05-15 13:18:42 UTC
dang, go ahead and please commit the fix if you use the software
Comment 10 Steve Dibb (RETIRED) gentoo-dev 2008-06-10 13:52:29 UTC
dang,

I applied a patch similar to yours, didn't change sstep like you did, don't know why we need it.  Anyway, worksforme.

In CVS as -r2
Comment 11 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-06-10 15:26:22 UTC
Thanks.

I'm not sure the sstep is still necessary; I was having problems with getting weird ssteps that resulted in not detecting a good crop.