NOW IN CURRENT: shotcut

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

NOW IN CURRENT: shotcut

Marc Espie-2
A few days ago, I imported shotcut, then fixed quite a few bugs so
that it's now usable.

Now that snapshots have rolled over, it is available as a package.

shotcut is modern video editing software.

With the current medical situation, I had needs to prepare online video
courses, and having to go back to using windows or linux for that was
hateful.

There was a partial shotcut port in openbsd-wip, courtesy of bentley@,
and together with tracey@, we set out to make it work, including some mlt
update.

After a bit of tidying by rsadowski@ and some clues by tb@, I finally got
it to fully work (to the best of my knowledge).

I do not usually post announces for whatever port here, but I think
that this is a significant improvement over the previous situation.

We now have fairly decent video editing software.

(I've tried kdenlive at about the same time, but shotcut is way more
intuitive and there are tons of tutorials on youtube, that one
is fairly good:
https://www.youtube.com/watch?v=hlDG90sbhQY

and that one will teach you everything you need to know for text animations:
https://www.youtube.com/watch?v=563nTLLgSAw)

Note: this does require a fairly hefty machine, the "on-the-fly" video editing
tends to punch machines into the ground as soone as you do any significant
compositing.

prx
Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

prx
Thank you a lot !
À video editor was missing, indeed. Just like you, I hated to use Linux for this recently, and ffmpeg alone was a bit painful.

Again, thank you !


Le 29 mai 2020 17:12:28 GMT+02:00, Marc Espie <[hidden email]> a écrit :

>A few days ago, I imported shotcut, then fixed quite a few bugs so
>that it's now usable.
>
>Now that snapshots have rolled over, it is available as a package.
>
>shotcut is modern video editing software.
>
>With the current medical situation, I had needs to prepare online video
>courses, and having to go back to using windows or linux for that was
>hateful.
>
>There was a partial shotcut port in openbsd-wip, courtesy of bentley@,
>and together with tracey@, we set out to make it work, including some
>mlt
>update.
>
>After a bit of tidying by rsadowski@ and some clues by tb@, I finally
>got
>it to fully work (to the best of my knowledge).
>
>I do not usually post announces for whatever port here, but I think
>that this is a significant improvement over the previous situation.
>
>We now have fairly decent video editing software.
>
>(I've tried kdenlive at about the same time, but shotcut is way more
>intuitive and there are tons of tutorials on youtube, that one
>is fairly good:
>https://www.youtube.com/watch?v=hlDG90sbhQY
>
>and that one will teach you everything you need to know for text
>animations:
>https://www.youtube.com/watch?v=563nTLLgSAw)
>
>Note: this does require a fairly hefty machine, the "on-the-fly" video
>editing
>tends to punch machines into the ground as soone as you do any
>significant
>compositing.

Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

Marc Espie-2
In reply to this post by Marc Espie-2
One important note for non-technical readers:
*porting* shotcut to OpenBSD  meant fixing *three bugs* in the ported software:

- mlt (the framework shotcut is based on) uses mutexes extensively, but does NOT
initialize them completely *even though the mutex default type is unspecified
by posix
- mlt uses locales in threaded context, trying its best to protect usage with
mutexes, but *this doesn't work for us*, setlocale is NOT safe for MT usage.
- shotcut had a use-after-free (misuse of s.toUtf8().constData(), which creates
a temporary which is *invalid* after the current statement.  Turns out the
bug is *everywhere* but shows up *consistently* on OpenBSD thanks to otto@'s
malloc.


I would stress that ALL THESE ARE BUGS that are independent of OpenBSD, but
that OpenBSD is such a "hostile" environment for bugs that you have NO CHOICE
but fix the issues if you want software to run.

prx
Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

prx
Hi,
after trying the new shotcut port, I wonder if there is any tip to read
video files with it. Do you convert to any format befort importing into
shotcut?

Find attached messages printed by shotcut recorded with script(1).

It always crash when I import a file on my machine. Below a few lines
that may be relevant.

        $ sysctl -n kern.version
        OpenBSD 6.7-current (GENERIC.MP) #234: Sun May 31 23:53:53 MDT 2020
         [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        $ gdb -q shotcut shotcut.core
        [...]
        #0  0x000001df2d3928c1 in mlt_consumer_stop () from
        /usr/local/lib/libmlt.so.3.2

        bt full
        #0  0x000001df2d3928c1 in mlt_consumer_stop () from /usr/local/lib/libmlt.so.3.2
        No symbol table info available.
        #1  0x000001dd14e620a4 in QList<QString>::operator= () from /usr/local/bin/shotcut
        No symbol table info available.
        #2  0x000001dd14ea0160 in QList<QString>::operator= () from /usr/local/bin/shotcut
        No symbol table info available.
        #3  0x000001dd14e9f9d6 in QList<QString>::operator= () from /usr/local/bin/shotcut
        No symbol table info available.
        #4  0x000001dd14e38d10 in QList<QString>::detach_helper () from /usr/local/bin/shotcut
        No symbol table info available.
        #5  0x000001dd14e3c747 in QList<QString>::detach_helper () from /usr/local/bin/shotcut
        No symbol table info available.
        #6  0x000001dd14e3dbcd in QList<QString>::detach_helper () from /usr/local/bin/shotcut
        No symbol table info available.
        #7  0x000001dfba548477 in QMetaObject::activate () from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #8  0x000001dfba547b3a in QMetaObject::activate () from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #9  0x000001dfc13f6b3d in QAction::triggered () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #10 0x000001dfc13f68d7 in QAction::activate () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #11 0x000001dfc13f9fb1 in QAction::qt_metacall () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #12 0x000001dfc171f21d in QToolButton::nextCheckState ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #13 0x000001dfc159af2c in QAbstractButton::isCheckable ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #14 0x000001dfc159c939 in QAbstractButton::mouseReleaseEvent ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #15 0x000001dfc171ea81 in QToolButton::mouseReleaseEvent ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #16 0x000001dfc146dd49 in QWidget::event () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #17 0x000001dfc159c720 in QAbstractButton::event () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #18 0x000001dfc171f2d9 in QToolButton::event () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #19 0x000001dfc1408e3d in QApplicationPrivate::notify_helper ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #20 0x000001dfc140b94c in QApplication::notify () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #21 0x000001dfba4d90fd in QCoreApplication::notifyInternal2 ()
           from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #22 0x000001dfba4d9e69 in QCoreApplication::sendSpontaneousEvent ()
           from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #23 0x000001dfc1409cc0 in QApplicationPrivate::sendMouseEvent ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.

        #24 0x000001dfc14a9698 in QDesktopWidget::qt_metacall ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #25 0x000001dfc14a7d0f in QDesktopWidget::qt_metacall ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #26 0x000001dfc1408e3d in QApplicationPrivate::notify_helper ()
           from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #27 0x000001dfc140aec9 in QApplication::notify () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #28 0x000001dfba4d90fd in QCoreApplication::notifyInternal2 ()
           from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #29 0x000001dfba4d9e69 in QCoreApplication::sendSpontaneousEvent ()
           from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #30 0x000001df20576ec2 in QGuiApplicationPrivate::processMouseEvent ()
           from /usr/local/lib/qt5/libQt5Gui.so.3.0
        No symbol table info available.
        #31 0x000001df20576122 in QGuiApplicationPrivate::processWindowSystemEvent ()
           from /usr/local/lib/qt5/libQt5Gui.so.3.0
        No symbol table info available.
        #32 0x000001df2054c0f0 in QWindowSystemInterface::sendWindowSystemEvents ()
           from /usr/local/lib/qt5/libQt5Gui.so.3.0
        No symbol table info available.
        #33 0x000001df96dd094d in QXcbNativeInterface::dumpNativeWindows ()
           from /usr/local/lib/qt5/libQt5XcbQpa.so.0.0
        No symbol table info available.
        #34 0x000001df33b71c78 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.4201.4
        No symbol table info available.
        #35 0x000001df33b72065 in g_main_context_pending () from /usr/local/lib/libglib-2.0.so.4201.4
        No symbol table info available.
        #36 0x000001df33b72145 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.4201.4
        No symbol table info available.
        #37 0x000001dfba5ab90a in QEventDispatcherGlib::processEvents ()
           from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #38 0x000001df96dd0ada in QXcbNativeInterface::dumpNativeWindows ()
           from /usr/local/lib/qt5/libQt5XcbQpa.so.0.0
        No symbol table info available.
        #39 0x000001dfba4d3f33 in QEventLoop::processEvents () from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #40 0x000001dfba4d416b in QEventLoop::exec () from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #41 0x000001dfba4d9acb in QCoreApplication::exec () from /usr/local/lib/qt5/libQt5Core.so.3.0
        No symbol table info available.
        #42 0x000001df20575b74 in QGuiApplication::exec () from /usr/local/lib/qt5/libQt5Gui.so.3.0
        No symbol table info available.
        #43 0x000001dfc140a4e7 in QApplication::exec () from /usr/local/lib/qt5/libQt5Widgets.so.3.0
        No symbol table info available.
        #44 0x000001dd14e266f9 in __register_frame_info () from /usr/local/bin/shotcut
        No symbol table info available.
        #45 0x000001dd14e2613b in ?? () from /usr/local/bin/shotcut
        No symbol table info available.
        #46 0x0000000000000000 in ?? ()
        No symbol table info available.


regards

--
    prx

shotcut.log (38K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

Marc Espie-2
On Mon, Jun 01, 2020 at 03:20:34PM +0200, prx wrote:
> Hi,
> after trying the new shotcut port, I wonder if there is any tip to read
> video files with it. Do you convert to any format befort importing into
> shotcut?
>
> Find attached messages printed by shotcut recorded with script(1).

This doesn't help at all.
you need egdb and debug- packages to have relevant messages these days.

That said, I've had reports of this from other sources.

It seems you definitely want to have dbus running first.
I've had

eval `dbus-launch --sh-syntax --exit-with-session`

in my .xsession for ages, so I haven't even noticed.

This might help, and there will be further fixes.


Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

Theo Buehler-3
In reply to this post by prx
On Mon, Jun 01, 2020 at 03:20:34PM +0200, prx wrote:

> Hi,
> after trying the new shotcut port, I wonder if there is any tip to read
> video files with it. Do you convert to any format befort importing into
> shotcut?
>
> Find attached messages printed by shotcut recorded with script(1).
>
> It always crash when I import a file on my machine. Below a few lines
> that may be relevant.
>
> $ sysctl -n kern.version
> OpenBSD 6.7-current (GENERIC.MP) #234: Sun May 31 23:53:53 MDT 2020
> [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> $ gdb -q shotcut shotcut.core
> [...]
> #0  0x000001df2d3928c1 in mlt_consumer_stop () from
> /usr/local/lib/libmlt.so.3.2
>
> bt full
> #0  0x000001df2d3928c1 in mlt_consumer_stop () from /usr/local/lib/libmlt.so.3.2
> No symbol table info available.

You will need to "pkg_add debug-mlt debug-shotcut gdb" and run egdb (not
gdb) to make this backtrace more useful.

I saw similar symptoms with a crash in mlt_consumer_stop() (espie has
the details). The crash was an obvious null dereference whenever I tried
to open a movie file in any format, but what's unclear is why it happens
on some systems and not on others. Working around the null deref didn't
make shotcut work, so we are still as wise as before.

I suspected it was due to a missing dbus, but unfortunately running
shotcut under a dbus didn't help in my case.

I looked at the ktrace as well but that didn't really show anything
obviously suspicious either.

Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

Stefan Hagen-3
In reply to this post by Marc Espie-2
Marc Espie wrote:

> On Mon, Jun 01, 2020 at 03:20:34PM +0200, prx wrote:
> > Hi,
> > after trying the new shotcut port, I wonder if there is any tip to read
> > video files with it. Do you convert to any format befort importing into
> > shotcut?
> >
> > Find attached messages printed by shotcut recorded with script(1).
>
> eval `dbus-launch --sh-syntax --exit-with-session`
>
> in my .xsession for ages, so I haven't even noticed.
>
> This might help, and there will be further fixes.

Hmm, i have the same behavior and dbus was already running. I didn't have the
--sh-syntyx toggle. But adding it made no difference.

Stacktrace with debug-shortcut and debug-mlt below.

puffy ~> tail -1 .xsession
/usr/local/bin/dbus-launch --sh-syntax --exit-with-session /usr/local/bin/spectrwm

puffy ~/work> shotcut test.mp4
[...]
[Debug  ] <MainWindow::open> "test.mp4"
[Debug  ] <MltXmlChecker::check> begin
[Debug  ] <MltXmlChecker::check> end
[h264 @ 0x9b97b5e0000] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x9b96bb97800] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9b96bba3000] Value 1.000000 for parameter
'seekable' out of range [-1 - 0]
[h264 @ 0x9b981c35000] Reinit context to 1920x1088, pix_fmt: yuv420p
[Debug  ] <MLT> [producer avformat] audio: total_streams 1 max_stream 1
total_channels 2 max_channels 2
[AVIOContext @ 0x9b9908bca00] Statistics: 599671 bytes read, 2 seeks
[AVIOContext @ 0x9ba20e41000] Statistics: 599671 bytes read, 2 seeks
[AVIOContext @ 0x9b9fa0a1600] Statistics: 599671 bytes read, 2 seeks
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9b9fa33a000] Value 1.000000 for parameter
'seekable' out of range [-1 - 0]
[h264 @ 0x9b9835c2000] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x9b9b6a25800] Reinit context to 1920x1088, pix_fmt: yuv420p
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x9b9835c2800] Value 1.000000 for parameter
'seekable' out of range [-1 - 0]
[h264 @ 0x9b9fa33a800] Reinit context to 1920x1088, pix_fmt: yuv420p
[AVIOContext @ 0x9b9fa336a00] Statistics: 599671 bytes read, 2 seeks
[Debug  ] <MLT> [producer avformat] "/home/sdk/work/test.mp4" checking
VFR: pkt.duration 3600
[h264 @ 0x9b9835c8000] Reinit context to 1920x1088, pix_fmt: yuv420p
[Debug  ] <Mlt::Controller::setPreviewScale> 1920 x 1080
[Debug  ] <MainWindow::setAudioChannels> 2
[Debug  ] <Mlt::Controller::setAudioChannels> 2
Segmentation fault (core dumped)

puffy ~/work> egdb /usr/local/bin/shotcut shotcut.core
[...]
(gdb) bt full
#0  mlt_consumer_stop (self=0x0) at mlt_consumer.c:1644
        properties = 0x0
        priv = <optimized out>
#1  0x000001f6aca620a4 in Mlt::Controller::closeConsumer (this=0x1f8f4f1c030)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/mltcontroller.cpp:205
No locals.
#2  0x000001f6acaa0160 in Mlt::GLWidget::reconfigure (this=<optimized out>, isMulti=<optimized out>)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/glwidget.cpp:707
        error = <error reading variable error (Cannot access memory at address 0x2)>
#3  0x000001f6aca9f9d6 in Mlt::GLWidget::setProducer (this=0x1f8f4f1c000, producer=<optimized out>,
    isMulti=<optimized out>)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/glwidget.cpp:620
        error = <optimized out>
#4  0x000001f6aca38d10 in MainWindow::open (this=0x1f9383efe00, producer=0x1f8f0cabc00)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/mainwindow.cpp:926
        ok = <optimized out>
        screen = <optimized out>
#5  0x000001f6aca3c747 in MainWindow::open (this=0x1f9383efe00, url=..., properties=0x0)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/mainwindow.cpp:1321
        props = <optimized out>
        modified = <error reading variable modified (Cannot access memory at address 0x0)>
        checker = <optimized out>
        info = <optimized out>
#6  0x000001f6aca3d204 in MainWindow::openMultiple (this=0x1f9383efe00, paths=...)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/mainwindow.cpp:1347
No locals.
#7  0x000001f6aca266f4 in main (argc=2, argv=<optimized out>)
    at /usr/obj/ports/shotcut-20.04.12/shotcut-20.04.12/src/main.cpp:347
        a = {<QApplication> = {<No data fields>}, mainWindow = 0x1f9383efe00,
          qtTranslator = <incomplete type>, qtBaseTranslator = <incomplete type>,
          shotcutTranslator = <incomplete type>,
          resourceArg = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {
                p = {static shared_null = {ref = {atomic = {
                        _q_value = {<std::__1::__atomic_base<int, true>> = {<std::__1::__atomic_base<int, false>> = {__a_ = -1}, <No data fields>}, <No data fields>}}}, alloc = 0, begin = 0, end = 0,
                    array = {0x0}}, d = 0x1f93ac03220}, d = 0x1f93ac03220}}, <No data fields>},
          isFullScreen = false, appDirArg = {static null = {<No data fields>},
            d = 0x1f98586f540 <QArrayData::shared_null>}}
        result = <optimized out>
        splash = <optimized out>

HTH,
Stefan

prx
Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

prx
In reply to this post by Theo Buehler-3
* Theo Buehler <[hidden email]> le [01-06-2020 16:36:47 +0200]:

> On Mon, Jun 01, 2020 at 03:20:34PM +0200, prx wrote:
> > Hi,
> > after trying the new shotcut port, I wonder if there is any tip to read
> > video files with it. Do you convert to any format befort importing into
> > shotcut?
> >
> > Find attached messages printed by shotcut recorded with script(1).
> >
> > It always crash when I import a file on my machine. Below a few lines
> > that may be relevant.
> >
> > $ sysctl -n kern.version
> > OpenBSD 6.7-current (GENERIC.MP) #234: Sun May 31 23:53:53 MDT 2020
> > [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> >
> > $ gdb -q shotcut shotcut.core
> > [...]
> > #0  0x000001df2d3928c1 in mlt_consumer_stop () from
> > /usr/local/lib/libmlt.so.3.2
> >
> > bt full
> > #0  0x000001df2d3928c1 in mlt_consumer_stop () from /usr/local/lib/libmlt.so.3.2
> > No symbol table info available.
>

> You will need to "pkg_add debug-mlt debug-shotcut gdb" and run egdb (not
> gdb) to make this backtrace more useful.
>

Ok, good to know. Find attached the new backtrace. Sorry for my lack of
knowledge.

> I suspected it was due to a missing dbus, but unfortunately running
> shotcut under a dbus didn't help in my case.
>
Indeed, I have dbus started in my .xsession.

Please let me know if I can give better report.

Regards.



shotcut.log (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

Marc Espie-2
In reply to this post by Theo Buehler-3
The big issue is reproducibility.

I can get shotcut to crash *eventually* with something that does not look
anywhere like what you guys are getting,

but by default, it starts perfectly fine and I have no trouble reading
videos nor playing with the timeline.

Haven't figured out what's different yet.

I'm aware of a bug in webvfx, but that only affects exporting videos is
webvfx is present, so way way way down the line.

Reply | Threaded
Open this post in threaded view
|

Re: NOW IN CURRENT: shotcut

Theo Buehler-3
So tracey figured out it was a missing runtime dependency.

pkg_add mlt-gpl2

should fix the issue.