Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mlt 7.28.0_1 crashes sometimes #1049

Open
superbonaci opened this issue Nov 6, 2024 · 16 comments
Open

mlt 7.28.0_1 crashes sometimes #1049

superbonaci opened this issue Nov 6, 2024 · 16 comments
Labels

Comments

@superbonaci
Copy link

The version installed is mlt 7.28.0_1, in brew.sh in macOS 15.1 with chip M1.

% brew list mlt
/opt/homebrew/Cellar/mlt/7.28.0_1/bin/melt
/opt/homebrew/Cellar/mlt/7.28.0_1/include/mlt-7/ (60 files)
/opt/homebrew/Cellar/mlt/7.28.0_1/lib/libmlt++-7.7.28.0.dylib
/opt/homebrew/Cellar/mlt/7.28.0_1/lib/libmlt-7.7.28.0.dylib
/opt/homebrew/Cellar/mlt/7.28.0_1/lib/cmake/ (4 files)
/opt/homebrew/Cellar/mlt/7.28.0_1/lib/mlt/ (21 files)
/opt/homebrew/Cellar/mlt/7.28.0_1/lib/pkgconfig/ (3 files)
/opt/homebrew/Cellar/mlt/7.28.0_1/lib/ (4 other files)
/opt/homebrew/Cellar/mlt/7.28.0_1/sbom.spdx.json
/opt/homebrew/Cellar/mlt/7.28.0_1/share/mlt/ (349 files)

Sometimes crashes during conversion and others completes successfully. The mlt file has been generated with kdenlive:

% melt -progress project-1.mlt
Trace/BPT trap: 5  487757, percentage:         74
@superbonaci
Copy link
Author

superbonaci commented Nov 7, 2024

log deleted

@ddennedy
Copy link
Member

ddennedy commented Nov 8, 2024

Thanks for trying , but the log file is not helping very much. We need project-1.mlt. Then, I can try to substitute with my own media and see if it reproduces. If so, then run in a debugger.

@superbonaci
Copy link
Author

I can't attach the mlt file and the mp4 file because I don't own the rights of the files and contain copyrighted data. But I could try to reproduce the issue with any free sample file and attach all files. It can take me a lot of time so don't close the issue whenever possible.

@ddennedy
Copy link
Member

ddennedy commented Nov 8, 2024

I only asked for the mlt file

@superbonaci
Copy link
Author

superbonaci commented Nov 8, 2024

Link removed

@ddennedy
Copy link
Member

ddennedy commented Nov 8, 2024

I got it, thanks

@superbonaci
Copy link
Author

It can be a macos thing because in Arch usually goes well.

@ddennedy
Copy link
Member

ddennedy commented Nov 8, 2024

I ran it in the debugger on my Linux machine using the tip of git master without fail.

I ran it once using the Shotcut 24.10.29 build of melt for macOS on my M1 without fail, but I am trying again with a different video. I am not willing to install, test, and debug the Homebrew version you are using on my only Apple Silicon machine as it the build machine for Shotcut/macOS that uses MacPorts.

You can try to use Shotcut's melt to see if it is different: /Applications/Shotcut.app/Contents/MacOS/melt

@superbonaci
Copy link
Author

With this version of melt fails(kdenlive crashes) so I tested with the brew.sh version: /Applications/kdenlive.app/Contents/MacOS/melt
This is why I recommended you to have a test mp4 file alongside with the mlt. If I can reproduce it in all melt versions (also Shotcut.app) I can try debugging it if you don't have the M1. I could check if it happens in macOS with Intel, and test it in a virtual machine.

But it will take some time.

@ddennedy
Copy link
Member

ddennedy commented Nov 9, 2024

I did not reproduce it after 2 more tests on my M1.

With this version of melt fails(kdenlive crashes)

That is confusing and not what I am doing or suggested. You cannot mix and match pieces of the Shotcut and Kdenlive app bundles.

I recommended you to have a test mp4 file

I already have a test mp4 file. I do not have yours, of course, because you said you cannot share it. I understand that. It looks pretty normal from the metadata in the XML file, and FFmpeg is very robust against corrupt data. But it is possible that it is needed. What created your input.mp4?

if you don't have the M1

I already told you that I do, and I tested it successfully 3 times now.

Here is exactly how I testing:

  1. download and install Shotcut 24.10.29
  2. run it once to let macOS verify it
  3. /Applications/Shotcut.app/Contents/MacOS/melt mlt_bug_1049-mym1.mlt

@superbonaci
Copy link
Author

Is melt a program of its own or uses ffmpeg in the background?

@ddennedy
Copy link
Member

Both and neither. It is a program of its own (not made by kdenlive or shotcut) that uses FFmpeg LIBRARIES (does not run ffmpeg program).

@superbonaci
Copy link
Author

I can't provide right now sample files that reproduce the issue, maybe doesn't happen anymore?
I think it's most likely a bug in ffmpeg libraries anyway.
Closing with the intention to reopen in the future when sample files are available.

@superbonaci
Copy link
Author

Reopening since I've found a video which reproduces always the issue, on Apple M1:

$ /opt/homebrew/bin/melt -progress project-2.mlt
Trace/BPT trap: 5  112974, percentage:         25
$ /Applications/Shotcut.app/Contents/MacOS/melt project-2.mlt
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
|               H = back 1 minute,  L = forward 1 minute              |
|                 h = previous frame,  l = next frame                 |
|           g = start of clip, j = next clip, k = previous clip       |
|                0 = restart, q = quit, space = play                  |
+---------------------------------------------------------------------+
Trace/BPT trap: 5     215877
$ /Applications/kdenlive.app/Contents/MacOS/melt project-2.mlt
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
|               H = back 1 minute,  L = forward 1 minute              |
|                 h = previous frame,  l = next frame                 |
|           g = start of clip, j = next clip, k = previous clip       |
|                0 = restart, q = quit, space = play                  |
+---------------------------------------------------------------------+
Trace/BPT trap: 5     106960

Download the 2 files and check if you can reproduce the issue in MAC. Does not happen in Arch linux: link

Please do not publish the files it's just to find bugs in mlt.

@superbonaci superbonaci reopened this Nov 16, 2024
@ddennedy
Copy link
Member

I tested your new files on my M1 Mac with melt in Shotcut 24.10.29 and Kdenlive 24.08.03 twice each, and it did not crash. Since these are signed with the hardened runtime, I cannot run them in a debugger. I will next test an unsigned Shotcut build running in a debugger, which sometimes reveals a problem.

@superbonaci
Copy link
Author

I'm going to try a few more times. May it be related with not enough RAM memory or something? It doesn't look like since melt doesn't take that much RAM but just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants