H.264 renders unusually slowly, unusually large file size and with an echo in 0.7.8 on Ubuntu 10.10

Hey everyone. I would like to start off by saying that I love kdenlive and I use it more then daily. I really appreciate all the work you guys have put into this software and it has allowed me to do more with video then I thought I could.

I have used H.264 as my primary format for around a year now, but it has been acting strange lately, though I don't think I had this problem off the bat with Ubuntu 10.10. I got kdenlive off the repository provided at the download section of this site.

I did a few test renders that I think will show the problem. They are each of the same 1 minute clip at 200k with no customization:

XVid4 renders in 0:51 and the file was 3.8MB
MPEG-4 renders in 0:52 and the file was 3.7MB
H.264 renders in 3:59 and the file was 46.0MB

I don't know if the size, render time and the echo are related problems, but they all came about at the same time. I should also point out that the H.264 file looks a lot better. It may be that it just isn't rendering at the desired rate. Any help would be greatly appreciated.

Thanks,
Lexen

Forums:

Am I really the only one having this problem?

You have a binary compatibility problem in the versions of your mlt/ffmpeg/x264 packages.

I have the same problem as the OP on my Ubuntu 10.10 system.

I looked into using the compiled (and I assume consistent) packages from ppa:sunab/kdenlive-release as described here: http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/....

However, the sunab packages have not been updated since September and are the same ones as those used in the Ubuntu 10.10 standard repos.

So, instead I tried the weekly builds at ppa:sunab/kdenlive-svn, but unfortunately I couldn't get those to work either, see here: http://www.kdenlive.org/forum/weekly-build-ubuntu-1010-error-while-loadi...

Edit: Now I've got the weekly build version running (kdenlive_0.7.8+svn20101211.r5156-0ubuntu0~sunab~maverick1_amd64), however the same problem is present: i.e. the file size of H.264-output is 5-10 times larger than expected.

Edit2: If I reduce the specified bit rate (b=5000k) by about a factor of 30 (b=150k) I get a rendered file of somewhat equal quality and file size as I used to get before this problem started occurring.

I have in some point the same problem:
First - Kdenlive renders in x264 codec with max bitrate, sometimes it's 35k, sometimes 100k (170MB file and only 13s long - http://img88.imageshack.us/img88/2440/14234.png ) but in render profile I use 10k ore something like that :/

and some problem in Avidemux also when I use MPEG -4 AVC = the same source to render in 8k 1080p the resoult is ~ 500KB file with super bad picture quality....

so, where is the problem, maybe my x264 codec is damage?
any suggestions? :o

I have same problem.
If I try render project with libx264 and try b=2000k or b=4000k or b=somewhat - result is always same - cca 20000k-30000k bitrate. (depends on project). In november was everything OK.
Example:
In Kdenlive I set: f=mp4 hq=1 acodec=aac ab=128k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 b=4000k b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=%dar

Command line output:
//STARTING RENDERING: true , false , "/usr/bin/melt" , "hdv_720_25p" , "avformat" , "-" , "/tmp/kde-mapajaysxxAc/kdenliveGm4940.mlt" , "/home/mapaja/kdenlive/test.mp4" , () , ("f=mp4", "hq=1", "acodec=aac", "ab=128k", "ar=48000", "pix_fmt=yuv420p", "vcodec=libx264", "minrate=0", "b=4000k", "b_strategy=1", "subcmp=2", "cmp=2", "coder=1", "flags=+loop", "flags2=dct8x8", "qmax=51", "subq=7", "qmin=10", "qcomp=0.6", "qdiff=4", "trellis=1", "aspect=@16/9") , -1 , -1
Started render process: "/usr/bin/melt" "/tmp/kde-mapajaysxxAc/kdenliveGm4940.mlt -profile hdv_720_25p -consumer avformat:/home/mapaja/kdenlive/test.mp4 progress=1 f=mp4 hq=1 acodec=aac ab=128k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 b=4000k b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=@16/9"
Rendering of "/home/mapaja/kdenlive/test.mp4" finished

You can see above: b=4000k is correct, but sample project is near 20 000 kbps!! (depends on project)
If I change b= value on other value, result is always identical - 4 or 5 times larger bitrate.
My system:
Ubuntu 64bit -2.6.35-24-generic
FFmpeg version 0.6-4:0.6-2ubuntu6
Kdenlive 0.7.8
MLT 0.5.10

Any suggestions? Thank you

Sounds like this may be an ubuntu specific bug. I would recommend you report it to the provider of your packages or compile it yourself from source. See ddenedy's post above.

I just tried on Fedora 14 x86-64 using a recent SVN version of mlt/kdenlive and the packaged version of ffmpeg and I cannot reproduce this problem.

I would like to report this bug, but I just don't know how to!

But if this would be fixed if I install full new OS, ore this would happen again?

I have noticed the problem first in kdenlive this week - version from ubuntu repos.
Then I installed last version (ppa:sunab/kdenlive-release) and problem perist.
I tried to run Kdenlive under new user with plain configuration - and same problem.
My last succesfull rendering with this codec was 28.11.2010 So some Ubuntu upgrade after this time should have a bug.
I suspect MLT and 64bit libraries. I am going to try it tomorrow on 32bit ubuntu system.

Dalgo,
That would be great if you reported a bug to ubuntu or searched on their forums and bug reports.
Bug reporting to ubuntu is done through launchpad, if I recall correctly. I think through here: https://bugs.launchpad.net/ubuntu/ I'm sure there is good guidance on the ubuntu forums if you have trouble.
Bug reporting to kdenlive is documented here: http://kdenlive.org/bug-reports But if this is truly a ubuntu specific issue it won't help much to report here. Of course the more info you find the better (see below).

Mapaja,
That is a useful observation. Maybe you can use the history feature of synaptic to tell what has been changed or some other listing? I'll bet there is a way to get a history of changes, just don't know off hand. Look for updates to mlt/ffmpeg/x264/libav* or others that might be related. The first post is from 12/2 so maybe it was from just before that.

Geoff

Geoffrey, I have it:
2010-12-09 20:54:39 upgrade libx264-98 2:0.98.1653+git88b90d9-3 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-09 20:54:39 status half-configured libx264-98 2:0.98.1653+git88b90d9-3
2010-12-09 20:54:39 status unpacked libx264-98 2:0.98.1653+git88b90d9-3
2010-12-09 20:54:39 status half-installed libx264-98 2:0.98.1653+git88b90d9-3
2010-12-09 20:54:40 status half-installed libx264-98 2:0.98.1653+git88b90d9-3
2010-12-09 20:54:40 status unpacked libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-09 20:54:40 status unpacked libx264-98 2:0.98.1653+git88b90d9-3ubuntu1

It may be the the one, but I don't understand more.

Next change libx in log was yesterday, when I add ppa:sunab/kdenlive-release and install new version kdenlive/mlt:
2010-12-23 14:27:14 upgrade libx264-98 2:0.98.1653+git88b90d9-3ubuntu1 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:14 status half-configured libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:14 status unpacked libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:14 status half-installed libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:14 status half-installed libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:14 status unpacked libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:14 status unpacked libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:15 startup packages configure
2010-12-23 14:27:15 configure libx264-98 2:0.98.1653+git88b90d9-3ubuntu1 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:15 status unpacked libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:15 status half-configured libx264-98 2:0.98.1653+git88b90d9-3ubuntu1
2010-12-23 14:27:15 status installed libx264-98 2:0.98.1653+git88b90d9-3ubuntu1

I will be glad to help. Tomorrow I will try kdenlive on friend's PC (32bit ubuntu) (hope that she don't upgrade this month :-)
Mapaja

Render profile -: H.264 2000 k 720p
Resoult -: 21400 K

//STARTING RENDERING: true , false , "/usr/bin/melt" , "atsc_720p_30" , "avformat" , "-" , "/home/kkk/.kde/tmp-kkk-Aspire-7520/kdenlivei11844.mlt" , "/home/kkk/Dokumenti/KDENLIVE/untitled.mp4" , () , ("f=mp4", "hq=1", "acodec=aac", "ab=128k", "ar=48000", "pix_fmt=yuv420p", "vcodec=libx264", "minrate=0", "b=2000k", "b_strategy=1", "subcmp=2", "cmp=2", "coder=1", "flags=+loop", "flags2=dct8x8", "qmax=51", "subq=7", "qmin=10", "qcomp=0.6", "qdiff=4", "trellis=1", "aspect=@16/9", "pass=1") , -1 , -1
Started render process: "/usr/bin/melt" "/home/kkk/.kde/tmp-kkk-Aspire-7520/kdenlivei11844.mlt -profile atsc_720p_30 -consumer avformat:/home/kkk/Dokumenti/KDENLIVE/untitled.mp4 progress=1 f=mp4 hq=1 acodec=aac ab=128k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 b=2000k b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=@16/9 pass=1"
Rendering of "/home/kkk/Dokumenti/KDENLIVE/untitled.mp4" finished
Started render process: "/usr/bin/melt" "/home/kkk/.kde/tmp-kkk-Aspire-7520/kdenlivei11844.mlt -profile atsc_720p_30 -consumer avformat:/home/kkk/Dokumenti/KDENLIVE/untitled.mp4 progress=1 f=mp4 hq=1 acodec=aac ab=128k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 b=2000k b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=@16/9 pass=2"
Rendering of "/home/kkk/Dokumenti/KDENLIVE/untitled.mp4" finished

It seems the number are right, but video is wrong :/
don't know how to find the problem...
bet yes this looks like come from the updates, so need to find the bud in it :)

here is my updates, but if it helps? http://img5.imageshack.us/img5/1553/3456789y.png

Geoffrey and others,
I tried it on 32bit system (Ubuntu Studio 10.10) and same problem!2.6.35-24-generic
You can download my test pack (26 MiB) here:
http://dl.dropbox.com/u/7955435/TestKdenlive.zip

Rendered mp4 file (append) has bitrate 20971k (instead of 2000k). I tried it on two computers.
In my opinion it point at bug in libx264

I wish you a Merry Xmas!

Pavel

mapaja - for me it also renders in 20845 kbps, 19,5 MB size. It's libx264 bug :/

Pavel,
I tried your test file and it would not immediately render properly for me (the beginning was cut off). I then transcoded it to DNXHD 1080p 25fps 185Mbp/s and it worked fine. The resulting file was 2.1 MB at the H.264 2000k setting of your screenshot - which sounds about right. So again - confirmed bit rate not a problem on Fedora14.

I found a bug report that seems to match what you are describing:
https://bugs.launchpad.net/ubuntu/+source/x264/+bug/690296

You may want to get an account on launchpad and jump in.

You may want to also try to roll-back to an earlier version. IIRC this can be done in synaptic.

You may also want to try to contact the Sunab repository owner with the information you and Dalgo have found and see if he has any input on this.

Also another bug that might have some relation? https://bugs.launchpad.net/ubuntu/+source/x264/+bug/663535

Hope this helps. Happy Holidays. Geoff

Thank you everyone for helping to get the bug figured out.

I have switched to the SVN repository at ppa:sunab/kdenlive-svn thanks to sonofjon. I have also filed a bug report with launchpad: https://bugs.launchpad.net/ubuntu/+source/x264/+bug/696129. If anyone can think of anything I could add to it, please let me know.

Thanks,
Lexen

Lexen, thank you for adding bug to launchpad.
Only one thing: I registered this problem on 32bit ubuntu too. (Not only 64bit.)
I hope 690296 bug will be repared soon.
Bye Pavel

There is a fix released in ubuntu-proposed. See Launchpad page linked above.