ilia3101 / MLV-App

All in one MLV processing app.
https://mlv.app/
GNU General Public License v3.0
283 stars 29 forks source link

Crash when trying to export to Cineform in linux appimage #226

Closed vomver closed 3 years ago

vomver commented 3 years ago

Whenever I try to export an MLV to Cineform the program crashes. I use the appimage version for GNU/Linux. ProRes and others works fine. That could be happening? Is there a log that I can read?

I just compiled MLVapp from source, and export to Cineform (load bar works, dont crash). But when it finishes, it doesn't generate any .mov files. However in ProRes it generates the .MOV file...

masc4ii commented 3 years ago

Sounds as if you have a problem with ffmpeg on your system. In the repos you find a copy of ffmpeg which should do and does the job over here. It must be copied into the path where mlvapp executable is located. This also should be the case in the appimage. However... getting no file could mean something like "wrong ffmpeg version linked", but a crash... sry, no idea why. You just could try to debug.

vomver commented 3 years ago

I have tried it with the copy of FFMPEG from the repository, nothing. I have tried it on the apprimage extracted and in my own compilation of the program, it does not work either. I have tried with the new version 4.4 of FFMPEG, and it gets to create the .mov but generates a corrupt file, it can not be played. It is strange, because exporting to any other codec works perfectly.

I have made a debug with qtcreator (I am a complete newbie) and at the time of the crash it shows me the following error message:

"The inferior stopped because it received a signal from the operating system

Signal name: SIGPIPE

Signal meaning: Broken pipe"

masc4ii commented 3 years ago

Very strange. Here it just works as it should. All codecs work exactly identically from MLVApp side. Only difference is the ffmpeg call via pipe. But if that would be wrong, I also would see the error here. Data processing and transport is the same for all codecs.

vomver commented 3 years ago

I'm totally lost ... I thought it would be a problem with my linux (mint) distribution, so I tried another distribution in live mode, also based on Ubuntu, and exactly the same thing happened, crash at the time of transcribing to Cineform. The rest of the codecs work perfectly ...

I don't know where to go anymore, I'll try another computer just in case

masc4ii commented 3 years ago

You said, you're able to compile? You could do the following:

Now MLVApp will write out the ffmpeg output. So if ffmpeg has a problem, you could read it.

vomver commented 3 years ago

Thanks! Ok, I can read: Unknown encoder 'cfhd'

I think the problem is in ffmpeg , don't have "Encoding supported" for cineform in 4.3.2.

4.3.2 ffmpeg -codecs output: D.V.L. cfhd Cineform HD

4.4 ffmpeg -codecs output: DEV.L. cfhd GoPro CineForm HD

But, when I try to encode with the ffmpeg 4.4, makes a corrupt .mov file. I can see the error now is:

[cfhd @ 0x6017a80] Width must be multiple of 16. [cfhd @ 0x5fea040] ff_frame_thread_encoder_init failed Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

It is clear that the problem is caused by ffmpeg which does not have good support for Cineform ... on Windows and Mac Encode to Cineform works? Weird

masc4ii commented 3 years ago

Weird. Why that? I even tested on Linux exporting the Cineform file and it was working. Now you need to find a ffmpeg executable which means to be able to do that on your system. I don't understand why it is not possible for you.

masc4ii commented 3 years ago

Ok... reproduced. Will upload a new ffmpeg version (4.4) which works here. There seems to be another issue: resolution must be multiple of 16, as you also wrote: so rescale to e.g. 1920 and export works.

vomver commented 3 years ago

Thank you masc4ii! Now it works!

Finally, as you said: ffmpeg 4.4 and rescale to a 1920 (Width must be multiple of 16) solved it.

Hope this can help someone else in the same situation. Thanks again for your work.

masc4ii commented 3 years ago

https://github.com/ilia3101/MLV-App/commit/1a386183e787475688528e9e397c29229644ab6c That automatically changes resolution, if not set manually.

Thank you for testing and for reporting!