Kdenlive   bug tracker Home page

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002777KdenliveFile Loadingpublic2012-10-14 13:392013-01-28 19:51
Reportermale 
Assigned Toj-b-m 
PrioritynormalSeverityminorReproducibilitysometimes
StatusclosedResolutionfixed 
Platform64 bit IntelOSDebianOS VersionWheezy
Product VersionRecent git 
Target VersionFixed in Version0.9.4 
Summary0002777: Some MTS files are truncated to 5 seconds, some are prolonged to 5 seconds. (Camera: Canon Legria HFS200)
DescriptionHi!

I have a Canon Legria HFS200 camera that produces MTS files.

When loading the files in kdenlive, some of them are shown as being 5.00 seconds long, even though in reality they are shorter or longer than that. In files that are shorter the last frame is repeated, in effect freezing the last frame. Longer files are shown truncated.

By contrast, if I take a file whose length is misinterpreted by kdenlive and converts it with ffmpeg, the resulting AVI file is correct.

Attaching "clips.tar" which contains a 7.05 second film in both the original MTS and an AVI that is created with current ffmpeg.

/Martin
Additional Information$ ffmpeg -i Test6_7sec_error.mts Test6_7sec_error.avi
ffmpeg version N-35428-g9393114 Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 13 2012 18:34:08 with gcc 4.7 (Debian 4.7.1-7)
  configuration: --prefix=/home/martin/kdenlive/20121013 --disable-doc --disable-network --disable-ffserver --enable-gpl --enable-version3 --enable-shared --enable-debug --disable-stripping --enable-pthreads --enable-runtime-cpudetect --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libvpx
  libavutil 51. 76.100 / 51. 76.100
  libavcodec 54. 65.100 / 54. 65.100
  libavformat 54. 32.100 / 54. 32.100
  libavdevice 54. 3.100 / 54. 3.100
  libavfilter 3. 19.102 / 3. 19.102
  libswscale 2. 1.101 / 2. 1.101
  libswresample 0. 16.100 / 0. 16.100
  libpostproc 52. 1.100 / 52. 1.100
Input #0, mpegts, from 'Test6_7sec_error.mts':
  Duration: 00:00:07.20, start: 0.820033, bitrate: 12219 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 256 kb/s
Output #0, avi, to 'Test6_7sec_error.avi':
  Metadata:
    ISFT : Lavf54.32.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 50 tbn, 50 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (ac3 -> libmp3lame)
Press [q] to stop, [?] for help
frame= 180 fps= 14 q=31.0 Lsize= 1557kB time=00:00:07.24 bitrate=1759.7kbits/s
video:1419kB audio:113kB subtitle:0 global headers:0kB muxing overhead 1.657709%
TagsNo tags attached.
Build/Install MethodBuild Script
Attached Files? file icon Test6_7sec_error.mts [^] (11,010,048 bytes) 2012-10-14 14:19
? file icon Test6_7sec_error.avi [^] (1,594,246 bytes) 2012-10-14 14:22

- Relationships

-  Notes
(0008462)
j-b-m (administrator)
2012-10-14 23:00

Ok, the problem is caused by a broken mimetype detection. Kde seems to detect your file as image/targa instead of the correct video mimetype. Kdenlive then thinks it is an image clip, giving it the default duration for image clips.

Can you try the following to fix the problem:
Go in the KDE "System Settings" > "File Associations" and look for the "mts" extension. Make sure that the mts extension in only registered with one mimetype. On my system it was registered as "video/mpeg" and "video/mp2t*. Remove the video/mpeg association that was created by the Kdenlive Wizard, and try to restart Kdenlive and load your clip...
(0008464)
male (reporter)
2012-10-14 23:31

That did it.
But: The "Add clip" dialog doesn't show the MTS files when the filter is "All Supported Files". Have to change to "All Files" to see them. Do you know anything about that too?

Sidenote for anyone who is only using Gnome in Debian: The KDE "System Settings" is in the "systemsettings" package. It works without installing any recommends.
$ sudo aptitude --without-recommends install systemsettings
(0008465)
j-b-m (administrator)
2012-10-15 00:30

Yes, I have just added the "video/mp2t" to Kdenlive's git version. You will need to update & recompile kdenlive to get it working.
(0008468)
male (reporter)
2012-10-15 11:12

Thank you! The "All Supported Files" filter now shows MTS files.
Problem solved.

Do you know why I observed the 5-second problem only on some MTS files? Maybe one in five or so.
(0008474)
j-b-m (administrator)
2012-10-15 14:55

There might be a bug somewhere in the mimetype library, because when trying to detect the filetype using its content, some .mts files are badly detected as image/targa.

I don't have time to investigate but this is the real reason for your bug. Should probably be reported upstream...

- Issue History
Date Modified Username Field Change
2012-10-14 13:39 male New Issue
2012-10-14 14:19 male File Added: Test6_7sec_error.mts
2012-10-14 14:22 male File Added: Test6_7sec_error.avi
2012-10-14 23:00 j-b-m Note Added: 0008462
2012-10-14 23:00 j-b-m Assigned To => j-b-m
2012-10-14 23:00 j-b-m Status new => feedback
2012-10-14 23:31 male Note Added: 0008464
2012-10-14 23:31 male Status feedback => assigned
2012-10-15 00:30 j-b-m Note Added: 0008465
2012-10-15 11:12 male Note Added: 0008468
2012-10-15 14:55 j-b-m Note Added: 0008474
2012-10-15 14:55 j-b-m Status assigned => resolved
2012-10-15 14:55 j-b-m Resolution open => fixed
2013-01-28 19:49 j-b-m Fixed in Version => 0.9.4
2013-01-28 19:51 j-b-m Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker