Tag Archives: mplayer

how to remove hard coded subtitles from movie

$ mplayer  FlashGordon1980.avi -vf delogo=40:235:450:50:1

This mplayer video filter (-vf) will blur a section of the screen. The first two numbers are the x and y coordinates for where to start the rectangle (the horizontonal, and vertical coordinates within the screen). The next two numbers are the width and height, the last number is the blur at the edge of the stated rectangle.

What I noticed at first is that it was hard to find where I was placing the rectangle when I started playing the movie. You should start by placing the box at the top, and moving it around, and use a -1 for the last value.. So.. to *start* … run this command..

$ mplayer  FlashGordon1980.avi -vf delogo=10:10:400:50:-1

This places a blurry rectangle accross your screen with a green border. Move it around by changing the first two values. When you know where you want it, make the last value be a positive integer.. such as..

$ mplayer  FlashGordon1980.avi -vf delogo=40:235:450:50:1

To see more.. try ‘man mplayer’ and search for \delogo..

       delogo[=x:y:w:h:t]
              Suppresses  a  TV  station  logo  by a simple interpolation of the surrounding pixels.  
              Just set a rectangle covering the logo and watch it disappear (and sometimes
              something even uglier appear - your mileage may vary).
                 x,y
                      top left corner of the logo
                 w,h
                      width and height of the cleared rectangle
                 t   Thickness of the fuzzy edge of the rectangle (added to w and h).  
                     When set to -1, a green rectangle is drawn on the screen to  simplify  finding  the  right
                     x,y,w,h parameters.

 

the Ted Bundy Killer WhaleThe Place
chanel espadrilles8 Scale Nitro Race Car With Pistol Grip Remote Control 220

how to join avi movies

mencoder -oac copy -ovc copy ./file1.avi ./file1.avi -o ./out.avi

That example may not place keyframes in- (you know how you use the arrow keys in mplayer to forward or rewind?)
For an example that would put in keyframes:

mencoder file1.avi file2.avi -oac copy -ovc lavc -o out.avi

For closer together keyframes:

mencoder file1.avi file2.avi -oac copy -ovc lavc -o out.avi -lavcopts keyint=5

This would change your output quality.

If you get an audio encoding error, you may have to choose an audio codec..

mencoder file1.avi file2.avi -oac pcm -ovc copy -o out.avi

If you don’t want to deal with keyframes, simply use the -forceidx option when you play the movie

mplayer -forceidx ./out.avi

What is mencoder?

mencoder is part of mplayer, you can install via yum on fedora core packages (as root)..

yum -y install mencoder

I had a lot of these to join.. so..
I made a perl script that I can use use without so much fuss.. one that I don’t have to tell it what the output file is going to be.
I put it in ~/bin/avijoin

#!/usr/bin/perl
use strict;

my $outfile = outfile();

my @arg = (qw(mencoder -oac copy -ovc copy), @ARGV, '-o',$outfile);

system(@arg) == 0 or die($?);

print "Wrote:\n$outfile";

exit;

sub outfile {
@ARGV or die('missing args');
my $outfile = $ARGV[0];
$outfile=~s/([^\/]+)\.(\w{1,5})$// or die;
my ($filename,$ext) = (uc $1,$2);
my $x=0;
$filename=~s/\W//g;
my $_outfile;

for(1){
$_outfile="$outfile/$filename$x.$ext";
last unless -e $_outfile;
$x++;
}
return $_outfile;

}

Make sure to chmod 0755 ~/bin/avijoin