You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue with incorrect file import using MLT Library #1073
First of all, thank you so much for your excellent library!
Now, onto the issue:
We are currently experiencing a problem with incorrect file import when using the MLT library.
Specifically, we have a file that is being decoded incorrectly upon import.
The file shows incorrect metadata such as sample rate, duration, etc.
Here is the output of some fields after creating a producer:
Initially, we thought we might be using the API incorrectly, so we tried converting the file using melt.
However, the conversion command never completes:
It is working for me using the version of MLT included in the Linux Mint 22 repos. It also works for me using a Shotcut build I make for shotcut.org for any OS. You can easily try that yourself. Here is mint output:
That value is INT_MAX, which is our special value that means unknown or possibly a live source. MLT uses the duration provided by AVFormatContext.duration. For this file, FFmpeg libavformat returns AV_NOPTS_VALUE, which is their constant for the same thing. ffprobe on the file reports "Duration: N/A ... bitrate: N/A". MLT cannot determine length by decoding a file until it ends or errors to determine its length because that will take took long. I suppose a ffmpeg transcode command does that, but MLT is more complicated than that. You, the user or application, can choose to do that and set the "length" property on the producer. Not every file can be used with MLT and some can be converted using remux, transmux, or transcode to be usable.
Activity
ddennedy commentedon Mar 16, 2025
It is working for me using the version of MLT included in the Linux Mint 22 repos. It also works for me using a Shotcut build I make for shotcut.org for any OS. You can easily try that yourself. Here is mint output:
Maybe you are using an old version of MLT. There was an important fix for FLAC committed around 2 years ago.,
ice0 commentedon Mar 17, 2025
Yes, but could you please check the attached file?
This is what it shows on my system:
As you may notice length is
2147483647.ddennedy commentedon Mar 17, 2025
That value is
INT_MAX, which is our special value that means unknown or possibly a live source. MLT uses the duration provided byAVFormatContext.duration. For this file, FFmpeg libavformat returnsAV_NOPTS_VALUE, which is their constant for the same thing.ffprobeon the file reports "Duration: N/A ... bitrate: N/A". MLT cannot determine length by decoding a file until it ends or errors to determine its length because that will take took long. I suppose a ffmpeg transcode command does that, but MLT is more complicated than that. You, the user or application, can choose to do that and set the "length" property on the producer. Not every file can be used with MLT and some can be converted using remux, transmux, or transcode to be usable.ice0 commentedon Mar 23, 2025
Dan, thank you for the detailed explanation!