OpenShot / openshot-qt

OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality video editing and animation solutions to the world.
http://www.openshot.org
Other
4.36k stars 544 forks source link

Does this software have image stabilization? #830

Closed kristof2626 closed 7 years ago

kristof2626 commented 7 years ago

System Details:

Issue Description and steps to reproduce:

DylanC commented 7 years ago

@kristof2626 - Not at the moment, although perhaps in the future it will. Thanks.

rzr commented 6 years ago

Let me crosslink to: https://answers.launchpad.net/openshot/+question/106932

Also it would worth to see how kdenlive implemented it and factorize this part if possible:

https://userbase.kde.org/Kdenlive/Manual/Project_Menu/Stabilize

shakaran commented 5 years ago

I am looking for this effect too since Youtube has been removed in August the feature to "Stabilize" the video. It is also called "Deshaking".

VirtualDub has this integrated also if you want check, a nice video is: https://www.youtube.com/watch?v=og4bVk6V7X8

:pray::pray::pray: Please reconsider open this feature and assign more high priority, a lot free open source youtubers will need this and openshot will gain a lot popularity for this.

See transcode too as tool (open source): http://public.hronopik.de/vid.stab/features.php?lang=en

This issue was already mentioned in 2010 in launchpad: https://answers.launchpad.net/openshot/+question/106932

Also see competency like "Filmora" implementing this feature already: https://filmora.wondershare.com/video-editing-tips/video-stabilization-solution.html

peanutbutterandcrackers commented 5 years ago

@rzr @shakarn - I don't think OpenShot will be implementing this feature anytime soon, if ever. while I admit it would be a great thing, there are far more serious things that need urgent attention. However, we are thankful for the links that you have provided and shall look into it if we ever get around to implementing said feature. In the meantime, I, personally, would be using said (and other) stabilization programs, and use the output as the footage to edit, in OpenShot.

Thank you for your suggestions. Please do keep on loving and supporting OpenShot.

ktown007 commented 4 years ago

FFmpeg has a stabilization filter vid.stab tutorial here: https://www.imakewebsites.ca/posts/2018/02/17/stabilizing-gopro-video-with-ffmpeg-and-vid.stab/

From the command line source video can be stabilized before importing, but it should not be too hard to add this option to the project files menu.

ferdnyc commented 4 years ago

From the command line source video can be stabilized before importing, but it should not be too hard to add this option to the project files menu.

Well, except that OpenShot doesn't use command-line ffmpeg, it links directly with the FFmpeg libraries. Performing stabilization using the libraries — while possible, since vid.stab version 0.96 — is even more complicated than it is on the command line.

The major issue, though, is one the author discusses in the tutorial you linked to: Stabilization with vid.stab requires a lot of work to trial-and-error different settings until you find the right ones to use, and they're different for every video. There's no way we can really add a context menu option for "go through that entire process automatically" — it requires the user's involvement and guidance. There isn't a single example of software that does stabilization, without also providing some sort of interface to tune the results of the process.

@rzr mentioned Kdenlive, above (though the link posted is no longer valid) — here's the window that comes up when you launch Kdenlive's stabilization tool:

image

I mean, ouch.

If it were as easy as adding a "stabilize this video" menu option... well, I don't want to say we'd definitely add it even then, because it would still require us to find and launch ffmpeg (which would also have to be added to the Windows and Mac application bundles, and the Linux AppImage), deal with confirming write access to the source file location, and do other things that become more complicated than you'd think, when developing a cross-platform application. But if it could be as simple as a menu option that says "do this thing", then it'd be a consideration. However, it's in no way as simple as that.

It's long been our position — well, my position, the other developers haven't said much on the issue, really — that if any pre-processing of input files is necessary, it should be done before importing the results into OpenShot. That doesn't merely include stabilization — in many ways, it's the perfect example.

ktown007 commented 4 years ago

I really like OpenShot's ease of use. THANKS! I had a shaky gopro video and did a few hours of research to find this ffmpeg solution. I noticed the examples all used the same "magic" parameters:

stepsize=32
shakiness=10
accuracy=10
zoom=0
smoothing=10
unsharp=5:5:0.8:3:3:0.4

These defaults worked great on my video. I have made a shell script to stabilize my clips. If we can make this easier for people that would be great. Here are the commands to help the next guy.

ffmpeg -i input.mp4 -vf vidstabdetect=stepsize=32:shakiness=10:accuracy=10:result=transforms.trf -f null -
ffmpeg -y -i input.mp4 -vf vidstabtransform=input=transforms.trf:zoom=0:smoothing=10,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -tune film -acodec copy -preset slow output.mp4
ktown007 commented 4 years ago

Here are some samples. https://youtu.be/mwy-e1fhilA https://youtu.be/hDPwsmZAZxs

On the preferences tab there could be a path to external ffmpeg. I feel it would be better to provide a workaround solution rather then recommend other editing software.