Bug 432192

Summary: Error cannot get duration for file
Product: [Applications] kdenlive Reporter: Arno Rog <arno.rog>
Component: Video Display & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: normal CC: fritzibaby, jk.kdedev
Priority: NOR Flags: fritzibaby: Brainstorm+
Version: 20.12.1   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 21.04
Attachments: Offending mp4 which cannot be added to the project bin
Dialog proposing a transcode when file with unknown duration is added

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.