Bug 421849 - Unable to create proxy clips
Summary: Unable to create proxy clips
Status: RESOLVED WORKSFORME
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: 20.04.1
Platform: Other Linux
: NOR critical
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
: 418718 421996 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-21 02:26 UTC by aliaramli
Modified: 2021-03-06 17:16 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proxy clip becomes white. (63.35 KB, image/png)
2020-05-21 02:26 UTC, aliaramli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aliaramli 2020-05-21 02:26:27 UTC
Created attachment 128654 [details]
proxy clip becomes white.

SUMMARY
installed version 20.04.1 using app image

STEPS TO REPRODUCE
1. run kdenlive 20.04.1
2. import clips to project
3. enable proxy
4. create proxy clip

OBSERVED RESULT
the clip become white, unuseable in timeline.


EXPECTED RESULT
able to create proxy successfully

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 18.04.4 LTS
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Pietro Battiston 2020-05-24 15:07:48 UTC
I can confirm with some clips, but other work fine.

For instance, a 2554 × 1080, 60 fps, H.265 with MPEG-4 AAC 44100 Hz Mono audio worked, while a 1920 × 1080, 25 fps, H.264 with PCM 48000 Hz Stereo audio didn't.

Notice that
- audio is not affected
- changing proxies profile from x264 to ProRes or MJPEG didn't help.
- proxy clip creation is immediate - as if it wasn't executed at all - and indeed the resulting file in ~/.cache/kdenlive/proxy is very small (387 bytes in one case) and does not open in VLC
Comment 2 Frank 2020-05-27 08:19:19 UTC
I have the exact same issue when trying to create proxy clips from .mov files in version 20.4.1 and above. 

My work around at the moment is opening the project in version 19.12.3, creating the required proxies, save the project and reopen in 20.04.1.
Comment 3 Karol Babioch 2020-05-27 22:24:32 UTC
Same issue here, proxy clips are not working for some clips.

I debugged it, in my case the following command is used to create the proxy clip:

ffmpeg -hide_banner -y -stats -v error -i /home/kbabioch/Downloads/DJI_0551.MP4 -vf scale=640:-2 -g 1 -bf 0 -vb 0 -qscale 6 -ab 128k -vcodec mpeg2video -acodec ac3 -map 0 /home/kbabioch/Downloads/output.mkv

This fails with the following error:

[matroska @ 0x5585470dee40] Only audio, video, and subtitles are supported for Matroska.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 

An output file is generated, but is only 365 bytes big and contains no useful video information.

When kdenlive is then trying to load this clip, the following happens:

[matroska,webm @ 0x7fbe001260c0] File ended prematurely at pos. 365 (0x16d)                                                                                                                   

When I remove the "-map 0" argument, it works correctly, although I'm not an ffmpeg guru, so I can't judge if and why it is needed.

From my point of view there are multiple issues here:

- Error during conversion is not caught
- Proxy clip is loaded/used (despite errors)
- No useful information in the UI at all
Comment 4 Manuel López Antequera 2020-05-31 10:18:09 UTC
*** Bug 421996 has been marked as a duplicate of this bug. ***
Comment 5 Manuel López Antequera 2020-05-31 10:18:27 UTC
*** Bug 418718 has been marked as a duplicate of this bug. ***
Comment 6 Manuel López Antequera 2020-05-31 10:45:29 UTC
I'd like to add that I have the same problem with videos from my DJI drone. I can report the same behavior as Karol when running with and without -map 0. 

It seems like there is some stream that ffmpeg does not support in DJI video files.

I used ffprobe and ffprobe -show_streams on the file to get more info (check below for dumps). There are 3 streams: #0 is video, #1 is some non-standard drone metadata, and #2 is a subtitle track for telemetry. ffmpeg is choking on #1 because of the -map 0 flag.

The documentation of ffmpeg (https://trac.ffmpeg.org/wiki/Map) reveals that using "-map 0" will attempt to use all of the streams in the file.

Removing -map 0 initiates some sort of automatic way of picking 1 video and 1 audio stream (https://ffmpeg.org/ffmpeg.html#Stream-selection). I think this makes sense since we have no GUI to select streams anyways.

-------- dump of ffprobe ---------------------------

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'DJI_0031.MP4':
  Metadata:
    major_brand     : avc1
    minor_version   : 538182144
    compatible_brands: avc1isom
    creation_time   : 2020-03-24T11:24:59.000000Z
    location        : +7.6107+99.0316
    location-{    : +7.6107+99.0316
    comment         : DE=None,SN=1SFLH170AB0C14, Type=Normal, HQ=Normal, Mode=P
  Duration: 00:00:29.16, start: 0.000000, bitrate: 40112 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 2720x1530 [SAR 1:1 DAR 16:9], 40067 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2020-03-24T11:24:59.000000Z
      handler_name    : ?DJI.AVC
      encoder         : AVC encoder
    Stream #0:1(eng): Data: none (priv / 0x76697270)
    Metadata:
      creation_time   : 2020-03-24T11:24:59.000000Z
      handler_name    : ?DJI.Meta
    Stream #0:2(eng): Subtitle: mov_text (text / 0x74786574), 2 kb/s (default)
    Metadata:
      creation_time   : 2020-03-24T11:24:59.000000Z
      handler_name    : ?DJI.Subtitle
Unsupported codec with id 0 for input stream 1

-------- dump of ffprobe -show_streams ----------------

[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
profile=High
codec_type=video
codec_time_base=1001/60000
codec_tag_string=avc1
codec_tag=0x31637661
width=2720
height=1530
coded_width=2720
coded_height=1536
has_b_frames=1
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuv420p
level=50
color_range=tv
color_space=bt709
color_transfer=bt709
color_primaries=bt709
chroma_location=left
field_order=unknown
timecode=N/A
refs=1
is_avc=true
nal_length_size=4
id=N/A
r_frame_rate=30000/1001
avg_frame_rate=30000/1001
time_base=1/30000
start_pts=0
start_time=0.000000
duration_ts=874874
duration=29.162467
bit_rate=40067874
max_bit_rate=N/A
bits_per_raw_sample=8
nb_frames=874
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2020-03-24T11:24:59.000000Z
TAG:language=eng
TAG:handler_name=DJI.AVC
TAG:encoder=AVC encoder
[/STREAM]
[STREAM]
index=1
codec_name=unknown
codec_long_name=unknown
profile=unknown
codec_type=data
codec_tag_string=priv
codec_tag=0x76697270
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/30000
start_pts=0
start_time=0.000000
duration_ts=0
duration=0.000000
bit_rate=N/A
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=31
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2020-03-24T11:24:59.000000Z
TAG:language=eng
TAG:handler_name=DJI.Meta
[/STREAM]
[STREAM]
index=2
codec_name=mov_text
codec_long_name=MOV text
profile=unknown
codec_type=subtitle
codec_time_base=0/1
codec_tag_string=text
codec_tag=0x74786574
width=N/A
height=N/A
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/30000
start_pts=0
start_time=0.000000
duration_ts=900000
duration=30.000000
bit_rate=2048
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=30
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
TAG:creation_time=2020-03-24T11:24:59.000000Z
TAG:language=eng
TAG:handler_name=DJI.Subtitle
[/STREAM]
Comment 7 Pietro Battiston 2020-05-31 14:18:52 UTC
There's a duplicate with some more info at https://invent.kde.org/multimedia/kdenlive/-/issues/695
Comment 8 Karol Babioch 2020-06-03 21:56:36 UTC
The commit https://invent.kde.org/multimedia/kdenlive/-/commit/f9bfcc57fbc489d25ac34a05eaaf840b96a137b1 fixes the problem for me. However, there has been no official release since then, so for those that are not willing/able to compile kdenlive on their own, you'll have to wait for the next maintenance release.
Comment 9 Frank 2020-06-07 21:07:27 UTC
(SOLVED)
Mark solved? In the 'Proxy' tab from 'Project settings' I changed the 'Encoding profile' to x264. Now all clips are perfectly converted to proxy clips.
Comment 10 emohr 2021-03-06 17:16:34 UTC
Thank you for the feedback and contribution. Glad to hear it works. 

We close this bug. If it still appears in the latest version, please feel free to re-open it and update the affected version number.