Bug 356564 - Proxy clips sometimes use an incorrect aspect ratio (inc. example test clip)
Summary: Proxy clips sometimes use an incorrect aspect ratio (inc. example test clip)
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
: 360180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-12 15:40 UTC by Kubuntiac
Modified: 2016-08-13 12:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen recording video from Telecine (818.41 KB, video/mp4)
2015-12-12 15:42 UTC, Kubuntiac
Details
SCreenshot showing proxy profile settings (438.56 KB, image/png)
2015-12-13 19:53 UTC, Kubuntiac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kubuntiac 2015-12-12 15:40:39 UTC
Some clips (not all, thus why I put sometimes reproducible, although the right clips will always do this) look fine when not proxied, but when they are proxied, their aspect ratio changes.

Reproducible: Sometimes

Steps to Reproduce:
1. Add a clip to the timeline. Note that it looks correct in the clip / timeline monitor.
2. Proxy the clip
3. Look at the aspect ratio of the clip in the timeline

Actual Results:  
Clip appears distorted (often stretched horizontally)

Expected Results:  
Clip appears as normal
Comment 1 Kubuntiac 2015-12-12 15:42:42 UTC
Created attachment 96015 [details]
Screen recording video from Telecine

Example clip that distorts when proxied. Recorded with the FOSS Android screen recording app Telecine.
Comment 2 Kubuntiac 2015-12-12 15:45:58 UTC
This is on Kubuntu 15.10 using vpinions PPA packages.
Comment 3 Jean-Baptiste Mardelle 2015-12-13 15:24:41 UTC
Yes, I also noticed the problem. In fact, it is caused by the proxy profile. Usually (at least with the default Kdenlive profile), we have a parameter like:

- s 640x480

This forces a frame size on the rendered proxy file without bothering about the original clip's aspect ratio. I could fix the problem by changing the encoding proxy profile like this:

-filter:v scale=640:-1

This should replace the '-s 640x480' part of the proxy profile. This means that FFmpeg will resize original clip width to 640 and automatically set the height to adjust to original aspect ratio.

Could you please try and confirm if that fixes the problem ?
Comment 4 Kubuntiac 2015-12-13 19:19:23 UTC
I created a new profile ( -filter:v scale=640:-1 -g 5 -qscale 6 -ab 128k -vcodec mpeg2video -acodec mp2 ), restarted Kdenlive and brought in a new clip, but it's still doing the same thing.
Comment 5 Jean-Baptiste Mardelle 2015-12-13 19:45:08 UTC
Are you sure that your newly created profile was active on the new project ?
You can check it from the menu:
Project > Project Settings, the active proxy profile is the one selected in the "Encoding profile" combobox.
Comment 6 Kubuntiac 2015-12-13 19:53:04 UTC
Created attachment 96046 [details]
SCreenshot showing proxy profile settings

Yep. Pretty sure. You can see in this screenshot the new profile I set up, and that it's being used in the project and that the selected, proxied clip is still showing up distorted.
Comment 7 Jean-Baptiste Mardelle 2015-12-13 21:50:17 UTC
Git commit 95d66037c1a68433438b4c30da5c86d81f066055 by Jean-Baptiste Mardelle.
Committed on 13/12/2015 at 21:50.
Pushed by mardelle into branch 'master'.

Fix reloading bin clip duplicating MLT normalizers, resulting in broken aspect ratio

M  +10   -13   src/mltcontroller/bincontroller.cpp

http://commits.kde.org/kdenlive/95d66037c1a68433438b4c30da5c86d81f066055
Comment 8 Jean-Baptiste Mardelle 2015-12-14 19:48:18 UTC
Git commit 0c22012eb2d8e4460a004e5831b5570a900326c4 by Jean-Baptiste Mardelle.
Committed on 14/12/2015 at 19:30.
Pushed by mardelle into branch 'Applications/15.12'.

Fix reloading bin clip duplicating MLT normalizers, resulting in broken aspect ratio

M  +10   -13   src/mltcontroller/bincontroller.cpp

http://commits.kde.org/kdenlive/0c22012eb2d8e4460a004e5831b5570a900326c4
Comment 9 Kubuntiac 2015-12-16 22:46:04 UTC
Thanks JB,

I'll test this on the next PPA update.
Comment 10 Michael G. Hansen 2016-07-04 19:44:03 UTC
*** Bug 360180 has been marked as a duplicate of this bug. ***
Comment 11 Michael G. Hansen 2016-07-04 19:51:32 UTC
Hello,

I can confirm that changing the scaling argument for ffmpeg in proxy settings to "-vf scale=1280:-1" and applying the new settings in the "Project settings" dialog converts the proxy clips with automatic aspect ratio detection.

KDENLIVE version: Version 15.12.3

Best regards,

Michael