Bug 362097

Summary: Audio thumbnails incomplete
Product: [Applications] kdenlive Reporter: DonnW <kmiller2794>
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description DonnW 2016-04-22 17:33:43 UTC
Audio thumbnails only show waveform for first part of video clip then followed by a straight line.
Appears to affect 5.1ch audio clips  in mts format from my Panasonic camcorder. 
Does not seem to occur with stereo tracks, where thumbnail shows for whole length of clip as expected.

Audio plays and renders normally.
Comment 1 DonnW 2016-04-22 17:36:07 UTC
Version: 4:16.07.70+git201604212243~ubuntu15.10.1 from ppa:Kdenlive-master
Comment 2 Jean-Baptiste Mardelle 2016-04-22 22:07:45 UTC
Git commit 3981c3ea0bfa101313f3bb376cad0f08f77439b4 by Jean-Baptiste Mardelle.
Committed on 22/04/2016 at 22:03.
Pushed by mardelle into branch 'Applications/16.04'.

Fix audio thumbnails for 5.1 audio

M  +51   -23   src/bin/projectclip.cpp

http://commits.kde.org/kdenlive/3981c3ea0bfa101313f3bb376cad0f08f77439b4
Comment 3 Jean-Baptiste Mardelle 2016-04-23 00:14:32 UTC
Thanks for your report. I just fixed the issue (and also increased creation speed). 
If you have old incorrect audio thumbs in a project, you will need to delete them in 
Project > Project Settings > Project Files > Clear Cache

I pushed the fix to master and 16.04 branch, the PPA should be updated in a few hours.
Comment 4 DonnW 2016-04-23 10:28:15 UTC
After updating to the latest version I cleared the cache and reloaded the thumbnails. The same problem occurred.  I did this again, but de-selected  Use FFMPEG to generate thumbnails and this generated them properly although much more slowly.  To check this again I re-selected FFMPEG option and thumbnails were not generated correctly.
Comment 5 Jean-Baptiste Mardelle 2016-04-23 14:55:46 UTC
Can you please post the result of this command:
ffmpeg -i yourvideo.mts
Comment 6 DonnW 2016-04-23 16:22:55 UTC
Resust of the ffmpeg -i was:

Input #0, mpegts, from '00013.MTS':
  Duration: 00:00:24.03, start: 0.374033, bitrate: 15433 kb/s
  Program 1 
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
Comment 7 Jean-Baptiste Mardelle 2016-04-24 08:59:50 UTC
I just pushed another change to audio thumbs in master and 16.04.
Can you try it ? If it still doesn't work I will need a video sample since it now works for my test clips
Comment 8 DonnW 2016-04-24 18:22:08 UTC
I have tried  the  modified version in the ppa. When I selected create thumbnails with ffmpeg and then restarted Kdenlive it loaded up the project and then crashed before any thumbnails were generated.  This happened every time I restarted it.  I started a version of a recently  compiled kdenlive from the build script, reset the thumbnail generation to not use ffmpeg (to reset the configuration file) and then restarted the installed version. It then worked ok until I reselected ffmpeg option again. I tried running  Kdenlive with:
gdb kdenlive
run

then 

thread apply all bt after it had crashed.

this started Kdenlive which was frozen at what looked like thumbnail generation stage.

the output from thread apply all bt  was:
Couldn't get registers: No such process.
(gdb) 

How do I attach or send you a sample video file. My clips are quite large even a short  10s clip is 68Mb which exceeds the allowed size for an attachment
Comment 9 Jean-Baptiste Mardelle 2016-04-24 20:18:12 UTC
Yes, sorry. My yesterday's fix introduced a crash that I fixed this morning.
Please test again when the PPA is updated, and if it still fails to properly create thumbs, you can use file sharing service to upload a sample file.
Comment 10 DonnW 2016-04-25 10:12:43 UTC
I've tested it on two separate projects with no more problems. It looks like it's fixed

Thanks