Comments (11)
It works for me using MLT git and FFmpeg 3.0.3 (as used in Shotcut 16.10) and a .cube LUT from here: http://www.tommajerski.com/tcolorbmd.html
What OS and FFmpeg version are you using?
Are you certain that MLT is built against the same libavfilter version as ffmpeg?
Does it work with Tom_Majerski__Tcolor_BMCC_v1_7.cube?
from mlt.
So I have two versions of melt : the packaged one (I'm on arch, and I have 6.2.0-1) and the git one. I have also a packaged ffmpeg (3.1.3) and a git ffmpeg. On both ffmpeg (and thus with both avfilter) it is working perfectly. But no luck with either of my melt installations.
No luck either with the other cube file (would have been suspicious)
It is surprising that the error message is so uninformative. With a wrong path for the cube file, for example, I get a correct error message.
from mlt.
OK, it does not surprise me if avfilter (or just some of it) broke with a newer version of FFmpeg. Thanks for reporting it. This will be fixed eventually, but whether it continues to work with some older versions of libavfilter remains to be determined. In the meantime, you can get a Shotcut binary from the website, which comes with its own melt and FFmpeg combination that does work.
from mlt.
Ok so after some investigation, this seems to happen because libavfilter is using the system locale when called through melt. This causes a bug because on my system the locale is french and thus it expect commas to define floating point numbers (9,5 instead of 9.5) and this is not the convention followed in the cube files.
Is melt overriding the locale at some point ?
from mlt.
Good find! Melt is not overriding it, but MLT does call setlocale() to read and switch to the system/environment locale so people can use their normal numeric format on the command line and in MLT XML. I would not call that an override as much as it is honoring it. A workaround is to call melt with LC_NUMERIC=C. However, that will not help apps like Shotcut. Hmm... I will have to see if I can switch temporarily to C within filter_avfilter at the right moment when libavfilter/lut3d reads its file.
from mlt.
Well the issue is spotted here with lut3d filter, but I believe it is likely to occur anytime a third party effects needs to read input. lut3d is probably not the only one in that situation, is it ?
Anyways, switching locale, even temporarilly, is a bit curbersome given that melt spawns many threads.
This link might prove relevant : http://stackoverflow.com/questions/6561723/thread-specific-locale-manipulation-in-c
from mlt.
It is "anytime" something simply assumes the locale is C and does not use conversion functions such as strtod_l() to supply the locale of the source. So, really, the bug is in libavfilter for using locale-sensitive conversion functions against a fixed-locale data. I am leaning towards preparing a patch to libavfilter. Unfortunately, some runtimes such as mingw32 do not provide that function and require something hackish or unfixed, which will complicate a patch and its acceptance. :-/
from mlt.
Well, they don't violate any standards by assuming that the locale is C because it is the default locale defined by the standard. Moreover, they are not dealing with user inputs, only reading file with a standard format.
As you mentioned, there is no standard/portable way in plain C to read inputs in a locale agnostic way. This makes me very dubious about them accepting such a patch.
The problem really is that mlt and libavfilter don't have the same assumptions about the locale. The correct way forward seems to take this as a fact and cope with it.
from mlt.
Have you tested the fix ? I can still reproduce on my machine…
from mlt.
Yes I tested it using locale de_DE.utf8. hmm do you see any obvious problem in the commit?
from mlt.
My bad. My build got confused with the different versions of melt/ffmpeg...
So I can confirm it is fixed, which is awesowe (at least on linux) :) Thanks for this !
from mlt.
Related Issues (20)
- mlt 7.22.0 does not compile with libxml2 2.12.0
- Exporting AVI format videos is very blurry and clearly mosaic like HOT 2
- 7.22.0 CMakeLists.txt HOT 1
- mlt.so does not specify dependency on libruby.so HOT 1
- [SVT-AV1] MLT does not seem to support any configuration done via Kdenlive interface except "preset". HOT 1
- Discovered a bug regarding image size scaling and rotation
- sdl consumer may require SDL12COMPAT_NO_QUIT_VIDEO
- Protobuf duplicate library causes crash HOT 3
- Melt SIGSEGV when using the -chain flag HOT 5
- "Why does the outline range of fonts in Shotcut span from 0 to 200, while in MLT, the range is only from 0 to 3? Is there any solution?" HOT 6
- How to change the spacing of wrapped text? HOT 3
- how to use gpu decode video? HOT 1
- MLT master fails to build with ffmpeg 7.0 HOT 6
- Is there something wrong with the hash function of mlt_properties_add? HOT 2
- avformat: vbr parameter should also accept integer values HOT 1
- Audio not synchronized
- Setting lowres>=1 for codecs that don't support lowres results in broken output
- producer_avformat performs useless work when source is intra-only and consumer framerate is lower than the source's framerate HOT 4
- [producer_xml] failed to load filter "affine" HOT 2
- Rendering .mlt File to .mp4 with melt looses image transparency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlt.