Bug 381223 - Custom Profile handling bugs
Summary: Custom Profile handling bugs
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: git-master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 09:55 UTC by Evert Vorster
Modified: 2019-12-02 07:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: Brainstorm+


Attachments
Short clip showing the issue (1.43 MB, video/quicktime)
2017-06-19 12:57 UTC, Evert Vorster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evert Vorster 2017-06-15 09:55:44 UTC
More than one bug on this report, probably related. 

I use a custom profile, 3840 x 1920 @ 29.97fps. 
This is the output from ActionDirector when it renders footage from Samsung Gear 360. 
Every time I import a clip with this profile, Kdenlive says it can't find a profile and offers to make a new one, and switch to it. After loading a few clips like this I started wondering why it keeps on creating new profiles? 
So, now I have a long list of custom profiles with exactly the same attributes. 

Apparently, kdenlive does not look under the custom profiles when it looks for profiles matching the clip that is just loaded. 
So, it keeps on making new custom profiles every time I load a with that custom profile.


Unfortunately, I am also unable to render out to a custom profile. 
I am trying to render out to 3840 x 1920 @ 29.97fps, but all I get is 1920 x 1080. 

So, these two bugs may be related. Unfortunately I cannot use kdenlive for the project I am working on as I absolutely require that resolution for the footage to work in VR.
Comment 1 Evert Vorster 2017-06-15 10:07:07 UTC
Just want to add that none of these projects were saved. I am now retrying with a saved project to see if that has any influence on what profile I get when I render out.
Comment 2 Jean-Baptiste Mardelle 2017-06-16 08:33:04 UTC
Should now be fixed in 17.04 and master, please test
Comment 3 Evert Vorster 2017-06-17 16:00:46 UTC
Thanks for the quick fix. 
Unfortunately, anongit is refusing me access:
-------------------------------------
  -> Updating kdenlive git repo...
Fetching origin
fatal: unable to connect to anongit.kde.org:
anongit.kde.org[0: 31.216.41.69]: errno=Connection refused
-------------------------------------
I'll troubleshoot this first, and then give it another try.
-Evert-
Comment 4 Evert Vorster 2017-06-19 08:12:08 UTC
Hi there. 

The problem is still present in master. 

I am unable to build the applications branch, it fails with this error:
/var/tmp/yaourt-tmp-evert/aur-kdenlive-release-git/src/kdenlive/src/scopes/audioscopes/spectrogram.cpp:271:109: error: call of overloaded ‘abs(unsigned int)’ is ambiguous
       hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - (leftDist + mouseX + 30)) < (int) minDistX
                                                                                                       ^
In file included from /usr/include/c++/7.1.1/cstdlib:75:0,
                 from /usr/include/c++/7.1.1/bits/stl_algo.h:59,
                 from /usr/include/c++/7.1.1/algorithm:62,
                 from /usr/include/qt/QtCore/qglobal.h:109,
                 from /usr/include/qt/QtGui/qtguiglobal.h:43,
                 from /usr/include/qt/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt/QtWidgets/qwidget.h:43,
                 from /usr/include/qt/QtWidgets/QWidget:1,
                 from /var/tmp/yaourt-tmp-evert/aur-kdenlive-release-git/src/kdenlive/src/scopes/audioscopes/abstractaudioscopewidget.h:14,
Comment 5 Jean-Baptiste Mardelle 2017-06-19 11:40:56 UTC
I fixed the compilation issue in 17.04, however the same fix was applied to both branches so master should be working. Both issues described (cannot find matching profile and rendered video has wrong output size) are fixed for me in master. Can you please give an exact description of the issue you have and the steps leading to it ?
Comment 6 Evert Vorster 2017-06-19 12:57:19 UTC
Created attachment 106167 [details]
Short clip showing the issue

Short screenshot clip showing the issue
Comment 7 Evert Vorster 2017-06-19 13:18:06 UTC
I successfully compiled the applications 17.04 branch, and can confirm that the compilation fix is in there, however the problem is still there as well. 

It looks identical to the clip I attached for the master branch. 

Thank you for looking into this issue. 
-Evert-
Comment 8 Evert Vorster 2017-06-19 15:57:31 UTC
I can confirm that the output now actually uses the project profile, so you did fix one thing. It may not have been related to the new clip function not detecting an existing profile of the same resolution and frame rate. 

Thanks for fixing the most important bit, I can now actually carry on with my project.
Comment 9 Jean-Baptiste Mardelle 2017-06-19 19:33:28 UTC
Strange, it keeps working for me. Can you paste the output of :

ffmpeg -i Time_Lapse_01.mp4 (or any other clip reproducing the problem)
Comment 10 Evert Vorster 2017-06-20 06:19:50 UTC
Thanks a bunch for looking into this. 
Here is the requested output:

[evert@Arch Renders]$ ffmpeg -i Time_Lapse_01.mp4 
ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.1.1 (GCC) 20170528
  configuration: --prefix=/usr --extra-cflags=-I/opt/cuda/include --extra-ldflags='-L/opt/cuda/lib64 -Wl,-rpath -Wl,/opt/intel/mediasdk/lib64' --toolchain=hardened --enable-rpath --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --enable-avresample --enable-cuda --enable-cuvid --enable-libnpp --enable-libmfx --enable-nvenc --enable-omx --enable-omx-rpi --enable-avisynth --enable-chromaprint --enable-decoder=atrac3 --enable-decoder=atrac3p --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gpl --enable-gray --enable-iconv --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcelt --enable-libdc1394 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libiec61883 --enable-libilbc --enable-libkvazaar --enable-libmodplug --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencv --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsmbclient --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lzma --enable-netcdf --enable-openal --enable-opencl --enable-opengl --enable-openssl --enable-sdl2 --enable-vaapi --enable-vdpau --enable-videotoolbox --enable-xlib --enable-zlib
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Time_Lapse_01.mp4':
  Metadata:
    major_brand     : MSNV
    minor_version   : 16786688
    compatible_brands: MSNVisommp42
    creation_time   : 2017-06-14T12:52:25.000000Z
  Duration: 00:05:45.11, start: 0.033367, bitrate: 48176 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv), 3840x1920 [SAR 1:1 DAR 2:1], 47788 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2017-06-14T12:52:25.000000Z
      handler_name    : Video Media Handler
      encoder         : HVC Coding
    Side data:
      spherical: equirectangular (0.000000/0.000000/0.000000) 
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 384 kb/s (default)
    Metadata:
      creation_time   : 2017-06-14T12:52:25.000000Z
      handler_name    : Sound Media Handler
At least one output file must be specified
[evert@Arch Renders]$
Comment 11 Jean-Baptiste Mardelle 2017-06-21 06:44:18 UTC
Can you look in the folder 

$HOME/.local/share/kdenlive/profiles

You should have several files called "customprofile0", "customprofile1", etc. These are simple text files containing the custom profiles. Can you paste here the content of the last one (which should contain the detected profile for you clips).

Also, can you paste here the output of:
melt Time_Lapse_01.mp4 -consumer xml:
Comment 12 Evert Vorster 2017-06-21 18:53:40 UTC
The two bits of information you were after:

Profile:
[evert@Arch profiles]$ cat customprofile22 
description=3840x1920 29.97fps
frame_rate_num=30000
frame_rate_den=1001
width=3840
height=1920
progressive=1
sample_aspect_num=1
sample_aspect_den=1
display_aspect_num=3840
display_aspect_den=1920
colorspace=709
[evert@Arch profiles]$


What is interesting is that two frame rates are detected:
    <property name="meta.media.0.stream.frame_rate">29.9699</property>
    <property name="meta.media.0.codec.frame_rate">29.97</property>


The full output of the command:
[evert@Arch Renders]$ melt Time_Lapse_01.mp4 -consumer xml
<?xml version="1.0"?>
<mlt LC_NUMERIC="en_US.UTF-8" version="6.5.0" title="Time_Lapse_01.mp4">
  <profile description="automatic" width="3840" height="1920" progressive="1" sample_aspect_num="1" sample_aspect_den="1" display_aspect_num="3840" display_aspect_den="1920" frame_rate_num="155145000" frame_rate_den="5176687" colorspace="709"/>
  <producer id="producer0" in="0" out="10342">
    <property name="length">10343</property>
    <property name="eof">pause</property>
    <property name="resource">Time_Lapse_01.mp4</property>
    <property name="meta.media.nb_streams">2</property>
    <property name="meta.media.0.stream.type">video</property>
    <property name="meta.media.0.stream.frame_rate">29.9699</property>
    <property name="meta.media.0.stream.sample_aspect_ratio">0</property>
    <property name="meta.media.0.codec.width">3840</property>
    <property name="meta.media.0.codec.height">1920</property>
    <property name="meta.media.0.codec.rotate">0</property>
    <property name="meta.media.0.codec.frame_rate">29.97</property>
    <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
    <property name="meta.media.0.codec.sample_aspect_ratio">1</property>
    <property name="meta.media.0.codec.colorspace">709</property>
    <property name="meta.media.0.codec.name">hevc</property>
    <property name="meta.media.0.codec.long_name">HEVC (High Efficiency Video Coding)</property>
    <property name="meta.media.0.codec.bit_rate">47788352</property>
    <property name="meta.attr.0.stream.creation_time.markup">2017-06-14T12:52:25.000000Z</property>
    <property name="meta.attr.0.stream.language.markup">eng</property>
    <property name="meta.attr.0.stream.handler_name.markup">Video Media Handler</property>
    <property name="meta.attr.0.stream.encoder.markup">HVC Coding</property>
    <property name="meta.media.1.stream.type">audio</property>
    <property name="meta.media.1.codec.sample_fmt">fltp</property>
    <property name="meta.media.1.codec.sample_rate">48000</property>
    <property name="meta.media.1.codec.channels">2</property>
    <property name="meta.media.1.codec.name">aac</property>
    <property name="meta.media.1.codec.long_name">AAC (Advanced Audio Coding)</property>
    <property name="meta.media.1.codec.bit_rate">384000</property>
    <property name="meta.attr.1.stream.creation_time.markup">2017-06-14T12:52:25.000000Z</property>
    <property name="meta.attr.1.stream.language.markup">eng</property>
    <property name="meta.attr.1.stream.handler_name.markup">Sound Media Handler</property>
    <property name="meta.attr.major_brand.markup">MSNV</property>
    <property name="meta.attr.minor_version.markup">16786688</property>
    <property name="meta.attr.compatible_brands.markup">MSNVisommp42</property>
    <property name="meta.attr.creation_time.markup">2017-06-14T12:52:25.000000Z</property>
    <property name="seekable">1</property>
    <property name="meta.media.sample_aspect_num">1</property>
    <property name="meta.media.sample_aspect_den">1</property>
    <property name="aspect_ratio">1</property>
    <property name="audio_index">1</property>
    <property name="video_index">0</property>
    <property name="mute_on_pause">1</property>
    <property name="mlt_service">avformat</property>
  </producer>
  <playlist id="playlist0">
    <entry producer="producer0" in="0" out="10342"/>
  </playlist>
  <tractor id="tractor0" title="Time_Lapse_01.mp4" global_feed="1" in="0" out="10342">
    <track producer="playlist0"/>
  </tractor>
</mlt>
Comment 13 Szczepan Hołyszewski 2017-09-17 20:08:02 UTC
Painfully bitten by this bug too, renders kdenlive basically useless to me. I need to crop a 720x1280 video to 720x720 for instagram, and I just can't create the 720x720 profile in a way that will let me apply it to the project.
Comment 14 Jean-Baptiste Mardelle 2017-09-20 09:21:45 UTC
Can you please attach or mail me a small video sample or a video clip that triggers this issue ? You should be able to extract a small 5 seconds sample from your video with that command:
ffmpeg -i myclip.mp4 -c copy -t 5 output.mp4
Comment 15 Szczepan Hołyszewski 2017-09-22 20:59:18 UTC
Video clips are irrelevant. The bug is about profile creation. I should be able to create a custom profile and select it even before adding any video clips to a completely new project, and I am unable to do that.
Comment 16 Evert Vorster 2019-12-02 07:15:37 UTC
I am able to make completely custom video profiles... just to test I created a profile with 336 x 666 x 13fps. Kdenlive smoothly accepted it, it was just a little tricky to generate. 
Project > Project Settings > Click on the Sliders Icon. 
Click on the "New" button
Have at it, just change the name to something unique. 
When you are happy with the new profile, click on the "Save" icon. Your new profile will now be under the Custom profiles.
Comment 17 Evert Vorster 2019-12-02 07:21:56 UTC
The second issue got fixed somewhere, as Kdenlive now correctly detects the custom profile if a clip with matching parameters is loaded. 

Completely fixed!