Black Border - how do I get rid of that??

There was a post in the old forum but it found an answer...

When I export my videos I have two problems:

1. No matter how I preset up the video, the export is always PAL and I want NTSC;
2. My videos have a black edge/border around them which should not be there.

Does anyone have a solution to either of these? I am using the most recent Kubuntu build that I could find (0.5~svn20070422+3v2ubuntu0 found with links in the Installation manual). I cannot take a screen shot to show :( it turns out wrong always, but trust me the black border is there and it takes up a lot of screen spce.

And when is KDEnlive 0.5 due for release?


I have to confirm. See screenshots: ... er_bug.png

Well, in my case, there was already a black border but after rendering in Kdenlive (0.4, mlt 0.2.3) they get much bigger.

Temporary workaround:
Use Avidemux as a postproduction tool, load rendered movie, use filters to remove border + resize to original size (PAL in my case) and reencode.
Not ideal - double reencoding + waste of time and disk space - but workable.
I have to use Avidemux anyway to get around my picture jerking (jittering) problem, see my posts in this section, so I simply add two more filters ;-)

wow. thats some work! thanks for the temporary solution, i hope that the new releases fix this on their own... someday soon i hope...


I cannot reproduce that problem. Could someone mail me - jb at kdenlive org - or give me a link to a video file that I could use to reproduce this? Also let me know which export profile shows this problem & which format has your project (PAL, NTSC, 4:3 or 16:9)

Try ... golany.vob

(7.5MB, mpeg2 VOB, full PAL, interlaced)
The screenshots in my previous post are taken from this movie clip.
Render it with default DVD PAL settings.
I use kdenlive 0.4 and mtl 0.2.3 pro SUSE Pacman repos.

..and you can also check my other two issues with rendering this movie ;-)
namely low quality (corrupted?) first frame, strange IPB frames order (B is missing) and edge jittering when playing in hardware DVD player

Ok, I can confirm the black border problem, will try to debug it.

j-b-m I emailed you two files of about 15MB total in size.

I hope this works for you. The original file was filmed and captured NTSC widescreen in Kino; the 'export.avi' file is KDEnlive's render in mpeg4, NTSC, widescreen, highest mpeg4 resolution and quality settings possible. I get this look (black borders) with any format that I choose, however. (Just ask and I'll try whatever settings you'd like).

Thanks. I'll take down the link to this server in a few days.


I found the problem that caused black borders for both of you. The thing is that at export time, Kdenlive sets an aspect_ratio value which is not correct.

The aspect_ratio and display_ratio parameters need to be correctly adjusted so that you have no black borders and that the movie is displayed correctly. However I don't know if it is possible to calculate the right value for these parameters for every possible combination, at least I don't have enough knowledge to do it.

So I just made a commit to svn to allow users to override those parameters in custom encoding templates.

espinosa_cz, I can render your video correctly by adding "aspect_ratio=0" to the encoding parameters.
el_jefe, I can render them correctly by adding: "aspect_ratio=0 display_ratio=0" to the encoding parameters

(Of course you need to have an svn version from 5 minutes ago for this to work)

I know that the export is currently a weak point in Kdenlive, so if someone who has time or a better knowledge of these things wants to help, welcome. But at least now you can play with it by yourself by setting values in the custom encoding parameters.


can these parameters just be added for every output option? or does it ruin other outputs or not work with some input file types?

thank you so much j-b-m, I cannot wait to get the next release! (kubuntu 7.04? :) )

Confirmed. It works!

So now I have in my export profile:
".. aspect=4:3 aspect_ratio=0 ..." is that right. Seems to be.

Ooops. Got a huge problem :( No titles are rendered when aspect_ratio=0 is added to export profile!
Try add some text clip to my video project with any text and export my clip again. You will see no text in output video.
When I remove aspect_ratio=0, text is back. Tried several other options, but aspect_ratio=0 is responsible for the disapperance.
Strange, isn't it?

I cannot add these parameters to every output command since it makes some other exports wrong. The thing is that there are many possibilities, depending on which standard you are working with (PAL, NTSC, 4:3, 16:9) and which format and size you want to export. I have not found a reliable way to find the appropriate aspect_ratio and display_ratio values for every combination, so for the moment, I'll leave it to the user to do adjustments when they are needed.


J-B-M There is more serious problem here I am afraid.
The aspect_ratio is applied differently to different video layers/tracks.
I have just tested the video clip (lower track) with one simple transparent text clip (upper video track) and the position of the text seems to be "floating" depending on aspect_ratio setting. I have tested various values, 0, 1, 1.5, 0.8, 0.9, 2 .. and with each value position of text was different, relative position to underlaying video I mean. When aspect_ratio=0, text disappeared completely (got off the picture I guess)
This is probably not a desired behavior.
I would not encourage ordinary user to change these values until this multitrack position problem is solved.
MTL or livavformat bug?

My export was default DVD PAL mpeg2 720x586


I just committed a fix that now makes it work I think. You can add the aspect_ratio=0 without having titles floating around. Can you please test and let me know what you think ?

The commit does some rather important changes in the way videos are exported. Now, if you export in 320x200, instead of having black borders, the video will be full screen, but it's aspect ratio will be correctly set so that when playing the video it should be scaled by the player.

Can anyone please test this new setting and let me know if it is better that way ?


I originally send this to mailist but it seems to be down. So I put this here too.

So I hopefully builded as it should be. ffmpeg, mlt and kdenlive from SVN.

Just one strange thing.
espinosa@esplaptop:~/build> ldd lib/ => (0xffffe000) => /lib/ (0xb7eb6000) => /lib/ (0xb7eb2000) => /lib/ (0xb7e9a000) => /lib/ (0xb7d6c000)
/lib/ (0x80000000)
MLT is NOT linked with ffmpeg?
How do I know if MLT does use the right version of ffmpeg (compiled svn and NOT system one)

I cannot see audio thumbnails - will check later
I cannot play video clip in clip preview window - will check later

I tested only DVD rendering with default settings.
I reused my old project from 0.4 version.

Rendering of selection is broken!
I cannot load some rendered short clips to Avidemux. (Cannot read file)
Longer clips - Avidemux can read them, but they appear damaged after few frames, wrong length is displayed, as if whole timeline was rendered, playback ends prematurely with error message about damaged file (cannot read next frame).
Wrong length data in mpeg header?

However clip is playable in xine or mplayer, no error messages even in playback log.

Rendering of whole time line seems to be OK.
Aspect ratio is OK!
No big black borders!
Text clip track is rendered and on the right place!

First frame is too compressed (quantized). Appears damaged in xine. Check my forum post.
Frame count is lower compared to original clip (320 compared to 332)

Will report more tomorrow.