Issues related to Motion Plugin
Reusing what I wrote in late last night's thread. On 220924-23:31+0200, Miroslav Rovis wrote:
I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes): https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce... It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.: https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili... or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
But the above do not sufficienlty well demonstrate how well Cinelerra can stabilize shaky videos. I think I have a better example that I hope I can offer. But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand. And on the other, I want to show the issues that come across in Motion Plugin usage. I can say what it is right now, but that's dry and no way immediately plausible. Here: The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in. The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing. While I am not certain I can, within the time that I can set appart for this, show how to reproduce the second issue, I believe I can show the first issue within, hopefully this day today. I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing. I plan to post it, God permittign, at: https://croatiafidelis.hr/foss/cap/cap-220925-cinelerra/ where, at the time of writing this, there is only the short video: VID_20220910_133415_5.mp4 [*] that I want to use for this demonstration/tutorial/bug-report all-in-one. Regards! ---- [*] The timestamp in VID_20220910_133415_5.mp4 is for 2022-09-10 13:34:15, the start of my filming, but that's part 5, which I obtained with cutting the VID_20220910_133415.mp4 with mkvmerge. It's and event that the media exanded for a few days on, an, thankfully innocuous standoff with Croatian police... I want to show how good reporting can be done with simple cheap mobile phone camera, made good only after motion stabilization. I mean, look at that video, it's so shaky because I walked and even talked and waved (well, that's not seen) at people... Stabilization is absolutely necessary. This is what you should get (SHA256 of the video): 8ae65c8b17b3d607020c392323fa5ab8569bd40083648d808602a0dfffc8f1f9 VID_20220910_133415_5.mp4 -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
вс, 25 сент. 2022 г., 08:56 Miroslav Rovis <[email protected]>:
Reusing what I wrote in late last night's thread. On 220924-23:31+0200, Miroslav Rovis wrote:
I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce...
It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili...
or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
But the above do not sufficienlty well demonstrate how well Cinelerra can stabilize shaky videos.
I think I have a better example that I hope I can offer.
But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand.
And on the other, I want to show the issues that come across in Motion Plugin usage.
I can say what it is right now, but that's dry and no way immediately plausible. Here:
The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in.
The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing.
try to look in /tmp folder? may be some old result stuck there ... (purely from memory)
While I am not certain I can, within the time that I can set appart for this, show how to reproduce the second issue, I believe I can show the first issue within, hopefully this day today.
I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing.
I plan to post it, God permittign, at:
https://croatiafidelis.hr/foss/cap/cap-220925-cinelerra/ where, at the time of writing this, there is only the short video: VID_20220910_133415_5.mp4 [*] that I want to use for this demonstration/tutorial/bug-report all-in-one.
Regards!
---- [*] The timestamp in VID_20220910_133415_5.mp4 is for 2022-09-10 13:34:15, the start of my filming, but that's part 5, which I obtained with cutting the VID_20220910_133415.mp4 with mkvmerge. It's and event that the media exanded for a few days on, an, thankfully innocuous standoff with Croatian police... I want to show how good reporting can be done with simple cheap mobile phone camera, made good only after motion stabilization. I mean, look at that video, it's so shaky because I walked and even talked and waved (well, that's not seen) at people... Stabilization is absolutely necessary. This is what you should get (SHA256 of the video): 8ae65c8b17b3d607020c392323fa5ab8569bd40083648d808602a0dfffc8f1f9 VID_20220910_133415_5.mp4
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
On 220925-09:02+0300, Andrew Randrianasulu wrote:
вс, 25 сент. 2022 г., 08:56 Miroslav Rovis <[email protected]>:
Reusing what I wrote in late last night's thread. On 220924-23:31+0200, Miroslav Rovis wrote:
I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce...
It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili...
or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
But the above do not sufficienlty well demonstrate how well Cinelerra can stabilize shaky videos.
I think I have a better example that I hope I can offer.
But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand.
And on the other, I want to show the issues that come across in Motion Plugin usage.
I can say what it is right now, but that's dry and no way immediately plausible. Here:
The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in.
The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing.
try to look in /tmp folder? may be some old result stuck there ... (purely from memory)
I will.
While I am not certain I can, within the time that I can set appart for this, show how to reproduce the second issue, I believe I can show the first issue within, hopefully this day today.
I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing.
I plan to post it, God permittign, at:
https://croatiafidelis.hr/foss/cap/cap-220925-cinelerra/ where, at the time of writing this, there is only the short video: VID_20220910_133415_5.mp4 [*] that I want to use for this demonstration/tutorial/bug-report all-in-one.
Regards!
---- [*] The timestamp in VID_20220910_133415_5.mp4 is for 2022-09-10 13:34:15, the start of my filming, but that's part 5, which I obtained with cutting the VID_20220910_133415.mp4 with mkvmerge. It's and event that the media exanded for a few days on, an, thankfully innocuous standoff with Croatian police... I want to show how good reporting can be done with simple cheap mobile phone camera, made good only after motion stabilization. I mean, look at that video, it's so shaky because I walked and even talked and waved (well, that's not seen) at people... Stabilization is absolutely necessary. This is what you should get (SHA256 of the video): 8ae65c8b17b3d607020c392323fa5ab8569bd40083648d808602a0dfffc8f1f9 VID_20220910_133415_5.mp4
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
There is also the "Motion51" plugin that makes video stabilization convenient and fast.
On Sun, 25 Sep 2022, Miroslav Rovis via Cin wrote:
But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand.
Motion plugin algorithm in cingg is rather difficult to understand (the most efficient way to understand it is to look inside its C++ code:) Moreover, it has some tricks that, although can be derived knowing the details of the algorithm, are absolutely non-intuitive by themselves. Moreover, it is rather slow, and the results cannot be visible immediately while altering the settings. If the user needs only a smoothed video, perhaps he should not do it with the Motion plugin. The ffmpeg's vid.stab plugin is much easier to use, it is faster, and gives very good results. CinGG's Motion can be powerful, if you need either to freeze motion completely, or you need motion tracking instead of motion stabilization.
The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in.
Yes, it is the intentional behavior. Not only Motion, but all the cingg plugins save their settings in their defaults, and reuse them in new XML projects. Usually this behavior is convenient. In any way, the user has to reinspect the settings of the used plugins to make sure they are set as intended.
The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing.
The Motion plugin cache is an ingenious thing, and sometimes allows to play with very sophisticated techniques. For example, by editing the cache (it is a simple text file), perhaps with some custom script, you can induce some kind of motion which would be difficult to make in other way. But in the same time the existence of the cache file can trigger user's mistakes. So you must always pay attention, which cache file may be used in the moment. Motion's cache data are absolute-frame-number based. If you insert some small piece of video before that where the plugin was attached, the frame numbers get displaced relative to the cached numbers, and the result may become incorrectly stabilized. It is not possible to switch Motion cache off. While working, Motion always looks in its cache. If it contains some data assigned to the current frame numbers, that cached data will be used unconditionally. If not, that data will be calculated, stored in the cache, and later reused, also unconditionally. In the Motion plugin dialog there is a button 'Clear cache contents' (or something like this). When in doubt, you can press this button, the cached data will be erased and fresh recalculated on the next pass. It is quite usual to wish independent caches for different parts of video. It is possible to set such distinct cache file names (either manually, or let software generate them). When you generate new names, the plugin automatically switches Calculation off, just for security. You switch it on again when needed. If 'play track' is switched off for the track where the Motion plugin was attached, the plugin will calculate nothing. Also, if 'Play every frame' was not active in Preferences, some video frames can get skipped from processing.
I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing.
Phyllis has such a very shaky example. May be, I have yet a cingg project to stabilize it using Motion plugin keyframes. Should I search for it? _______________________________________________________________________________ Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
On 220925-17:39+0700, Georgy Salnikov wrote:
On Sun, 25 Sep 2022, Miroslav Rovis via Cin wrote:
But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand.
Motion plugin algorithm in cingg is rather difficult to understand (the most efficient way to understand it is to look inside its C++ code:) I see. Moreover, it has some tricks that, although can be derived knowing the details of the algorithm, are absolutely non-intuitive by themselves. Sounds a little worrying. Similar to what they kept saying about OpenSSL code. However, openssl has been fixed pretty well after probably huge time investment by some devs, and is getting to be in really good shape now. And it's been there since, I believe Netscape invented SSL. In good shape again, with all the cludgy code added in when new ways of TLS and other stuff were invented, all that either still working, or rewritten (didn't look it up in any detail, but I needed OpenSSL and I had to get informed.) Moreover, it is rather slow, and the results cannot be visible immediately while altering the settings. I know it very very well. I used to have slower systems than now, and sometimes it was days work on a say 20m video to get anything out. Yes, it is slow, but if you don't have the expensive hardware called stabilizer, I do not see that there is an alternative. Did you see the links to the example and the comparison videos that I gave? If the user needs only a smoothed video, perhaps he should not do it with the Motion plugin. The ffmpeg's vid.stab plugin is much easier to use, it is faster, and gives very good results. Huh! I'll try and see what that is. But where is it? Search 'vid.stab' in ${cin_src_root}/ gives nothing. Also: -name '*stab' nothing. And -name '*stab* gives a lot, of which: $ find /mnc/src_n0/Cin/cinelerra.BUILT/cinelerra-5.1/ -name '*stab*' | grep ffmpeg-5.1 | grep libavfilter /mnc/src_n0/Cin/cinelerra.BUILT/cinelerra-5.1/thirdparty/ffmpeg-5.1/libavfilter/vf_vidstabtransform.c /mnc/src_n0/Cin/cinelerra.BUILT/cinelerra-5.1/thirdparty/ffmpeg-5.1/libavfilter/vidstabutils.c /mnc/src_n0/Cin/cinelerra.BUILT/cinelerra-5.1/thirdparty/ffmpeg-5.1/libavfilter/vidstabutils.h /mnc/src_n0/Cin/cinelerra.BUILT/cinelerra-5.1/thirdparty/ffmpeg-5.1/libavfilter/vf_vidstabdetect.c $ So that must be what you mean. But where is it in the GUI? Right click on a video track, "Attach effect" and under "Plugins" there is nothing that starts with Stab or Vidstab... (And are you sure it is so good in comparison to the Motion Plugin? However, this will put off my plans if it is so.) CinGG's Motion can be powerful, if you need either to freeze motion completely, or you need motion tracking instead of motion stabilization.
The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in. I read and I may still get back later to your reply w.r.t. this cache issue. Thanks for the explanation! Yes, it is the intentional behavior. Not only Motion, but all the cingg plugins save their settings in their defaults, and reuse them in new XML projects. Usually this behavior is convenient. In any way, the user has to reinspect the settings of the used plugins to make sure they are set as intended.
The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing.
The Motion plugin cache is an ingenious thing, and sometimes allows to play with very sophisticated techniques. For example, by editing the cache (it is a simple text file), perhaps with some custom script, you can induce some kind of motion which would be difficult to make in other way. But in the same time the existence of the cache file can trigger user's mistakes. So you must always pay attention, which cache file may be used in the moment.
Motion's cache data are absolute-frame-number based. If you insert some small piece of video before that where the plugin was attached, the frame numbers get displaced relative to the cached numbers, and the result may become incorrectly stabilized.
It is not possible to switch Motion cache off. While working, Motion always looks in its cache. If it contains some data assigned to the current frame numbers, that cached data will be used unconditionally. If not, that data will be calculated, stored in the cache, and later reused, also unconditionally.
In the Motion plugin dialog there is a button 'Clear cache contents' (or something like this). When in doubt, you can press this button, the cached data will be erased and fresh recalculated on the next pass.
It is quite usual to wish independent caches for different parts of video. It is possible to set such distinct cache file names (either manually, or let software generate them). When you generate new names, the plugin automatically switches Calculation off, just for security. You switch it on again when needed.
If 'play track' is switched off for the track where the Motion plugin was attached, the plugin will calculate nothing. Also, if 'Play every frame' was not active in Preferences, some video frames can get skipped from processing.
I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing.
Phyllis has such a very shaky example. May be, I have yet a cingg project to stabilize it using Motion plugin keyframes. Should I search for it? If you think so. I don't know if I will use it, as yet, because I thought my 1m 30s video would be great for demonstration. Did you consider it at all? Also let me first understand what you wrote about the vid.stab, and let me see what that vid.stab is (as I asked above). _______________________________________________________________________________
Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
On Sun, 25 Sep 2022, Miroslav Rovis wrote:
If the user needs only a smoothed video, perhaps he should not do it with the Motion plugin. The ffmpeg's vid.stab plugin is much easier to use, it is faster, and gives very good results. Huh! I'll try and see what that is. But where is it? Search 'vid.stab' in ${cin_src_root}/ gives nothing. So that must be what you mean. But where is it in the GUI? Right click on a video track,
Vid.stab is a ffmpeg plugin linked to it as an external module. Although this module is maintained separately, it is so useful that it is included perhaps in all the binary distributions of ffmpeg. As part of the ffmpeg binary, its filters are used from ffmpeg's command line. The corresponding vid.stab ffmpeg filters are called vidstabdetect and vidstabtransform, see ffmpeg's manpages. Although some ffmpeg's filters can be used inside cinelerra, vidstabdetect and vidstabtransform cannot. These filters are used as a two steps procedure: first you call ffmpeg with the vidstabdetect filter and without any encodings (for speed), the translation displacements will be generated. Then you call ffmpeg with the vidstabtransform filter followed by encoding codecs, the produced video will have the displacements applied. Cinelerra does not support such two-step calls. Therefore, it has also no GUI for this kind of ffmpeg filters. So you firstly prepare your shaky video clips with ffmpeg, then load the stabilized results into cinelerra. Btw, I would recommend to use cingg's Motion stabilization in the similar way: adjust Motion parameters, render the corresponding part, then replace the shaky original with the stabilized result. It is much more convenient. _______________________________________________________________________________ Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
On 220925-20:08+0700, Georgy Salnikov wrote:
On Sun, 25 Sep 2022, Miroslav Rovis wrote:
If the user needs only a smoothed video, perhaps he should not do it with the Motion plugin. The ffmpeg's vid.stab plugin is much easier to use, it is faster, and gives very good results. Huh! I'll try and see what that is. But where is it? Search 'vid.stab' in ${cin_src_root}/ gives nothing. So that must be what you mean. But where is it in the GUI? Right click on a video track,
Vid.stab is a ffmpeg plugin linked to it as an external module. Although this module is maintained separately, it is so useful that it is included perhaps in all the binary distributions of ffmpeg. As part of the ffmpeg binary, its filters are used from ffmpeg's command line.
The corresponding vid.stab ffmpeg filters are called vidstabdetect and vidstabtransform, see ffmpeg's manpages.
Although some ffmpeg's filters can be used inside cinelerra, vidstabdetect and vidstabtransform cannot. These filters are used as a two steps procedure: first you call ffmpeg with the vidstabdetect filter and without any encodings (for speed), the translation displacements will be generated. Then you call ffmpeg with the vidstabtransform filter followed by encoding codecs, the produced video will have the displacements applied. Cinelerra does not support such two-step calls. Therefore, it has also no GUI for this kind of ffmpeg filters. Well, that's approximately what I found out in the meantime. Plus, you've made it clearer now.
I found it in my local "man ffmpeg-all", but here it is on the Web: https://ffmpeg.org/ffmpeg-all.html#vidstabdetect-1 https://ffmpeg.org/ffmpeg-all.html#vidstabtransform-1 and it's probably been around since years and years. And I didn't know about it. Very disappointing for me. Thanks for pointing it out to me.
So you firstly prepare your shaky video clips with ffmpeg, then load the stabilized results into cinelerra.
Btw, I would recommend to use cingg's Motion stabilization in the similar way: adjust Motion parameters, render the corresponding part, then replace the shaky original with the stabilized result. It is much more convenient.
That's what I have been doing. You do seem not to have considered that I know how to stabilize a video, as in: https://lists.cinelerra-gg.org/pipermail/cin/2022-September/005565.html The slow way, the Motion Plugin way.
_______________________________________________________________________________
Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
I'm pretty confident FFmpeg can stabilize a video well, although I haven't tried it yet. I've been using FFmpeg on a daily basis since long years, I know how capable program it is. Years of partial knowledge. And possibly there have been years of sort of my own unwilling self-torture... Because you just can't find time to read all the manuals for all the programs that you use... Your info has been precious, regardless of this disappointment. Thank you again! Regards! -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
On 220925-15:40+0200, Miroslav Rovis wrote:
On 220925-20:08+0700, Georgy Salnikov wrote:
On Sun, 25 Sep 2022, Miroslav Rovis wrote:
If the user needs only a smoothed video, perhaps he should not do it with the Motion plugin. The ffmpeg's vid.stab plugin is much easier to use, it is faster, and gives very good results. [...] https://ffmpeg.org/ffmpeg-all.html#vidstabdetect-1 https://ffmpeg.org/ffmpeg-all.html#vidstabtransform-1 [...] So I thought the best way to stabilize a video was... considered that I know how to stabilize a video, as in: https://lists.cinelerra-gg.org/pipermail/cin/2022-September/005565.html The slow way, the Motion Plugin way.
But now, thanks to:
Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________ [...] Thank you again!
It was in essence just one line: NUM=40 # or NUM=31 for 70% larger file w/o noticeable # improvement $ ffmpeg -i VID_20220910_133415_5.mp4 -c:v libvpx-vp9 -crf $NUM \ -b 0 -vf vidstabdetect=shakiness=10:accuracy=15 -pass 1 \ -row-mt 1 -f null /dev/null && \ ffmpeg -i VID_20220910_133415_5.mp4 -c:v libvpx-vp9 \ -crf $NUM -b 0 -vf vidstabtransform -pass 2 -row-mt 1 -c:a \ libopus VID_20220910_133415_5_ff.webm And the result is probably better than Motion Plugin can do: https://croatiafidelis.hr/foss/cap/cap-220925-ffmpeg/ (there's the original now too, the 221M file) https://croatiafidelis.hr/foss/cap/cap-220925-ffmpeg/VID_20220910_133415_5_f... The previous, the older is with NUM=40, the one posted above is just .webm: -rw-r--r-- 1 mr mr 72936332 2022-09-25 18:20 VID_20220910_133415_5_ff.webm -rw-r--r-- 1 mr mr 127332623 2022-09-25 17:56 VID_20220910_133415_5_ff.webm_1664121928 ( the SHA256 of it is: c3cbbbb1ea23edd84edd8f704e610c096c2ea6d6c4b21b6b6b49ea84f07493e2 Cin/VID_20220910_133415_5_ff.webm ) And I should expect that the result can probably even be improved. Georgy Salnikov, thank you most sincerely again! Regards! -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
(Oops, not sure how this thread got split up and I missed more followup.) Anyway, *note to Andrea, *I think we should make a footnote in the manual mentioning the vid.stab ffmpeg filter used with ffmpeg as a starting point for some motion stabilization beforehand. It would probably save a lot of frustration on the part of users. What do you think?
So you firstly prepare your shaky video clips with ffmpeg, then load the stabilized results into cinelerra. ... The corresponding vid.stab ffmpeg filters are called vidstabdetect and vidstabtransform, see ffmpeg's manpages.
A little feedback/commentary about Motion in this thread. - Miroslav's demonstration videos of before and after Motion look pretty good and the cell phone quality capture was surprisingly detailed. - For those who have not been around so long, Georgy is the expert on the Motion plugin as he did a major rewrite that solved many issues a few years ago. So any hints and information he provides is very beneficial. - Demo that Georgy referred to is the file (if it does not play for you, just download it and play then): https://www.cinelerra-gg.org/media/demos/stabilize/stabilize.mp4 This demo uses Motion51 since it was created before Georgy greatly improved Motion. Motion51 works a little differently than does the heavily modify original Motion. On Sun, Sep 25, 2022 at 12:04 AM Miroslav Rovis via Cin < [email protected]> wrote:
Reusing what I wrote in late last night's thread. On 220924-23:31+0200, Miroslav Rovis wrote:
I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce...
It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili...
or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
But the above do not sufficienlty well demonstrate how well Cinelerra can stabilize shaky videos.
I think I have a better example that I hope I can offer.
But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand.
And on the other, I want to show the issues that come across in Motion Plugin usage.
I can say what it is right now, but that's dry and no way immediately plausible. Here:
The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in.
The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing.
While I am not certain I can, within the time that I can set appart for this, show how to reproduce the second issue, I believe I can show the first issue within, hopefully this day today.
I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing.
I plan to post it, God permittign, at:
https://croatiafidelis.hr/foss/cap/cap-220925-cinelerra/ where, at the time of writing this, there is only the short video: VID_20220910_133415_5.mp4 [*] that I want to use for this demonstration/tutorial/bug-report all-in-one.
Regards!
---- [*] The timestamp in VID_20220910_133415_5.mp4 is for 2022-09-10 13:34:15, the start of my filming, but that's part 5, which I obtained with cutting the VID_20220910_133415.mp4 with mkvmerge. It's and event that the media exanded for a few days on, an, thankfully innocuous standoff with Croatian police... I want to show how good reporting can be done with simple cheap mobile phone camera, made good only after motion stabilization. I mean, look at that video, it's so shaky because I walked and even talked and waved (well, that's not seen) at people... Stabilization is absolutely necessary. This is what you should get (SHA256 of the video): 8ae65c8b17b3d607020c392323fa5ab8569bd40083648d808602a0dfffc8f1f9 VID_20220910_133415_5.mp4
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Also, the original input media for the shaky demo using Motion 51 and the XML file to show which parameters can be downloaded at: https://www.cinelerra-gg.org/media/demos/stabilize/ On Tue, Sep 27, 2022 at 11:06 AM Phyllis Smith <[email protected]> wrote:
A little feedback/commentary about Motion in this thread.
- Miroslav's demonstration videos of before and after Motion look pretty good and the cell phone quality capture was surprisingly detailed. - For those who have not been around so long, Georgy is the expert on the Motion plugin as he did a major rewrite that solved many issues a few years ago. So any hints and information he provides is very beneficial. - Demo that Georgy referred to is the file (if it does not play for you, just download it and play then): https://www.cinelerra-gg.org/media/demos/stabilize/stabilize.mp4 This demo uses Motion51 since it was created before Georgy greatly improved Motion. Motion51 works a little differently than does the heavily modify original Motion.
On Sun, Sep 25, 2022 at 12:04 AM Miroslav Rovis via Cin < [email protected]> wrote:
Reusing what I wrote in late last night's thread. On 220924-23:31+0200, Miroslav Rovis wrote:
I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce...
It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili...
or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being:
https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
But the above do not sufficienlty well demonstrate how well Cinelerra can stabilize shaky videos.
I think I have a better example that I hope I can offer.
But I plan to make it both a demonstration of this capability and a tutorial so other users can benefit from it, on the one hand.
And on the other, I want to show the issues that come across in Motion Plugin usage.
I can say what it is right now, but that's dry and no way immediately plausible. Here:
The fist issue: When using Motion Plugin, a last-used setting (previusly used, even in a different video) is written in the new XML along with the newly setup numbers for a particular part of a video to which Motion Plugin Effect is attached. And it sometimes messes up the XML, and rendering does not get what the user put in.
The second issue: And, sometimes, there appear to be problems with some Cinelerra cache somewhere so bad that tweaking the Motion Plugin settings, while written correctly in the new XML, do not actually apply. The rendering gets the user the earlier tweaked result no matter the new editing.
While I am not certain I can, within the time that I can set appart for this, show how to reproduce the second issue, I believe I can show the first issue within, hopefully this day today.
I want to do it along with demonstrating a very good motion stabilization on not-too difficult parts of a 1m 30s video that otherwise would be almost bad for viewing.
I plan to post it, God permittign, at:
https://croatiafidelis.hr/foss/cap/cap-220925-cinelerra/ where, at the time of writing this, there is only the short video: VID_20220910_133415_5.mp4 [*] that I want to use for this demonstration/tutorial/bug-report all-in-one.
Regards!
---- [*] The timestamp in VID_20220910_133415_5.mp4 is for 2022-09-10 13:34:15, the start of my filming, but that's part 5, which I obtained with cutting the VID_20220910_133415.mp4 with mkvmerge. It's and event that the media exanded for a few days on, an, thankfully innocuous standoff with Croatian police... I want to show how good reporting can be done with simple cheap mobile phone camera, made good only after motion stabilization. I mean, look at that video, it's so shaky because I walked and even talked and waved (well, that's not seen) at people... Stabilization is absolutely necessary. This is what you should get (SHA256 of the video): 8ae65c8b17b3d607020c392323fa5ab8569bd40083648d808602a0dfffc8f1f9 VID_20220910_133415_5.mp4
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
participants (5)
-
Andrea paz -
Andrew Randrianasulu -
Georgy Salnikov -
Miroslav Rovis -
Phyllis Smith