Bug 507396 - I can't add an audio file
Summary: I can't add an audio file
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Project Bin & Import (other bugs)
Version First Reported In: 25.04.1
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-23 15:01 UTC by Victor Porton
Modified: 2025-07-24 06:08 UTC (History)
0 users

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


Attachments
Bug demonstration video (1.17 MB, video/x-matroska)
2025-07-23 15:01 UTC, Victor Porton
Details
You've asked to share the .flac file. (443.78 KB, audio/flac)
2025-07-23 17:35 UTC, Victor Porton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Porton 2025-07-23 15:01:34 UTC
Created attachment 183460 [details]
Bug demonstration video

Version 25.04.2

See the attached video.
Comment 1 Jean-Baptiste Mardelle 2025-07-23 16:24:08 UTC
I cannot reproduce this issue. Is it a flac file with album art embedded?  Could you share the output of this command:

ffmpeg -i audio.flac

(replace audio.flac with the path to your audio file)
Thanks in advance
Comment 2 Victor Porton 2025-07-23 16:28:56 UTC
"Is it a flac file with album art embedded?" No, this is just a sound file that I recorded with GNOME Sound Recorder.

$ ffmpeg -i ~/Videos/Sermons/city.flac 
ffmpeg version 6.1.1-3ubuntu5+esm3 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --prefix=/usr --extra-version=3ubuntu5+esm3 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, flac, from '/home/porton/Videos/Sermons/city.flac':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
At least one output file must be specified
Comment 3 Victor Porton 2025-07-23 16:53:54 UTC
Any ideas? How can I help to debug this (that the list is empty)?

If no other way, tell me to try to download the sources and try me to  debug it by myself.
Comment 4 Jean-Baptiste Mardelle 2025-07-23 17:03:01 UTC
Could you share the FLAC file ? Or send it privately to me?
Comment 5 Victor Porton 2025-07-23 17:28:52 UTC
Probably these logs (after opening the .flac file) helps:

/////////// starting to add bin clips
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
/////////// found list QList(QUrl("file:///home/porton/Videos/Sermons/city.flac"))
/////////// creatclipsfromlist QList(QUrl("file:///home/porton/Videos/Sermons/city.flac")) true "7"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
virtual QStringList Solid::Backends::UPower::UPowerManager::allDevices()  error:  QDBusError("org.freedesktop.DBus.Error.Disconnected", "Not connected to D-Bus server")
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
virtual QStringList Solid::Backends::UPower::UPowerManager::allDevices()  error:  QDBusError("org.freedesktop.DBus.Error.Disconnected", "Not connected to D-Bus server")
/////////// createClipFromFile "/home/porton/Videos/Sermons/city.flac" "7"
=== GOT DROPPED MIME:  "audio/flac"
/////////// final xml "<producer>\n <property name=\"resource\">/home/porton/Videos/Sermons/city.flac</property>\n</producer>\n"
============STARTING LOAD TASK FOR:  6  =  "/home/porton/Videos/Sermons/city.flac" 

:::::::::::::::::::
CHECKING FOR BIN CLIP:  "6"
::: ADJUSTED RULER HEHGIT:  0 
9999999999999999999999999999999999

::: ADJUSTED RULER HEHGIT:  0 
9999999999999999999999999999999999

::: ADJUSTED RULER HEHGIT:  0 
9999999999999999999999999999999999

::: ADJUSTED RULER HEHGIT:  0 
9999999999999999999999999999999999

::: ADJUSTED RULER HEHGIT:  0 
9999999999999999999999999999999999

::: ADJUSTED RULER HEHGIT:  0 
9999999999999999999999999999999999
Comment 6 Victor Porton 2025-07-23 17:29:28 UTC
Probably related to UDisks:

$ systemctl --user status xdg-desktop-portal.service
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Mon 2025-07-21 11:27:06 IDT; 2 days ago
   Main PID: 5170 (xdg-desktop-por)
      Tasks: 7 (limit: 18735)
     Memory: 20.0M (peak: 511.4M swap: 1.7M swap peak: 2.1M)
        CPU: 50.183s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal.service
             └─5170 /usr/libexec/xdg-desktop-portal

Jul 23 18:20:53 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:20:53 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:21:00 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:21:00 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:21:21 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:21:22 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:27:56 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:27:56 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:32:01 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Jul 23 18:32:01 victor xdg-desktop-por[5170]: Realtime error: Could not map pid: Mapping pids is not supported.
Comment 7 Victor Porton 2025-07-23 17:35:55 UTC
Created attachment 183470 [details]
You've asked to share the .flac file.
Comment 8 Jean-Baptiste Mardelle 2025-07-23 18:21:09 UTC
Thanks for the file, I can confirm the issue. For some reason, FFmpeg cannot determine the duration of the file, there is probably an error in the encoding. Transcoding the file with FFmpeg using this command fixes the problem:

ffmpeg -i city.flac city2.flac

I will try to fix Kdenlive to correctly process the file when this happens
Comment 9 Bug Janitor Service 2025-07-24 05:53:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/kdenlive/-/merge_requests/684
Comment 10 Jean-Baptiste Mardelle 2025-07-24 06:07:30 UTC
Git commit f31d47284e305efe7d98163143391e34199a9862 by Jean-Baptiste Mardelle.
Committed on 24/07/2025 at 06:07.
Pushed by mardelle into branch 'master'.

Fix transcoding of files with missing duration.

M  +28   -25   src/bin/bin.cpp
M  +3    -1    src/bin/bin.h
M  +10   -2    src/bin/projectclip.cpp
M  +1    -0    src/bin/projectclip.h
M  +32   -23   src/jobs/cliploadtask.cpp
M  +21   -18   src/jobs/transcodetask.cpp
M  +6    -2    src/jobs/transcodetask.h
M  +11   -4    src/mainwindow.cpp
M  +27   -11   src/project/transcodeseek.cpp
M  +12   -3    src/project/transcodeseek.h

https://invent.kde.org/multimedia/kdenlive/-/commit/f31d47284e305efe7d98163143391e34199a9862
Comment 11 Jean-Baptiste Mardelle 2025-07-24 06:08:01 UTC
Git commit f2695ccedb465eeb732f24709a085820128bf63c by Jean-Baptiste Mardelle.
Committed on 24/07/2025 at 06:07.
Pushed by mardelle into branch 'release/25.08'.

Fix transcoding of files with missing duration.

M  +28   -25   src/bin/bin.cpp
M  +3    -1    src/bin/bin.h
M  +10   -2    src/bin/projectclip.cpp
M  +1    -0    src/bin/projectclip.h
M  +32   -23   src/jobs/cliploadtask.cpp
M  +21   -18   src/jobs/transcodetask.cpp
M  +6    -2    src/jobs/transcodetask.h
M  +11   -4    src/mainwindow.cpp
M  +27   -11   src/project/transcodeseek.cpp
M  +12   -3    src/project/transcodeseek.h

https://invent.kde.org/multimedia/kdenlive/-/commit/f2695ccedb465eeb732f24709a085820128bf63c