Stabiliser l'image

Forum sur Openshot en français.

Moderator: Cenwen

Stabiliser l'image

Postby rmanf30 » Tue May 08, 2012 4:15 pm

J'ai pour projet, d'acheter une caméra pour filmer certaines de mes sorties à VTT.
J'ai déjà fais quelques essais et l'image bouge beaucoup. :?

Existe t'il un effet permettant de stabiliser l'image.
OS : UBUNTU 12.04
Editeur Vidéo : OpenShot 1.4.2 (.../jonoomph/openshot-ege/...)
Proc : Intel Core i7 860 - Mémoire : 6 Gio - Vidéo : 1920x1080
APN : PANASONIC Lumix TZ7 (AVCHD Lite) - Caméra : SONY HandyCam HDR-CX105 (AVCHD 1080i)
User avatar
rmanf30
New member
 
Posts: 10
Joined: Thu Dec 30, 2010 7:03 pm

Re: Stabiliser l'image

Postby Cenwen » Fri May 11, 2012 9:28 pm

Non et non. :shock:
Non en tant qu'effet, les frei0r n'offrent pas ça.

Non mais on y travaille. Les 1eres tentatives non pas été fructueuses.

Ce filtre pourrait t'aider. Regarde cette demande (et surtout les vidéos associées qui pourraient t'interresser) : https://bugs.launchpad.net/openshot/+bug/586777

L'auteur de ce filtre, Georg est en train de le porter (depuis plusieurs mois déjà) sur FFmpeg mais lui aussi il le fait sur son temps libre , et celui-ci est aussi limité.

Je suis en train de voir si je peux créer quelque chose en stand-alone pour pouvoir le porter sur Openshot ensuite. Mais rien n'est moins sur,je ne suis qu'un débutant et c'est une grosse fonctionnalité. Jonathan essaie aussi de son coté avec un autre filtre mais lui aussi il est trés occupé à son travail en ce moment. A moins que l'on le porte directement, si c'est celui-qui sera retenue.
En ce qui me concerne, rien n'est sure. Pour l'instant, mon principal probleme est un manque cruel de temps (2 boulots, une maison, des journées de 12/13 heures, j'ai meme du mal à venir ici.

On verra la tournure que ça prendra pour le type de filtre utilisé. Pour l'instant, on ne sait pas.
Le jour où j'ai découvert le libre, j'ai su que je ne reviendrai jamais en arrière
Mon blog sur le multimédia, la photo et Openshot : http://linuxevolution.wordpress.com/
Google+ : https://plus.google.com/u/0/111472725110173916234/posts
User avatar
Cenwen
Moderator
 
Posts: 1609
Joined: Wed Nov 18, 2009 4:07 pm
Location: Clermont-Ferrand-Auvergne-France

Re: Stabiliser l'image

Postby hvdwolf » Sat May 12, 2012 11:52 am

excusez-moi: Je peux lire le français mais mon français est très mauvais.... so I continue in English and someone can hopefully translate if necessary.
(better an answer in english than no answer in french :))
I use the vid.stab plugins for transcode to stabilize or "deshake" my videos.
Both for "normal" clips but I also have some skiing clips that are very shaky, like the clips of the vid.fstab author.

So:
- install transcode on your linux system
- install the (current) 0.93 version binary plugins from <http://public.hronopik.de/vid.stab/features.php?lang=en> (EDIT: transcode comes with the 0.75 or 0.8 vid.stab plugins, depending on your linux/transcode version, but the 0.93 version is improved).
- do the conversion.

Or use one of my scripts, which I use from a folder with a couple of shaky movie clips:
For "normal" handheld video clips:
Code: Select all
#!/bin/sh

# Somehow the xvid4.cfg is not read from the transcode folder so copy it
# into our working directory
cp /usr/lib/transcode/xvid4.cfg .

for i in *.mp4;
do
  transcode -J stabilize -i "$i" -y null,null -o dummy
  transcode -J transform -i "$i" -y xvid,tcaud -w 13000 -b 192 -o "./${i%.mp4}-stabilized.mp4";
  touch -r "$i" "./${i%.mp4}-stabilized.mp4";
done;

# clean up
rm xvid4.cfg

As I work from .mp4 clips and want again .mp4 clips I add the -stabilized addition to the name (movie001.mp4 becomes movie001-stabilized.mp4).
Note that this will convert to xvid as that's the only "efficient" codec I can currently use. video bitrate is 13000, audo bitrate is 192. Change to whatever you like.
The "touch" command gives the output file the same time/date timestamp as the input file. As I have videos shot at various dates, I want the converted videos to have the same time/date stamp as the original and not the time/date timestamp of the moment of converting.

For very shaky clips (like the one taken during skiing for example):
Code: Select all
#!/bin/sh

# Somehow the xvid4.cfg is not read from the transcode folder so copy it
# into our working directory
cp /usr/lib/transcode/xvid4.cfg .

for i in *.mp4;
do
  transcode -J stabilize=shakiness=8 -i "$i" -y null,null -o dummy
  transcode -J transform=smoothing=30 -i "$i" -y xvid,tcaud -w 13000 -b 192 -o "./${i%.mp4}-stabilized.mp4";
  touch -r "$i" "./${i%.mp4}-stabilized.mp4";
done;

# clean up
rm xvid4.cfg


(Note: this will convert to mp4 with xvid video and mp3 audio, and mp3 is NOT supported according the .mp4 container standard. Most video players will still play it nicely.)
hvdwolf
The voice of Experience
 
Posts: 146
Joined: Sat Apr 21, 2012 1:13 pm
Location: Zwolle, Nederland

Re: Stabiliser l'image

Postby Cenwen » Sat May 12, 2012 12:37 pm

I must be off now so I've just read the body/head of this answer. I am too an Transcode user and I am in contact since several months with Georg, the creator of this great plugin like Transcode is an half dead to see if we can use it in our library.
Le jour où j'ai découvert le libre, j'ai su que je ne reviendrai jamais en arrière
Mon blog sur le multimédia, la photo et Openshot : http://linuxevolution.wordpress.com/
Google+ : https://plus.google.com/u/0/111472725110173916234/posts
User avatar
Cenwen
Moderator
 
Posts: 1609
Joined: Wed Nov 18, 2009 4:07 pm
Location: Clermont-Ferrand-Auvergne-France

Re: Stabiliser l'image

Postby hvdwolf » Sat May 12, 2012 1:08 pm

Cenwen wrote:I am too an Transcode user and I am in contact since several months with Georg, the creator of this great plugin like Transcode is an half dead to see if we can use it in our library.

Now that would be awesome! I know that Georg is working on an ffmpeg plugin. This would make it even simpler to use it directly from openshot.
(Sorry for the english :( )
hvdwolf
The voice of Experience
 
Posts: 146
Joined: Sat Apr 21, 2012 1:13 pm
Location: Zwolle, Nederland

Re: Stabiliser l'image

Postby Cenwen » Sat May 12, 2012 7:51 pm

Now that would be awesome! I know that Georg is working on an ffmpeg plugin. This would make it even simpler to use it directly from openshot.
(Sorry for the english :( )


Ah ah you speak several languages. :D French, English, German...

That's sound good. Your script will help me. It was missing me some details and good the tips (i.e. touch command). I was not aware that you could use it with mp4 files.
Under with the mp4/avid/xvid/dvix/mpeg1/2 formats which other can you use it ?

If you don't want to speak more here or if you want to send me a MP, here my address : http://www.openshot.org/developers/

Do you know Georg Martius too ? well ?

Now that would be awesome! I know that Georg is working on an ffmpeg plugin. This would make it even simpler to use it directly from openshot.
(Sorry for the english :( )


I'm thinking that yes and on our last meeting (the core developers) I have given like advice to Jonathan that it will be better to use this plugin instead of this one of MLT and to include the Georg 's plugin in our library (called libopenshot). When I spoke with Georg on the Transcode mailing list and in MP after, the biggest problem was that Transcode doesn't use the "modern format" and asked him if he was agree to port it on FFmpeg. He was agree because he got the same conclusion like me. Only FFmpeg can manage this modern format.

I must send him soon a mail and asked him something else.

You have the video on his website (bicycle and ski) very impressive but theses are more tremendous.

This one is without stabilization and stabilization. :shock:



And this one stabilized with his plugin and Transcode.
I said just Whaouuu.



For me this feature is so great like the Title animated 3D and useful for the user. Even an hardware is included on Mobile devices and camcorder, it is not enough and you have often jiggled videos.

Ah another bunch of video (pour vous ouvrir l'appetit). That's come (d'une manière ou d'une autre) in the Openshot project at term.



Here you have the both (not stabilized on the left and the same stabilized on the right)
http://public.hronopik.de/vid.stab/files/skivideo1_cmp.avi

Here the bicycle in the same disposition (left=>not stabilized, right=>stabilized
http://public.hronopik.de/vid.stab/files/cycling_krete_cmp_small.avi

I have done some modification on an error in this French blog Entry (http://blog.roozeec.fr/2012/03/29/stabiliser-les-videos-de-camescope-sous-linux/)
An error of a article linked in this blog entry saying that the plugin of mlt was this one of vid.stad and like that not True, I can not resist to restore the True. :roll:
Le jour où j'ai découvert le libre, j'ai su que je ne reviendrai jamais en arrière
Mon blog sur le multimédia, la photo et Openshot : http://linuxevolution.wordpress.com/
Google+ : https://plus.google.com/u/0/111472725110173916234/posts
User avatar
Cenwen
Moderator
 
Posts: 1609
Joined: Wed Nov 18, 2009 4:07 pm
Location: Clermont-Ferrand-Auvergne-France

Re: Stabiliser l'image

Postby hvdwolf » Sun May 13, 2012 1:42 pm

Cenwen wrote:Under with the mp4/avid/xvid/dvix/mpeg1/2 formats which other can you use it ?

transcode is indeed almost dead and doesn't support the modern h.264 format, hence the use of xvid in my scripts. xvid is the next best option. I don't use mpeg2 or mpeg1.

Cenwen wrote:Do you know Georg Martius too ? well ?

No, I don't. I did have some mail exchange with him. I'm still on Mac OS X, but after about 5 years I will make the switch back to Linux (which I have used since 1994). I'm now exploring the possible video editors on linux again, and that's both Openshot and Kdenlive.
I simply mentioned to Georg that his plugins also works on Mac OS X, be it that they need some "tweaking" to get them running, but that they work great. (I'm currently maintainer of a couple of packages on Mac OS X and I used to be the avidemux maintainer on OSX until end of 2010. That's where my video experience comes from. I did write two programs of my own too for both MacOSX and linux but that's not relevant here).

Only a few days ago I "talked" to Georg again because of my linux video editor experiments and then he mentioned to me that he thought to need another month to port his plugins to ffmpeg. Of course it will then be in the ffmpeg development trunk and not in the stable version but that's just a matter of time.
hvdwolf
The voice of Experience
 
Posts: 146
Joined: Sat Apr 21, 2012 1:13 pm
Location: Zwolle, Nederland

Re: Stabiliser l'image

Postby Cenwen » Sun May 13, 2012 8:31 pm

OUpsss sorry for this mistake. :roll: I don't know why (because you have said that you were knowing Georg,) I was thinking that you were German too. But you are living in Netherlands.

It is very interesting for us to know that and especially if you know how to create a package (.img ? ) for MAC OS. Could you be able to do that for us ( a program in C++ and another in Python=>PyGTK) and perhaps for somebody else in PyQT ?

To my opinion for the state of Transcode, the main think to be reborn this project will be to have a new leader motivated with a small team (who have said like us ? :o ). A lot of things shoud be done after but it is the main condition before. I am pretty sure that this project had a role to play, especially I know that's a fork of ffmpeg birded who is in Ubuntu and Medibuntu repository (but not in sven PPA). Are you aware of that ? Theses days this new have been a bomb in the French community. See that on the ffmpeg mailing list : http://ffmpeg-users.933282.n4.nabble.com/How-to-get-good-x264-compression-td4621261.html.
Like you know Transcode better than me, do you know if we can convert a format audio (for sample a mp3 file) in another one (for sample a ogg file) ? I have not find that on the huge archives of the mailing either in the documentation. Are you too subscribe in the mailing list ?
Le jour où j'ai découvert le libre, j'ai su que je ne reviendrai jamais en arrière
Mon blog sur le multimédia, la photo et Openshot : http://linuxevolution.wordpress.com/
Google+ : https://plus.google.com/u/0/111472725110173916234/posts
User avatar
Cenwen
Moderator
 
Posts: 1609
Joined: Wed Nov 18, 2009 4:07 pm
Location: Clermont-Ferrand-Auvergne-France

Re: Stabiliser l'image

Postby hvdwolf » Mon May 14, 2012 6:01 am

By now this post is very off topic. I will reply in a personal mail to you.

Cenwen wrote:Like you know Transcode better than me, do you know if we can convert a format audio (for sample a mp3 file) in another one (for sample a ogg file) ? I have not find that on the huge archives of the mailing either in the documentation. Are you too subscribe in the mailing list ?

Actually I don't have much experience with transcode. Currently I only used it for the stabilizing plugins. For the rest I always use ffmpeg or handbrake.

I tried however with: transcode -J transform -i inputmovie -y xvid,off -w 13000 -b 160 -o outputmovie.mp4. This seemed to work but the resulting video wasn't playable. VLC tried to play it but the video was distorted and it didn't play the audio. Other players did even worse.
hvdwolf
The voice of Experience
 
Posts: 146
Joined: Sat Apr 21, 2012 1:13 pm
Location: Zwolle, Nederland

Re: Stabiliser l'image

Postby rmanf30 » Wed May 16, 2012 8:36 am

Merci beaucoup pour vos réponses,

Merci également pour tout le travail que vous fournissez afin de nous livrer un produits performant.
Cette fin de semaine je part en voyage, dès mon retour je vais essayer d'assimiler vos explications. ;)
OS : UBUNTU 12.04
Editeur Vidéo : OpenShot 1.4.2 (.../jonoomph/openshot-ege/...)
Proc : Intel Core i7 860 - Mémoire : 6 Gio - Vidéo : 1920x1080
APN : PANASONIC Lumix TZ7 (AVCHD Lite) - Caméra : SONY HandyCam HDR-CX105 (AVCHD 1080i)
User avatar
rmanf30
New member
 
Posts: 10
Joined: Thu Dec 30, 2010 7:03 pm

Re: Stabiliser l'image

Postby Cenwen » Thu May 17, 2012 8:27 pm

Openshot n'est pas parfait, nous le savons. Mais nous y travaillons ................quand nous pouvons. Ce sont les joies du volontariat. Mais il se bonifie au fil du temps comme un bon vin.

Bonnes vacances pas trop belles. :evil: Je dirais plutot trop arrossées. :evil: :evil:
Le jour où j'ai découvert le libre, j'ai su que je ne reviendrai jamais en arrière
Mon blog sur le multimédia, la photo et Openshot : http://linuxevolution.wordpress.com/
Google+ : https://plus.google.com/u/0/111472725110173916234/posts
User avatar
Cenwen
Moderator
 
Posts: 1609
Joined: Wed Nov 18, 2009 4:07 pm
Location: Clermont-Ferrand-Auvergne-France


Return to Francais

Who is online

Users browsing this forum: No registered users