Am Mittwoch, 24. Februar 2010 13:38:10 schrieb Georg Martius:
Hi Georg,
> > Is it possible to make the center of the zoom not in the middle. In my
> > sample video the borders are different.
>
> No, this it not possible. I would rather cut off more then less, but you
> have to check your clips.
> Actually there would be a way, which is to first transform (translate) the
> image to the right position (which works in principle with the transform
> plugin with a handmade .trf file and smoothing=0,relative=0,optzoom=0), but
> I think it is not worth it.
ok
> > I know, that my sample video is a problematic one, but I am not fully
> > convinced of the result. No idea, if the statues in the rock could get
> > more "quiet".
>
> I believe that this is the maximum you can get with this source. Do you
> understand why the statues still appear to be a bit shaky?! The point is
> that your camera captures unsharp frames while the camera is moved. The
> stabilization cannot do anything against this, this is a problem of a too
> long exposure time of your camera.
ok
> > I tried another sample (17MB zooming off a boat) too
> >
> > publicfiles.pinguin.uni.cc/test_0002.avi
> > to access use transcode / transcode
> Here the problem is that there is low contrast on large areas of the image.
I understand, but did you see the sample with the flowing river? I think there
is a lot of contrast
> You can see what the stabilizer is doing with
> transcode -J stabilize=show=1,preview ....
> You see the squares which are the measurement fields and the small white
> dot marks is the detected movement to the previous frame. Try:
> transcode -J stabilize=fieldnum=40:mincontrast=0.3:show=1,preview -i
> test_0002.deinter.avi -x ffmpeg -y null,null -o dummy
> and then you might disable the rotational stabilization with
> transform=maxangle=0....
Hmmh, so there is no simple way to stabilize thousands of small scenes
automatically.
Assuming I use zoom=10, when I stabilize a video. How do I remove the border,
when I do _not_ stabilize the clip, but want the border removed only?
I also found a problem with very small clips, about 270kB. The script hangs
with very small files, creating the deinterlaced version.
________________________________________________________________
#!/bin/bash
cd "$1"
TOPIC=`basename "$1"`
SOURCEDIR=`pwd`
STABLEDIR=`dirname "$SOURCEDIR"`"_stable/"`basename "$SOURCEDIR"`
mkdir -p "$STABLEDIR"
find "$1" -type f -name '*.avi' | sort | \
while read -r FILE; do
echo
echo "-------------------------------------------------"
echo "$FILE"
echo "-------------------------------------------------"
echo
DEINTERFILE="$STABLEDIR""/"`basename "$FILE" | \
sed 's/\.avi/.\deinter/'`
transcode -J smartdeinter -i "$FILE" \
-x ffmpeg -y ffmpeg,tcaud -F ffv1 -o "$DEINTERFILE"
done
cd "$STABLEDIR"
find "$STABLEDIR" -type f -name '*.deinter' | sort | \
while read -r FILE; do
echo
echo "-------------------------------------------------"
echo "$FILE"
echo "-------------------------------------------------"
echo
transcode -J stabilize -i "$FILE" \
-x ffmpeg -y null,null -o dummy
done
find "$STABLEDIR" -type f -name '*.deinter' | sort | \
while read -r FILE; do
echo
echo "-------------------------------------------------"
echo "$FILE"
echo "-------------------------------------------------"
echo
STABLEFILE="$STABLEDIR""/"`basename "$FILE" | \
sed 's/\.deinter/_stable\.avi/'`
transcode -J transform=zoom=10:smoothing=20 -i "$FILE" \
-x ffmpeg -y ffmpeg,tcaud -F ffv1 -o "$STABLEFILE"
rm "$FILE"".trf"
rm "$FILE"
done
________________________________________________________________
Any idea, what could I do, that the script doesn't hang with these small
files? Is this because ffv1 is experimental?
You are welcome to send me a private mail, especially to discuss some samples
or if you want me to to provide you with other samples, where the
stabilization doesn't work.
Al