Bug 430262 - AVI file without duration metadata doesn't load as clip
Summary: AVI file without duration metadata doesn't load as clip
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: 20.08.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-11 15:20 UTC by danitxu
Modified: 2020-12-12 17:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Piece of problematic AVI file (1.00 MB, video/x-msvideo)
2020-12-11 15:20 UTC, danitxu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description danitxu 2020-12-11 15:20:36 UTC
Created attachment 134010 [details]
Piece of problematic AVI file

SUMMARY
I have an AVI file that doesn't load as clip, even ffmpeg, melt and vlc can open it without problem.


STEPS TO REPRODUCE
1. Download avi from attachment
2. Try to add as a clip

OBSERVED RESULT
A message complaining no duration appears


EXPECTED RESULT
As ffmpeg and melt can open it, it should load. I know ffprobe says "Duration: N/A", but ffplay and vlc show it


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
As the full video contains private information, I've just taken the first seconds of it using dd (if I used ffmpeg to cut, metadata for duration was inserted and the clip loads correctly)
Comment 1 Jean-Baptiste Mardelle 2020-12-11 20:08:50 UTC
It's one thing to play a file bit another issue to do editing with it. Files without duration are a problem because we need to perform some operations that require knowing its duration, like generate audiothumbnails, etc. I guess we could add a dialog asking the user to enter a duration manually.. would that work for you?
Comment 2 danitxu 2020-12-11 23:07:57 UTC
Hi Jean-Baptiste,
first of all, proud of receiving an answer for you. Let me make you know that since June, and because of the pandemic, I've been teaching Kdenlive to more than 150 people, some of them teachers in Spanish universities, and when the trainining is finished all of them  really happy with Kdenlive. It's a very very great program.

For our bug, I think a good solution would be a dialog saying something like:
* "This clip has not a known duration. Please, repair it externally or input an expected duration".
* One text input to enter duration like MM:NN:SS
* One button "Ok" enabled when duration has been entered
* One button "Cancel" whose meaning is that it will be repaired externally
I don't know the consequence for the case that the video is shorter than the entered duration; for sure you will know how to manage that situation.

Maybe another better option would be to enable to convert it inside Kdenlive, calling ffmpeg internally, instead of proposing to do it externally. Anyway this may be more work for you.

IMHO this is not an urgent bug. Thanks a lot again for your so wonderful work!
Comment 3 Jean-Baptiste Mardelle 2020-12-12 17:48:05 UTC
Git commit 511b75ff76a9d99ffbbe411f80bfc6755965453c by Jean-Baptiste Mardelle.
Committed on 12/12/2020 at 17:47.
Pushed by mardelle into branch 'master'.

Propose to transcode clips that don't have a valid duration instead of failing.

M  +7    -0    src/core.cpp
M  +2    -1    src/core.h
M  +7    -14   src/jobs/loadjob.cpp
M  +1    -1    src/mainwindow.h

https://invent.kde.org/multimedia/kdenlive/commit/511b75ff76a9d99ffbbe411f80bfc6755965453c