Bug 432192 - Error cannot get duration for file
Summary: Error cannot get duration for file
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: 20.12.1
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-27 11:19 UTC by Arno Rog
Modified: 2021-05-16 14:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.04
fritzibaby: Brainstorm+


Attachments
Offending mp4 which cannot be added to the project bin (715.05 KB, video/mp4)
2021-01-27 11:19 UTC, Arno Rog
Details
Dialog proposing a transcode when file with unknown duration is added (43.61 KB, image/png)
2021-01-27 16:55 UTC, Jean-Baptiste Mardelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arno Rog 2021-01-27 11:19:30 UTC
Created attachment 135232 [details]
Offending mp4 which cannot be added to the project bin

While adding mp4 file KDENLIVE throws error: Error cannot get duration for file. Codec Google/On2's VP9 Video (VP80)

STEPS TO REPRODUCE
1. add file in attachment to Project bin

OBSERVED RESULT
Error cannot get duration for file

EXPECTED RESULT
I would like to be able to use this mp4

SOFTWARE/OS VERSIONS
Windows: 10 (latest)
KDENLIVE: latest version (2.12.1)

ADDITIONAL INFORMATION
None
Comment 1 Jean-Baptiste Mardelle 2021-01-27 16:54:38 UTC
Thanks for your report. Kdenlive uses ffmpeg under the hood and if ffmpeg cannot determine the length of the clip, we cannot use it. In git master, I have implemented a check for such clips, and a dialog now pops up asking if the user wants to transcode the file. However currently it leaves the transcoding profile choice to the user among a dozen different profiles, which can be confusing - we should reduce the choices. Usually, a basic MKV remuxing works for these cases. Leaving this issue opened until this is implemented. This will be included in Kdenlive 21.04.

In the meantime, you need to manually remux the files, with a command like:
ffmpeg.exe -i myvideo.mp4 -vcodec copy -acodec copy result.mkv

This will create a copy of the original video without re-encoding and will fix the duration issue.
Comment 2 Jean-Baptiste Mardelle 2021-01-27 16:55:32 UTC
Created attachment 135238 [details]
Dialog proposing a transcode when file with unknown duration is added
Comment 3 emohr 2021-01-28 18:24:55 UTC
I think Bug432210 is the same?
Comment 4 Julius Künzel 2021-05-16 14:05:59 UTC
This should be fixed with 21.04 as explained above. Closing.

Feel free to reopen if you still have problems.