This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Image Stabilization

Tags: None
(comma "," separated)
oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Thu Nov 05, 2009 8:35 pm
MJ Peg:
> In the end I came up with the batch files I posted here :
> http://forums.virtualdub.org/index.php?act=ST&f=5&t=17772&st=15&hl=

Thanks, I think it is possible to move from MJ Peg's example to wine for an entire directory, ... I don't have time this week, but maybe in the next couple of weeks.

I note this works for one file if the terminal session is in the video directory (with deshake01.vcf (pass01) and deshake02.vcf (pass02) in same directory):
wine /path/to/virtualdub/VirtualDub.exe /c /s deshake01.vcf /p initial-video.avi temporary-video.avi /r /x
wine /path/to/virtualdub/VirtualDub.exe /c /s deshake02.vcf /p initial-video.avi final-output-video.avi /r /x

which is in essence what MJ Peg created. One next needs to sort the paths, and then set up a simple bash loop to do this for an entire directory. I've done that for ffmpeg, so the same should be true/doable with wine/VirtualDub. As noted, I don't have time to sort this now, but it should be viable.


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Thu Nov 05, 2009 8:37 pm
Re: Jerem's comment:
> conversion of the original video with ffmpeg into mjpeg avi

For this I use the following one line (it may appear wrapped in this forum, but it is just one line):

for i in *.mts; do ffmpeg -y -i "$i" -f avi -vcodec mpeg4 -b 8000000 -acodec ac3 -ab 128000 -s 1280x720 year_month_day_${i/%mts/avi}; done

where I have a directory of ".mts" files, and I have added the Year_month_day_in front of each file, converting it from a .mts to a .avi extension.

I still have not got around to looking for a wine/virtualdub/deshaker script.


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Thu Nov 05, 2009 8:59 pm
OK, further to my post above, ... I'm not very good at this, but I think something like this might work:

for i in *.avi; do wine /path/to/virtualdub/VirtualDub.exe /c /s deshake01.vcf /p $i temp.mp4 /r /x; wine /path/to/virtualdub/VirtualDub.exe /c /s deshake02.vcf /p $i deshaken_${i/%avi/mp4} /r /x; rm temp.mp4; done

In the above example one has a directory of video files with the .avi extension that one wishes to deshake. One also has the files deshake01.vcf and deshake02.vcf in the same directory as the .avi files (I have not sorted paths under wine). deshake01.vcf is pass01 of deshaker. deshake02.vcf is pass02 of deshaker.

After deshaking them with VirtualDub and deshaker, the final files ending up with a .mp4 extension and the words "dehaken_" in front of the file. ie if original file was "original.avi" the output file would be "deshaken_original.mp4".


Jerem
Registered Member
Posts
10
Karma
0

Re: Image Stabilization

Fri Nov 06, 2009 8:12 am
my scripts is like tour last post :


I have a file "Deshake" in ~/.gnome2/nautilus-scripts directory, with KDE, there must be something similar.

-------------------------------------------
#!/bin/sh
for arg
do
rm "/media/data/Logiciels/Scripts/deshaker/output.avi"
ffmpeg -i "$arg" -acodec libmp3lame -ab 128 -vcodec mjpeg -qmin 3 -qmax 3 "/media/data/Logiciels/Scripts/deshaker/input.avi"
wine "C:\\Program Files\\virtualdub\\VirtualDub.exe" /x /min /priority low /s "Z:\\media\\data\\Logiciels\\Scripts\\deshaker\\Deshaker.syl"
rm "/media/data/Logiciels/Scripts/deshaker/input.avi"
mv -f "/media/data/Logiciels/Scripts/deshaker/output.avi" "$arg"-stab.avi
done
notify-send -t 2000 -i /usr/share/icons/gartoon/scalable/apps/xfce-multimedia.svg "Deshake done" ""
-------------------------------------------



For each file passed in parameter, the script doing :
-delete the file previously created
-convert the file with ffmpeg to be recognized by VirtualDub
-deshake tempory file "input.avi" (the file converted by ffmpeg) to a file "output.avi"
-delete tempory file
-rename output file to original name + "-stab.avi"




Deshaker.syl :
-------------------------------------------

VirtualDub.Open("Z:/media/data/Logiciels/Scripts/deshaker/input.avi","",0);
VirtualDub.subset.AddFrame(0,30);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(0,0,1);
VirtualDub.video.SetIVTC(0, 0, 0, 0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("Deshaker v2.4");
VirtualDub.video.filters.instance[0].Config("12|1|30|4|1|0|1|0|640|480|1|2|1|400|400|400|1500|4|0|1|2|5|40|300|4|Z:\\media\\data\\Logiciels\\Scripts\\deshaker\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|15|15|5|15|0|0|30|30|0|0|1|0|1|0|0|10|1|15|1000|1|48");
VirtualDub.audio.filters.Clear();
VirtualDub.SaveAVI("Z:/media/data/Logiciels/Scripts/deshaker/tmp.avi");
VirtualDub.Close();
VirtualDub.Open("/media/data/Logiciels/Scripts/deshaker/input.avi","",0);
VirtualDub.subset.AddFrame(0,30);
VirtualDub.video.SetRange(500, 0);
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(0,0,1);
VirtualDub.video.SetIVTC(0, 0, 0, 0);
VirtualDub.video.SetCompression(0x44495658,0,10000,0);
VirtualDub.video.SetCompData(3532,"AAAAALwCAACQsggALlx2aWRlby5wYXNzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAABAAAABkAAAAZAAAAAEAAAAKAAAAAQAAABQAAAAAAAAAAAAAAAUAAAAFAAAABQAAAAAoCgAAAAAAAQAAAAEAAAAeAAAAAAAAAAIAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAEAAAAAAAAALAEAAAAAAAABAAAAHwAAAAEAAAAfAAAAAQAAAB8AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzwEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAA==");
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("Deshaker v2.4");
VirtualDub.video.filters.instance[0].Config("11|2|30|4|1|0|1|0|640|480|1|2|1|4000|4000|4000|1500|4|1|0|2|5|40|300|4|Z:\\media\\data\\Logiciels\\Scripts\\deshaker\\Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|15|15|5|15|1|1|30|30|0|0|0|0|1|0|1|10|1|15|1000|1|88");
VirtualDub.SaveAVI("Z:/media/data/Logiciels/Scripts/deshaker/output.avi");
VirtualDub.Close();
-------------------------------------------


You need to change one time all names ("Z:\\media\\data*" and "/media/data*")


It's not optimized, it's not the best way and the names are hard coded, but it works very well and it's simple.
However, it lacks the offset of the audio and I will add several sets of parameters for the second pass (to make differents outputs for each files)
oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Sat Dec 26, 2009 10:10 am
========
>> Any tips for getting deshaker to be recognized as a plugin in
>> virtualdub? I get an error saying it cannot load the module.
> Got deshaker working. Also had to use winetricks to install MFC42.DLL
========

I decided to put VirtualDub with the deshaker plugin on my 64-bit openSUSE-11.2 running on my Dell Studio 1537 laptop.

I encountered the same "can not load the module" error, and I found just using winetricks to install MFC42.DLL was insufficient. I also had to use a hint from the deshaker web site: http://www.guthspot.se/video/deshaker.htm which states: Important: If VirtualDub reports an error or if it can't load Deshaker correctly, you're most likely missing some required files. In that case, simply install the Microsoft Visual C++ 2005 SP1 Redistributable Package http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647

After installing that, VirtualDub running under wine was able to use the deshaker plugin.

I'm testing it now. Its interesting to note that the VirtualDub/deshaker performance under my DualCore P8400 Dell Studio 1537 laptop is significantly slower than under my Intel Core i7 920 desktop (as would be expected given the Intel Core i7 have 4 cores (eight virtual)).


markoc
Registered Member
Posts
342
Karma
1

Re: Image Stabilization

Sat Dec 26, 2009 5:10 pm
There is a mjpegtools component called "y4mstabilizer" that will do image stabilization.

It is less sophisticated than the "Deshaker", and to get optimum results from it, you must deinterlace and resample to 444 (which can be done in the same mjpegtools command line pipeline, you need to separately install y4mscaler however).
When I will be big, and have a lot of time, I will try to contribute code to it...


There was another project, or at least an attempt, called something like "yuvstabilizer", but somehow I can't google it out now... I think it was by a guy from Sweden... it used some advanced computer vision library...


Using some tools in Cinelera, a kind of image stabilzation can be obtained, too. But this is based on the tracking of a single object, which is less efficient, and will not give you full info about the camera motion.
oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Sat Dec 26, 2009 8:46 pm
I took notes during my last two VirtualDub installations under wine (with the deshaker plugin) and wrote them in in a brief How To Guide here: http://forums.opensuse.org/new-user-how-faq-read-only/unreviewed-how-faq/429428-howto-install-virtualdub-under-wine-deshaker-plugin.html

While that is an openSUSE Linux forum, I think most of what I did is applicable to all Linux versions.


oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Sun Dec 27, 2009 9:27 am
> There is a mjpegtools component called "y4mstabilizer" that will do image stabilization.

> It is less sophisticated than the "Deshaker", and to get optimum results from it,
> you must deinterlace and resample to 444 (which can be done in the same mjpegtools
> command line pipeline, you need to separately install y4mscaler however).

That is interesting to know. After reading your post I checked my openSUSE Packman packaged version of mjpegtools rpm and sure enough, included was /usr/bin/y4mstabilizer. With mjpegtools installed, by typing: "y4mstabilizer -h" one can learn a bit more about this mjpegtools stabilization package.

Edit: further to this, I note the mjpegtools mailing list has examples of the use of y4mstabilizer
http://sourceforge.net/mailarchive/forum.php?thread_name=1244141157.9699.66.camel%40hal9000&forum_name=mjpeg-users

There are examples in that thread of useage attempts ... I have not tried this so I can not comment on its use. The syntax from my copy and paste may not be good.


markoc
Registered Member
Posts
342
Karma
1

Re: Image Stabilization

Sun Dec 27, 2009 5:05 pm
Finally I found the other thing, it is called "yuv motion tools", and is from Denmark, not Sweden :-)

It is called YUV motion tools, for download see here:

http://vaults.atomicmonstergirls.net/useful/techworks/utilities/yuvmotiontools/

http://atomicmonstergirls.net/blog/2008/09/

and the project site is at

http://savannah.gnu.org/

but does not seem to be very active.

I remember that once it was accompanied with a rather long webpage containing an exhaustive descriprion and examples, but that I still cannot find.



I have downloaded it a few minutes ago, it compiled without problems, but will not work.
I fed it a DV clip through the suggested pipeline, but it just throws out an error and dies...
I'll try to contact the author...

markoc
Registered Member
Posts
342
Karma
1

Re: Image Stabilization

Tue Dec 29, 2009 7:55 am
I have contacted the author. He is a very nice guy, and has fixed the bug in no time.

Now this works, so we have another image stabilizing tool under Linux! It is based on the "openCV" computer vision libary.

He also pointed out that the english description page somehow got lost, only the danish version remains:

http://www.modspil.dk/itogtech/fri_software_og_multimedier__videostabilisering_med_yuv_motion_tools_og_mjpegtools.html
oldcpu_drupal
Registered Member
Posts
87
Karma
0

Re: Image Stabilization

Wed Dec 30, 2009 9:50 am
> He also pointed out that the english description page
> somehow got lost, only the danish version remains:

Too bad about no English version (for us who do not speak Danish). I note here a translator for Danish to English:
* http://www.translation-guide.com/free_online_translators.php?from=Danish&to=English
where one just copies the Danish web page URL into that translation tool.

Of course one has to then go and change the code that was inappropriately translated. And as in all such electronic/computer translations, the translation often does not make sense.


jmpoure_drupal
Registered Member
Posts
735
Karma
0

Re: Image Stabilization

Wed Dec 30, 2009 12:10 pm
If the motion stabilization effect is based on OpenCV you should be able to contact Frei0r developers and ask them to include the effect in Frei0r. They are very nice guys probably interested in this kind of tool. Or maybe the effect developer in Danemark would be interested to add the effect to Frei0r. You can create a ticket on Frei0r here: http://www.piksel.no/projects/frei0r/report and register the mailing list there: https://piksel.no/mailman/listinfo/frei0r-devel

When it is included in Frei0r, you can use it in Kdenlive. It is just a question of passing the information to the right persons.
markoc
Registered Member
Posts
342
Karma
1

Re: Image Stabilization

Fri Jan 01, 2010 12:20 pm
this really came as a surprise to me - some time ago I have installed "trasncode" on my suse 11.1 from the rpm repositories, but never knew it included a stabilizer...

Just typed

tcmodinfo -i stabilize

and

tcmodinfo -i transform

and saw that really it was here all the time!
keithclark_drupal
Registered Member
Posts
2
Karma
0

Re: Image Stabilization

Sat Jan 23, 2010 4:56 pm
I've tried the two stabilization commands as follows:

transcode -H0 -i INFILE -x mplayer,mplayer -J smartyuv=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1 -J stabilize -y null,null -o dummy
transcode -H0 -i INFILE -x mplayer,mplayer -J smartyuv=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1 -J transform -o OUTFILE -y ffmpeg,ffmpeg -F huffyuv

And my resulting file is just coloured snow. Here are my outputs from the two commands:

For the first statement: transcode -H0 -i INFILE -x mplayer,mplayer -J smartyuv=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1 -J stabilize -y null,null -o dummy

I get:

keithclark@HP1211N:~/Videos/Home Video/22 January 2010$ transcode -H0 -i VID00003.MP4 -x mplayer,mplayer -J smartyuv=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1 -J stabilize -y null,null -o dummy
transcode v1.1.4 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
[transcode] V: AV demux/sync | (1) sync AV at initial MPEG sequence
[transcode] V: import frame | 720x576 1.25:1 encoded @ UNKNOWN
[transcode] V: bits/pixel | 0.174
[transcode] V: decoding fps,frc | 25.000,0
[transcode] V: video format | YUV420 (4:2:0) aka I420
[transcode] A: import format | 0x2000 AC3 [48000,16,2]
[transcode] A: export | disabled
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame | 7680 (7680.000000)
[transcode] A: adjustment | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer | 10 @ 720x576 [0x2]
[transcode] A: audio buffer | 10 @ 48000x2x16
[import_mplayer.so] v0.1.2 (2007-11-01) (video) rendered by mplayer | (audio) rendered by mplayer
[filter_smartyuv.so] options=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1
[filter_smartyuv.so] (MMX) 0.1.6 (2007-05-31) Motion-adaptive deinterlacing
[filter_stabilize.so] v0.4.3 (2008-11-30) extracts relative transformations of
subsequent frames (used for stabilization together with the
transform filter in a second pass)
[filter_stabilize.so] Image Stabilization Settings:
[filter_stabilize.so] maxshift = 48
[filter_stabilize.so] stepsize = 2
[filter_stabilize.so] allowmax = 1
[filter_stabilize.so] algo = 1
[filter_stabilize.so] fieldsetup = 3
[filter_stabilize.so] fieldsize = 57
[filter_stabilize.so] result = VID00003.MP4.trf
[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null
[import_mplayer.so] mplayer -slave -hardframedrop -vo null -ao pcm:nowaveheader:file="/tmp/mplayer2transcode-audio.4HYsNd" "VID00003.MP4" > /dev/null 2>&1
[import_mplayer.so] tcextract -i /tmp/mplayer2transcode-audio.4HYsNd -x pcm -t raw
[import_mplayer.so] mplayer -slave -benchmark -noframedrop -nosound -vo yuv4mpeg:file=/tmp/mplayer2transcode-video.Kyaf3X "VID00003.MP4" -osdlevel 0 > /dev/null 2>&1
[import_mplayer.so] tcextract -i /tmp/mplayer2transcode-video.Kyaf3X -x yuv420p -t yuv4mpeg
[decoder.c] cancelling the import threads 0:00:32, (17| 0| 3)

[transcode] encoded 822 frames (0 dropped, 0 cloned), clip length 32.88 s



*************************************************************************

For the second statement: transcode -H0 -i INFILE -x mplayer,mplayer -J smartyuv=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1 -J transform -o OUTFILE -y ffmpeg,ffmpeg -F huffyuv

I get:

keithclark@HP1211N:~/Videos/Home Video/22 January 2010$ transcode -H0 -i VID00003.MP4 -x mplayer,mplayer -J smartyuv=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1 -J transform -o VID00003_STAB.MP4 -y ffmpeg,ffmpeg -F huffyuv
transcode v1.1.4 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
[transcode] V: AV demux/sync | (1) sync AV at initial MPEG sequence
[transcode] V: import frame | 720x576 1.25:1 encoded @ UNKNOWN
[transcode] V: bits/pixel | 0.174
[transcode] V: decoding fps,frc | 25.000,0
[transcode] V: video format | YUV420 (4:2:0) aka I420
[transcode] A: import format | 0x2000 AC3 [48000,16,2]
[transcode] A: export format | 0x55 MPEG ES Layer 3 [48000,16,2] 128 kbps
[transcode] V: export format | unknown (module dependant)
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame | 7680 (7680.000000)
[transcode] A: adjustment | 0@1000
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm
[transcode] V: video buffer | 10 @ 720x576 [0x2]
[transcode] A: audio buffer | 10 @ 48000x2x16
[import_mplayer.so] v0.1.2 (2007-11-01) (video) rendered by mplayer | (audio) rendered by mplayer
[filter_smartyuv.so] options=highq=1:diffmode=2:cubic=1:Blend=1:chromathres=4:threshold=8:doChroma=1
[filter_smartyuv.so] (MMX) 0.1.6 (2007-05-31) Motion-adaptive deinterlacing
[filter_transform.so] v0.4.4 (2008-12-06) transforms each frame according to transformations
given in an input file (e.g. translation, rotate) see also filter stabilize
[filter_transform.so] Image Transformation/Stabilization Settings:
[filter_transform.so] maxshift = -1
[filter_transform.so] maxangle = -1.000000
[filter_transform.so] smoothing = 10
[filter_transform.so] crop = Keep
[filter_transform.so] relative = True
[filter_transform.so] invert = False
[filter_transform.so] input = VID00003.MP4.trf
[export_ffmpeg.so] v0.3.18 (2008-11-29) (video) Lavc52.20.0 | (audio) MPEG/AC3/PCM
[import_mplayer.so] mplayer -slave -hardframedrop -vo null -ao pcm:nowaveheader:file="/tmp/mplayer2transcode-audio.LIQeMN" "VID00003.MP4" > /dev/null 2>&1
[import_mplayer.so] tcextract -i /tmp/mplayer2transcode-audio.LIQeMN -x pcm -t raw
[import_mplayer.so] mplayer -slave -benchmark -noframedrop -nosound -vo yuv4mpeg:file=/tmp/mplayer2transcode-video.1ZLzyO "VID00003.MP4" -osdlevel 0 > /dev/null 2>&1
[import_mplayer.so] tcextract -i /tmp/mplayer2transcode-video.1ZLzyO -x yuv420p -t yuv4mpeg
[export_ffmpeg.so] Using FFMPEG codec 'huffyuv' (FourCC 'HFYU', Lossless HUFFYUV codec).
[export_ffmpeg.so] No profile selected
[export_ffmpeg.so] warning: Error opening configuration file ./ffmpeg.cfg: No such file or directory
[export_ffmpeg.so] Starting 1 thread(s)
[export_ffmpeg.so] Set display aspect ratio to input
[huffyuv @ 0x20e5470]using huffyuv 2.2.0 or newer interlacing flag
[export_ffmpeg.so] warning: Usage of this module for audio encoding is deprecated.
[export_ffmpeg.so] warning: Consider switch to export_tcaud module.
[transcode] Audio: using lame-3.98.2
[decoder.c] cancelling the import threads 0:00:32, (17| 0| 3)

[transcode] encoded 822 frames (0 dropped, 0 cloned), clip length 32.88 s

mcfrisk
Registered Member
Posts
40
Karma
0

Re: Image Stabilization

Mon Jun 14, 2010 9:04 pm
I also tried the transcode and vid.stab commands above but all I get is these messages:

[filter_stabilize.so] warning: too low contrast! No field remains. Use larger fild size.

and a noise like output file. This was with transcode version 1.1.5 with vid.stab 0.75 patch.

Does anyone know a working transcode version with or without patches?




Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]