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

Output Scaling Problem

Tags: None
(comma "," separated)
Crispy Beef
Registered Member
Posts
9
Karma
0

Output Scaling Problem

Tue Apr 06, 2010 5:43 pm
Hi,

I've been using kdenlive for a while and it's always done a great job, but recently I've found the output of some videos have vertical green bars that flash up once in a while. I've tracked this down to videos that are scaled. Normally I work out the correct pixel aspect ratios and all is fine but now I cannot seem to get videos to render (scaled down) cleanly.

My recent video in source format is 768x576 (4:3) with a display aspect ratio of 1:1. I have a project profile set to render 400x300 (4:3) with the same display aspect ratio of 1:1. When rendered the picture looks fine except for the green vertical bars that flash up now and then. If I render to another project profile in the source resolution then the bars are not there, so I assume this is due to the scaling of the video. This used to work so I wondered if I've done something or if anybody else has any suggestions?

I should also point out that I get the same vertical bars no matter what codec I use, I've rendered out using; flv, mpeg4, and with various containers and the H.264 codec but all have the same result.

Any ideas?

Thanks.
ddennedy
Registered Member
Posts
1315
Karma
1

Re: Output Scaling Problem

Wed Apr 07, 2010 3:48 am
Make sure you are accurate in your description and provide exact details. For example, your _display_ aspect ratio is 4:3 and your pixel aspect ratio is 1:1. But it is not clear how you are specifying them. I need to know your exact project settings and exact render settings.


Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Wed Apr 07, 2010 9:11 am
Hi,

Thanks for the reply, sorry about the mix-up of the details, you are of course correct, the DAR is 4:3 and the PAR is 1:1. Here are the exact details taken from my project:

Source Clip Properties
----------------------
AVI Container
Video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Frame size: 768x576
Frame rate: 25.000000

Target Profile
--------------
Size: 400x300
Pixel Aspect Ratio: 1/1
Framerate: 25/1 (PAL)
Display aspect ratio: 4/3
Progressive

With regards to the rendering settings I've tried a few different combinations. The first rendering settings are my own, the second are the default H.264 settings as distributed with kdenlive.

f=flv hq=1 acodec=libfaac ac=1 ab=64k ar=11025 pix_fmt=yuv420p vcodec=libx264 minrate=0 b=450k 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

f=mp4 hq=1 acodec=aac ab=128k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 b=1000k 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

It's worth noting that if I alter the project settings and don't scale down to 400x300 and render at the source clip resolution then the clip renders perfectly, likewise using the 640x480 YouTube rendering defaults the clip renders just fine. Not quite sure why the 400x300 output is now having this issue, as mentioned it used to work perfectly.

For completeness I am running kdenlive 0.7.7 on KDE 4.3.4 under Gnome on a PowerMac G5 running Debian Linux. Although I've reproduced the output on an AMD64 machine running Debian and the same version of KDE and kdenlive.
Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Wed Apr 07, 2010 11:34 am
I have a workaround at the moment which is a bit tedious but does produce a perfectly scaled video. I output from kdenlive at the source resolution and in higher quality than required, then scale down to 400x300 with ffmpeg. This produces the required results, it's a shame I can't get the scaling to output right from kdenlive though.
Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Fri Apr 09, 2010 11:35 am
*bump*

Any ideas?
ddennedy
Registered Member
Posts
1315
Karma
1

Re: Output Scaling Problem

Mon Apr 19, 2010 12:25 am
Is the flashing green bar only about 1 or 2 pixels wide on the right side?


Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Mon Apr 26, 2010 11:39 am
The green bars are a few pixels wide and flash up now and then throughout the rendered video. I guess the more accurate description is like looking out of a jail cell where the bars have been painted green. ;)

I will see if I can get a grab of an example...Image
ddennedy
Registered Member
Posts
1315
Karma
1

Re: Output Scaling Problem

Tue Apr 27, 2010 4:55 pm
I have never seen that before, and I will try to reproduce it. Meanwhile, MLT switched its default scaler from something of a hybrid gtk2/internal to libswscale since version 0.5.2. There were some problems with some older versions of libswscale, so with version 0.5.4 of MLT, I only use swscale if it is at least v0.7.2, which I believe is not yet available in Debian typical repos.


Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Sat May 08, 2010 11:18 am
I'm running Debian Squeeze on the editing machine and also use the Squeeze repos from the Debian Multimedia project to make sure I have the latest versions of dependencies. Currently the versions installed are:

kdenlive 0.7.7.1
MLT 0.5.4

Running "aptitude show libswscale0" shows the following details:

Package: libswscale0
State: installed
Automatically installed: yes
Version: 5:0.5.1+svn20100411-0.0
Priority: optional
Section: libs
Maintainer: Christian Marillat
Uncompressed Size: 340k
Depends: libavutil50 (>= 5:0.5.1+svn20100411), libc6 (>= 2.3.5)

So the lib is at a lower version that you use, however I have been using kdenlive for a while now and this problem has only occurred recently.
Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Tue Jul 20, 2010 2:51 pm
I'm on version 0.56 of MLT now using 0.6~svn20100603-0.0 of libswscale, all under kdenlive v0.7.8. Still get the vertical bars.

Edit: Ok, I did a test using ffmpeg from the command line to scale a video down to a lower resolution. This produced the exact same artefacts on the output video file. So as suggested it seems to be an issue with ffmpeg's libswscale? I am unsure what to do next. My video edit plays and looks as I want in kdenlive on the timeline. It's just when it's rendered I cannot get the output looking right. :-/
j-b-m
Registered Member
Posts
804
Karma
1

Re: Output Scaling Problem

Tue Jul 20, 2010 9:48 pm
Hmm, this is very interesting. Can you please post the exact ffmpeg command line here? And if the problem only happens with some clips, please try to give us a link to a short video sample.

Some time ago, I reported a problem [1] caused by a change in swscale, but was unable to reproduce using only FFmpeg. So if your problem is related to the swscale problem I reported, we could probably create a useful bug report on FFmpeg's tracker...

[1] http://sourceforge.net/mailarchive/forum.php?thread_name=201004251015.51624.j-b-m%40users.sourceforge.net&forum_name=mlt-devel

regards
Crispy Beef
Registered Member
Posts
9
Karma
0

Re: Output Scaling Problem

Wed Jul 21, 2010 9:50 am
The worst thing that I seem to have discovered is the problem to be somewhat random, I can take my timeline setup in kdenlive, render it and get those bars flashing up every few seconds, then I'll render again, this time the bars will be permanently overlayed, render again and the bars might flash up once or twice in the entire video! Bizarre.

Output format doesn't seem to affect anything either, I've tried H.264 mp4's, XVid4 AVI's all with the same problem so whatever is causing this is happening earlier on in the process of rendering out to the final file.

Below is the output from melt on the command line (XVid AVI), from what I understand you can see the ffmpeg options in this:

Started render process: "/usr/bin/melt" "/tmp/kde-crispy/kdenlivep10803.mlt -profile /home/crispy/.kde/share/apps/kdenlive/profiles/customprofile0 -consumer avformat:/mnt/data/media/Content/Edits/test.avi progress=1 acodec=libmp3lame ab=128k ar=44100 vcodec=libxvid minrate=0 b=2000k aspect=@4/3 mbd=2 trellis=1 mv4=1"

Here are some ffmpeg command line examples, the source video is a 768x576 AVI using the H.264 codec. This video plays perfectly in every player I have.

# Simple scaling using all other defaults
ffmpeg -i ./source.avi -vf "scale=512:384" ./test.avi


Both input and output videos have the display aspect ratio of 4:3 so in theory it should be easier to get a decent scaling. Green vertical bars are present.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed, Sogou [Bot]