This forum has been archived. All content is frozen. Please use KDE Discuss instead.

State of AVCHD support in Kdenlive, MLT and FFmpeg

Tags: None
(comma "," separated)
IntuitiveNipple
Registered Member
Posts
16
Karma
0
Thanks for publishing these patches.

I've refreshed from the ffmpeg git repository, added the MLT patch, and refreshed my Ubuntu development packages locally. I am doing some local build tests before uploading the new packages to my Ubuntu PPA for anyone that wants to try them out.

See my other post for details of my development snapshot PPA:

http://www.kdenlive.org/forum/development-snapshot-ubuntu-packages

I have a Canon HF11 so I'll provide some feedback for you on my experiences.
IntuitiveNipple
Registered Member
Posts
16
Karma
0
The patches cause unacceptably long delays when opening the Canon MTS files - I'm not sure about other camera's files of course.

I have a project with about 20 clips in the project 'tree'. When kdenlive (ffmpeg 0.5+svn20090820, MLT 0.4.4+git20090820 and kdenlive 0.7.5+svn20090818) started it would take about 15-20 seconds to bring up the GUI whilst it scanned the files.

With ffmpeg 4:0.5+svn20090822 (r19681) and MLT 0.4.4+git20090820 + producer_avformat.new_.patch the GUI took more than 10 minutes to appear and most of that time both CPU cores were pushing 100%. Once the GUI was up I selected one MTS clip in the project 'tree' and tried to play it. The clip preview pane remained black whilst the CPU pushed one core to 100% and sat there for several minutes but no playback occured. In the end I closed the program.

I reverted just the MLT packages to the previous version but the long delays and high CPU usage continued so it seems to be the ffmpeg r19681 patches causing this:

cd /var/cache/apt/archives/
sudo dpkg -i libmlt1_0.4.4+git20090820-0ubuntu1~tj~ppa2j_amd64.deb libmlt++2_0.4.4+git20090820-0ubuntu1~tj~ppa2j_amd64.deb melt_0.4.4+git20090820-0ubuntu1~tj~ppa2j_amd64.deb

Is there any useful debugging I can do to help you discover the cause of this?
shadow_drupal
Registered Member
Posts
6
Karma
0
Hi,

the reason is found: Canon MPEG-TS files don't properly mark key frames, thus seeking reads the whole file. So we need to find some workaround for that. Simplest one is the attached patch, but that won't be accepted in FFmpeg.


Index: libavcodec/h264_parser.c
===================================================================
--- libavcodec/h264_parser.c (revision 19681)
+++ libavcodec/h264_parser.c (working copy)
@@ -168,6 +168,8 @@
/* key frame, since recovery_frame_cnt is set */
s->key_frame = 1;
}
+ if (s->pict_type == FF_I_TYPE)
+ s->key_frame = 1;
pps_id= get_ue_golomb(&h->s.gb);
if(pps_id>=MAX_PPS_COUNT) {
av_log(h->s.avctx, AV_LOG_ERROR, "pps_id out of range\n");


Regards,

Ivan
stlpaul_drupal
Registered Member
Posts
17
Karma
0
Using ffmpeg 0.5 release, loading clips and generating thumbnails from my Canon HG10 camera's m2ts files would take several minutes. Using a recent SVN build (from 16 September 2009) it is nearly instant!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]