Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration in digiKam (Qt5): some helps required. #428

Closed
cgilles opened this issue Jan 19, 2024 · 83 comments
Closed

Integration in digiKam (Qt5): some helps required. #428

cgilles opened this issue Jan 19, 2024 · 83 comments

Comments

@cgilles
Copy link
Contributor

cgilles commented Jan 19, 2024

Hi,

First, thanks for sharing your code. It's very appreciated.

In digiKam, we would use the ffmpeg backend to play audio and video as the GStreamer backend from Qt5Multimedia is a mess for end users.

For 5/6 years, we have used QtAV for that. It works very well but with recent releases of ffmpeg, QtAV does not work well. QtAV is not maintained, so we need to find an alternative. QtAVPlayer is a good candidate.

digiKam can be compiled with Qt5 or Qt6. QtAvPlayer will be only used with Qt5, as the version of Qt6 requires QtMultimedia 6.5.0 or later as it's based on ffmpeg backend.

I created a git branch in digiKam named qtavplayer. We have a video player and an audio player. Code is here :

https://invent.kde.org/graphics/digikam/-/tree/development/qtavplayer/core/libs/video/player/QtAVPlayer?ref_type=heads

Note: QtAVPlayer code have been hosted in digiKam core without modification:

https://invent.kde.org/graphics/digikam/-/tree/development/qtavplayer/core/libs/video/QtAVPlayer?ref_type=heads

It's work but we faced some problems:

  1. We need a code to rotate the video rendering (90/180/270...) according to the orientation metadata from the media. The user can also rotate manually in the GUI. We can do it easily with Qt6:Multimedia or QtAV API, but we haven't found a solution yet with QtAVPlayer. Code relevant is commented for the moment:

https://invent.kde.org/graphics/digikam/-/blob/development/qtavplayer/core/libs/video/player/QtAVPlayer/mediaplayerview.cpp?ref_type=heads#L328

https://invent.kde.org/graphics/digikam/-/blob/development/qtavplayer/core/libs/video/player/QtAVPlayer/mediaplayerview.cpp?ref_type=heads#L393

  1. The audioplayer : in digiKam we have a photo slideshow tool where a soundtrack can be played in the background. So an audio player was created for that with QtAVPlayer where 2 dysfunctions can be seen:
     
    --> the audio position while playing is always null:

https://invent.kde.org/graphics/digikam/-/blob/development/qtavplayer/core/libs/video/player/QtAVPlayer/daudioplayer.cpp?ref_type=heads#L70

--> the audio volume cannot be changed (it's always to max), even if we pass a float value [0.0 - 1.0]

Note : with the videoplayer, the 2 last problems are not present.

Thanks in advance for your guidance.

Best regards

Gilles Caulier

@cgilles
Copy link
Contributor Author

cgilles commented Jan 19, 2024

Screenshot of the AudioPlayer :

https://i.imgur.com/Q7JIkbW.png

Note that audio track length is well reported here.

Screenshot of the VideoPlayer:

https://i.imgur.com/2DEaimx.png

Gilles Caulier

@valbok
Copy link
Owner

valbok commented Jan 20, 2024

Hi Gilles,
thanks for trying QAVPlayer
I tried to build in on 22.04 Ubuntu, and it has a dep to KF5 which could not resolve.

Is it possible to build digiKam on Ubuntu?

@valbok
Copy link
Owner

valbok commented Jan 20, 2024

We can do it easily with Qt6:Multimedia or QtAV API,

QAVPlayer returns video frames that you could render as you wish. Technically you can do whatever you want. Idea to use Qt renderers. Which is more efficient is QML.

Ic you use QVideoWidget as a video output. https://doc.qt.io/qt-5/qvideowidget.html - not sure if it supports orientations at all.
As I remember it uses QPainter for Qt5 without hw acceleration - which is quite slow.
And requires to convert all frames to AV_PIX_FMT_RGB32 - which twice very slow.
Looks you would need to look at QGraphicsVideoItem::setRotation and which potentially could give you opengl renderer.

@valbok
Copy link
Owner

valbok commented Jan 20, 2024

the audio position while playing is always null:
// qCDebug(DIGIKAM_GENERAL_LOG) << "Audio position:" << d->player->position();

do you hear sound?
You could export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true" and see the debug output.

QAVPlayer->position() should show the synced pts of the playback. Audio and video streams are synced.
each frame has its ows frame.pts() in seconds which must be available if it is valid frame.

Also, if you need only audio frames, you could disable video streams by on QAVPlayer::LoadedMedia call
p.setVideoStreams({}); it will not decode video streams at all.

@valbok
Copy link
Owner

valbok commented Jan 20, 2024

QGraphicsVideoItem::setRotation

If QtAV worked for you and had some renderers, you could try to adapt it for QVideoFrame's ?

@cgilles
Copy link
Contributor Author

cgilles commented Jan 20, 2024

Hi Gilles, thanks for trying QAVPlayer I tried to build in on 22.04 Ubuntu, and it has a dep to KF5 which could not resolve.

Is it possible to build digiKam on Ubuntu?

yes, sure, here digikam is compiled under Unbuntu 18.04, 22.04, and 23.10.

There is a script to install dependencies here :

https://invent.kde.org/graphics/digikam/-/blob/master/project/scripts/installdeps-ubuntu.sh?ref_type=heads

Warning, this script drop snap from the system. If you want to not touch to this feature, remove lines from there to en end :

https://invent.kde.org/graphics/digikam/-/blob/master/project/scripts/installdeps-ubuntu.sh?ref_type=heads#L306

Gilles Caulier

@cgilles
Copy link
Contributor Author

cgilles commented Jan 20, 2024

the audio position while playing is always null:
// qCDebug(DIGIKAM_GENERAL_LOG) << "Audio position:" << d->player->position();

do you hear sound?

yes. it's fine.

You could export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true" and see the debug output.

I will do it.

QAVPlayer->position() should show the synced pts of the playback. Audio and video streams are synced. each frame has its ows frame.pts() in seconds which must be available if it is valid frame.

But here, there is no video stream as media loaded are always audio track, as m4a, mp3, wav, etc... Did you already test this kind of configuration.

Also, if you need only audio frames, you could disable video streams by on QAVPlayer::LoadedMedia call p.setVideoStreams({}); it will not decode video streams at all.

See my previous comment.

Gilles Caulier

@cgilles
Copy link
Contributor Author

cgilles commented Jan 20, 2024

QGraphicsVideoItem::setRotation

If QtAV worked for you and had some renderers, you could try to adapt it for QVideoFrame's ?

No. The goal is to drop definitively qtav code from digiKam core (git/master)

Gilles Caulier

@valbok
Copy link
Owner

valbok commented Jan 20, 2024

Did you already test this kind of configuration.

Tested wav, mp3 files, and never seen empty QAVPlayer::position(),
also
https://github.com/valbok/QtAVPlayer/blob/master/tests/auto/integration/qavplayer/tst_qavplayer.cpp#L249

@valbok
Copy link
Owner

valbok commented Jan 21, 2024

We can do it easily with Qt6:Multimedia or QtAV API,

Ic you already use QGraphicsVideoItem for qtmm mediaplayer
https://invent.kde.org/graphics/digikam/-/blob/development/qtavplayer/core/libs/video/player/qtmm/mediaplayerview.cpp?ref_type=heads#L223

@cgilles
Copy link
Contributor Author

cgilles commented Jan 21, 2024

We can do it easily with Qt6:Multimedia or QtAV API,

Ic you already use QGraphicsVideoItem for qtmm mediaplayer https://invent.kde.org/graphics/digikam/-/blob/development/qtavplayer/core/libs/video/player/qtmm/mediaplayerview.cpp?ref_type=heads#L223

Sure but this code is for the Qt6 version, not the Qt5...

Gilles

@valbok
Copy link
Owner

valbok commented Jan 21, 2024

Screenshot of the AudioPlayer :

https://i.imgur.com/Q7JIkbW.png

Note that audio track length is well reported here.

added qDebug() << d->player->position() and it works, Elapsed is also updated

@cgilles
Copy link
Contributor Author

cgilles commented Jan 21, 2024

Where did you add the qdebug exactly. because i already do it here:

https://invent.kde.org/graphics/digikam/-/blob/development/qtavplayer/core/libs/video/player/QtAVPlayer/daudioplayer.cpp?ref_type=heads#L70

...and i can see this:

digikam.dplugin.generic: Playing: QUrl("file:///home/gilles/Music/Agnes Obel - Myopia (2020)/03 - Island Of Doom.mp3")
mjpeg : supported hardware device contexts:
cuda
vaapi
Available pixel formats:
yuvj420p : AVPixelFormat( 12 )
cuda : AVPixelFormat( 117 )
vaapi : AVPixelFormat( 44 )
Using software decoding in yuvj420p
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0
digikam.general: Audio position: 0

Gilles Caulier

@valbok
Copy link
Owner

valbok commented Jan 21, 2024

doing exactly there, where you mentioned.

@valbok
Copy link
Owner

valbok commented Jan 21, 2024

strange that volume does not work, but this helps
#430

@valbok
Copy link
Owner

valbok commented Jan 21, 2024

btw doing

  1. Preview and set the volume
  2. Start sliding, -> always max volume is used, it sets volume to 1.0, is it correct?

@cgilles
Copy link
Contributor Author

cgilles commented Jan 21, 2024

btw doing

1. Preview and set the volume

2. Start sliding, -> always max volume is used, it sets volume to 1.0, is it correct?

more and less for the moment. typically the volume must be saved and restored volume between session...

Gilles

@valbok
Copy link
Owner

valbok commented Jan 21, 2024

Sure but this code is for the Qt6 version, not the Qt5...

All video frames will go to https://doc.qt.io/qt-5/qgraphicsvideoitem.html#videoSurface-prop

the same idea as QVideoWidget.

@cgilles
Copy link
Contributor Author

cgilles commented Jan 22, 2024

strange that volume does not work, but this helps #430

I sync you last commit in digiKam branch. No i can change the volume. Thanks.

Audio position still zero to the console, as i can see...

Gilles

@cgilles
Copy link
Contributor Author

cgilles commented Jan 22, 2024

Did you seen this warning from G++ under Ubuntu 23.04 with Qt5.15.10:

[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavstream.cpp.o
[ 53%] Built target half_mt_cli
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavstreamframe.cpp.o
[ 53%] Built target core_videotools_obj
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavsubtitlecodec.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavsubtitleframe.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideobuffer_cpu.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideobuffer_gpu.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideocodec.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideofilter.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideoframe.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideoinputfilter.cpp.o
[ 53%] Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideooutputfilter.cpp.o
In file included from /usr/include/aarch64-linux-gnu/qt5/QtMultimedia/qvideoframe.h:46,
from /usr/include/aarch64-linux-gnu/qt5/QtMultimedia/QVideoFrame:1,
from /home/gilles/Devel/8.x/core/libs/video/QtAVPlayer/qavvideoframe.h:14,
from /home/gilles/Devel/8.x/core/libs/video/QtAVPlayer/qavvideoframe.cpp:8:
/usr/include/aarch64-linux-gnu/qt5/QtMultimedia/qabstractvideobuffer.h:111:12: warning: ‘virtual uchar* QAbstractPlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode, int*, int*)’ was hidden [-Woverloaded-virtual=]
111 | uchar map(MapMode mode, int numBytes, int bytesPerLine) override;
| ^~~
/home/gilles/Devel/8.x/core/libs/video/QtAVPlayer/qavvideoframe.cpp:192:9: note: by ‘virtual int PlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode, int
, int
, uchar
*)’
192 | int map(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]) override
| ^~~
[ 53%] Built target core_qtavplayer_obj

Gilles

@cgilles
Copy link
Contributor Author

cgilles commented Jan 22, 2024

strange that volume does not work, but this helps #430

I sync you last commit in digiKam branch. No i can change the volume. Thanks.

Audio position still zero to the console, as i can see...

Gilles

Your last changes about audio volume introduce a 2/3s delay before to take effect, as when i change volume or when i stop/pause play. It's visible with simple audio player and with video player (as the video is paused/stopped but audio continue to play a little bit).

Gilles

@valbok
Copy link
Owner

valbok commented Jan 22, 2024

2/3s delay before to take effect

Right, looks bug, volume is changed only when new frame is arrived which is not nice. Thanks, will fix

@valbok
Copy link
Owner

valbok commented Jan 22, 2024

/home/gilles/Devel/8.x/core/libs/video/QtAVPlayer/qavvideoframe.cpp:192:9: note: by ‘virtual int PlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode, int_, int_, uchar_*)’ 192 | int map(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]) override | ^~~ [ 53%] Built target core_qtavplayer_obj

Gilles

#432

@cgilles
Copy link
Contributor Author

cgilles commented Jan 22, 2024

/home/gilles/Devel/8.x/core/libs/video/QtAVPlayer/qavvideoframe.cpp:192:9: note: by ‘virtual int PlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode, int_, int_, uchar_*)’ 192 | int map(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]) override | ^~~ [ 53%] Built target core_qtavplayer_obj
Gilles

#432

ok, i will backport this commit late this evening.

Look also all warnings that i can see under Ubuntu 23.10 where ffmpeg 5.1 is present :

gilles@KU23:/devel/GIT/8.x/build/core/libs/video$ pwd
/home/gilles/devel/GIT/8.x/build/core/libs/video
gilles@KU23:
/devel/GIT/8.x/build/core/libs/video$ make
Automatic MOC for target core_videotoolscommon_obj
Built target core_videotoolscommon_obj_autogen
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/core_videotoolscommon_obj_autogen/mocs_compilation.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/manager/vidslidesettings.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/manager/ffmpegbinary.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/manager/ffmpeglauncher.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/manager/vidslidetask.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/manager/vidslidethread.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/ffmpegconfighelper.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotoolscommon_obj.dir/player/vidplayerdlg.cpp.o
Built target core_videotoolscommon_obj
Automatic MOC for target core_videotools_obj
Built target core_videotools_obj_autogen
Building CXX object core/libs/video/CMakeFiles/core_videotools_obj.dir/core_videotools_obj_autogen/mocs_compilation.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotools_obj.dir/player/QtAVPlayer/daudioplayer.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotools_obj.dir/player/QtAVPlayer/dvideowidget.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotools_obj.dir/player/QtAVPlayer/mediaplayerview.cpp.o
Building CXX object core/libs/video/CMakeFiles/core_videotools_obj.dir/player/QtAVPlayer/slidevideo.cpp.o
Built target core_videotools_obj
Automatic MOC for target core_qtavplayer_obj
Built target core_qtavplayer_obj_autogen
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/core_qtavplayer_obj_autogen/mocs_compilation.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavaudiocodec.cpp.o
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudiocodec.cpp: In member function ‘QAVAudioFormat QAVAudioCodec::audioFormat() const’:
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudiocodec.cpp:41:38: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
41 | format.setChannelCount(d->avctx->channels);
| ^~~~~~~~
In file included from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudiocodec.cpp:13:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:1006:9: note: declared here
1006 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudiocodec.cpp:41:38: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
41 | format.setChannelCount(d->avctx->channels);
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:1006:9: note: declared here
1006 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudiocodec.cpp:41:38: warning: ‘AVCodecContext::channels’ is deprecated [-Wdeprecated-declarations]
41 | format.setChannelCount(d->avctx->channels);
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:1006:9: note: declared here
1006 | int channels;
| ^~~~~~~~
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavaudiofilter.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavaudioframe.cpp.o
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp: In member function ‘QByteArray QAVAudioFrame::data() const’:
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:125:61: warning: ‘int64_t av_get_default_channel_layout(int)’ is deprecated [-Wdeprecated-declarations]
125 | int64_t outChannelLayout = av_get_default_channel_layout(fmt.channelCount());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavutil/frame.h:33,
from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavframe_p.h:25,
from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:9:
/usr/include/x86_64-linux-gnu/libavutil/channel_layout.h:457:9: note: declared here
457 | int64_t av_get_default_channel_layout(int nb_channels);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:37: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:37: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:37: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:62: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:62: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:62: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:115: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:115: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:115: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:151:107: warning: ‘int av_get_channel_layout_nb_channels(uint64_t)’ is deprecated [-Wdeprecated-declarations]
151 | int64_t channelLayout = (frame->channel_layout && frame->channels == av_get_channel_layout_nb_channels(frame->channel_layout))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/channel_layout.h:449:5: note: declared here
449 | int av_get_channel_layout_nb_channels(uint64_t channel_layout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:152:18: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
152 | ? frame->channel_layout
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:152:18: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
152 | ? frame->channel_layout
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:152:18: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
152 | ? frame->channel_layout
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:153:48: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
153 | : av_get_default_channel_layout(frame->channels);
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:153:48: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
153 | : av_get_default_channel_layout(frame->channels);
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:153:48: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
153 | : av_get_default_channel_layout(frame->channels);
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:153:40: warning: ‘int64_t av_get_default_channel_layout(int)’ is deprecated [-Wdeprecated-declarations]
153 | : av_get_default_channel_layout(frame->channels);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/channel_layout.h:457:9: note: declared here
457 | int64_t av_get_default_channel_layout(int nb_channels);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:163:40: warning: ‘SwrContext* swr_alloc_set_opts(SwrContext*, int64_t, AVSampleFormat, int, int64_t, AVSampleFormat, int, int, void*)’ is deprecated [-Wdeprecated-declarations]
163 | d->swr_ctx = swr_alloc_set_opts(nullptr,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~
164 | outChannelLayout, outFormat, outSampleRate,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 | channelLayout, AVSampleFormat(frame->format), frame->sample_rate,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166 | 0, nullptr);
| ~~~~~~~~~~~
In file included from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:14:
/usr/include/x86_64-linux-gnu/libswresample/swresample.h:260:20: note: declared here
260 | struct SwrContext swr_alloc_set_opts(struct SwrContext s,
| ^~~~~~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:202:54: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
202 | frame->channels,
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:202:54: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
202 | frame->channels,
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioframe.cpp:202:54: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
202 | frame->channels,
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavaudioinputfilter.cpp.o
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp: In constructor ‘QAVAudioInputFilter::QAVAudioInputFilter(const QAVFrame&)’:
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:30: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavutil/hwcontext.h:23,
from /usr/include/x86_64-linux-gnu/libavcodec/codec.h:27,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:313,
from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:20:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:30: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:30: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:52: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:52: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:52: warning: ‘AVFrame::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:510:14: note: declared here
510 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:87: warning: ‘AVCodecParameters::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:314:
/usr/include/x86_64-linux-gnu/libavcodec/codec_par.h:166:14: note: declared here
166 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:87: warning: ‘AVCodecParameters::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/codec_par.h:166:14: note: declared here
166 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:58:87: warning: ‘AVCodecParameters::channel_layout’ is deprecated [-Wdeprecated-declarations]
58 | d->channel_layout = frm->channel_layout ? frm->channel_layout : stream->codecpar->channel_layout;
| ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/codec_par.h:166:14: note: declared here
166 | uint64_t channel_layout;
| ^~~~~~~~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:24: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:24: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:24: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:40: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:40: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:40: warning: ‘AVFrame::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavutil/frame.h:643:9: note: declared here
643 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:69: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/codec_par.h:172:14: note: declared here
172 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:69: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/codec_par.h:172:14: note: declared here
172 | int channels;
| ^~~~~~~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavaudioinputfilter.cpp:59:69: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations]
59 | d->channels = frm->channels ? frm->channels : stream->codecpar->channels;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/libavcodec/codec_par.h:172:14: note: declared here
172 | int channels;
| ^~~~~~~~
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavaudiooutput.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavaudiooutputfilter.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavcodec.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavdemuxer.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavfilter.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavfiltergraph.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavfilters.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavframecodec.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavframe.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavinoutfilter.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qaviodevice.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavpacket.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavplayer.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavstream.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavstreamframe.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavsubtitlecodec.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavsubtitleframe.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideobuffer_cpu.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideobuffer_gpu.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideocodec.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideofilter.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideoframe.cpp.o
In file included from /usr/include/x86_64-linux-gnu/qt5/QtMultimedia/qvideoframe.h:46,
from /usr/include/x86_64-linux-gnu/qt5/QtMultimedia/QVideoFrame:1,
from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavvideoframe.h:14,
from /home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavvideoframe.cpp:8:
/usr/include/x86_64-linux-gnu/qt5/QtMultimedia/qabstractvideobuffer.h:111:12: warning: ‘virtual uchar
QAbstractPlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode, int
, int*)’ was hidden [-Woverloaded-virtual]
111 | uchar map(MapMode mode, int numBytes, int bytesPerLine) override;
| ^~~
/home/gilles/devel/GIT/8.x/core/libs/video/QtAVPlayer/qavvideoframe.cpp:192:9: note: by ‘virtual int PlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode, int
, int
, uchar
*)’
192 | int map(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]) override
| ^~~
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideoinputfilter.cpp.o
Building CXX object core/libs/video/QtAVPlayer/CMakeFiles/core_qtavplayer_obj.dir/qavvideooutputfilter.cpp.o
Built target core_qtavplayer_obj
gilles@KU23:~/devel/GIT/8.x/build/core/libs/video$

Config detected by cmake at digiKAm config time :

-- FFMpeg AVCodec (required) : TRUE (59.37.100)
-- FFMpeg AVDevice (required) : TRUE (59.7.100)
-- FFMpeg AVFilter (required) : TRUE (8.44.100)
-- FFMpeg AVFormat (required) : TRUE (59.27.100)
-- FFMpeg AVUtil (required) : TRUE (57.28.100)
-- FFMpeg SWScale (required) : TRUE (6.7.100)
-- FFMpeg SWResample (required) : TRUE (4.7.100)
-- FFMpeg AVResample (optional) : FALSE ()

Gilles

@valbok
Copy link
Owner

valbok commented Jan 22, 2024

looks made mistake with LIBAVUTIL_VERSION_MAJOR,

#if LIBAVUTIL_VERSION_MAJOR < 58
    format.setChannelCount(d->avctx->channels);
#else
    format.setChannelCount(d->avctx->ch_layout.nb_channels);
#endif

Do you know what is LIBAVUTIL_VERSION_MAJOR for you?

@valbok
Copy link
Owner

valbok commented Jan 22, 2024

#431

2/3s delay before to take effect

Right, looks bug, volume is changed only when new frame is arrived which is not nice. Thanks, will fix

@cgilles
Copy link
Contributor Author

cgilles commented Jan 22, 2024

looks made mistake with LIBAVUTIL_VERSION_MAJOR,

#if LIBAVUTIL_VERSION_MAJOR < 58
    format.setChannelCount(d->avctx->channels);
#else
    format.setChannelCount(d->avctx->ch_layout.nb_channels);
#endif

Do you know what is LIBAVUTIL_VERSION_MAJOR for you?

yes sure :

gilles@KU23:/usr/include/x86_64-linux-gnu/libavutil$ pwd
/usr/include/x86_64-linux-gnu/libavutil

gilles@KU23:/usr/include/x86_64-linux-gnu/libavutil$ cat version.h
/*

  • copyright (c) 2003 Fabrice Bellard
  • This file is part of FFmpeg.
  • FFmpeg is free software; you can redistribute it and/or
  • modify it under the terms of the GNU Lesser General Public
  • License as published by the Free Software Foundation; either
  • version 2.1 of the License, or (at your option) any later version.
  • FFmpeg is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  • Lesser General Public License for more details.
  • You should have received a copy of the GNU Lesser General Public
  • License along with FFmpeg; if not, write to the Free Software
  • Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    */

/**

#ifndef AVUTIL_VERSION_H
#define AVUTIL_VERSION_H

#include "macros.h"

/**

  • @addtogroup version_utils
  • Useful to check and match library version in order to maintain
  • backward compatibility.
  • The FFmpeg libraries follow a versioning sheme very similar to
  • Semantic Versioning (http://semver.org/)
  • The difference is that the component called PATCH is called MICRO in FFmpeg
  • and its value is reset to 100 instead of 0 to keep it above or equal to 100.
  • Also we do not increase MICRO for every bugfix or change in git master.
  • Prior to FFmpeg 3.2 point releases did not change any lib version number to
  • avoid aliassing different git master checkouts.
  • Starting with FFmpeg 3.2, the released library versions will occupy
  • a separate MAJOR.MINOR that is not used on the master development branch.
  • That is if we branch a release of master 55.10.123 we will bump to 55.11.100
  • for the release and master will continue at 55.12.100 after it. Each new
  • point release will then bump the MICRO improving the usefulness of the lib
  • versions.
  • @{
    */

#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)

/**

  • Extract version components from the full ::AV_VERSION_INT int as returned
  • by functions like ::avformat_version() and ::avcodec_version()
    */
    #define AV_VERSION_MAJOR(a) ((a) >> 16)
    #define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)
    #define AV_VERSION_MICRO(a) ((a) & 0xFF)

/**

  • @}
    */

/**

  • @defgroup lavu_ver Version and Build diagnostics
  • Macros and function useful to check at compiletime and at runtime
  • which version of libavutil is in use.
  • @{
    */

#define LIBAVUTIL_VERSION_MAJOR 57
#define LIBAVUTIL_VERSION_MINOR 28
#define LIBAVUTIL_VERSION_MICRO 100

#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR,
LIBAVUTIL_VERSION_MINOR,
LIBAVUTIL_VERSION_MICRO)
#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR,
LIBAVUTIL_VERSION_MINOR,
LIBAVUTIL_VERSION_MICRO)
#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT

#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)

/**

  • @defgroup lavu_depr_guards Deprecation Guards
  • FF_API_* defines may be placed below to indicate public API that will be
  • dropped at a future version bump. The defines themselves are not part of
  • the public API and may change, break or disappear at any time.
  • @note, when bumping the major version it is recommended to manually
  • disable each FF_API_* in its own commit instead of disabling them all
  • at once through the bump. This improves the git bisect-ability of the change.
  • @{
    */

#define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 58)

/**

  • @}
  • @}
    */

#endif /* AVUTIL_VERSION_H */

Gilles

@cgilles
Copy link
Contributor Author

cgilles commented Jan 23, 2024

#431

2/3s delay before to take effect

Right, looks bug, volume is changed only when new frame is arrived which is not nice. Thanks, will fix

Done. merged back in digiKam core

https://invent.kde.org/graphics/digikam/-/commit/9ce21116ad7298900a4e6870b508dea8de06002c

Gilles

@valbok
Copy link
Owner

valbok commented Jan 24, 2024

Did you have a chance to figure out why player->position() returns 0 for you? but it still sends audio frames?
Could you add qDebug()<<d->pts(); to QAVPlayer::position() ?

@cgilles
Copy link
Contributor Author

cgilles commented Jan 24, 2024

yes, I do it now and the audio player work as expected now. position progress well, volume can be changed. Perfect.

Now we must implement the video rotation feature.

Gilles

@valbok valbok closed this as completed May 3, 2024
@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

sure. Any plan for the future ?

Also, take a look to this report under MacOS. digiKam under Apple do not use Qt6 yet (as Macports only provides an older version of Qt6). So Qt5 is used, and QtAvPlayer too.

https://bugs.kde.org/show_bug.cgi?id=486388

My best

Gilles Caulier

@valbok
Copy link
Owner

valbok commented May 3, 2024

https://bugs.kde.org/show_bug.cgi?id=486388

Merged some fixes to audio #464, interesting to see if it helps there.
Are you able to reproduce the issue?

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

yes i can reproduce the problem in my macbookpro intel and M1.

I will backport the code in digiKam core and recompile the bundles.

@valbok
Copy link
Owner

valbok commented May 3, 2024

yes i can reproduce the problem in my macbookpro intel and M1.

I will backport the code in digiKam core and recompile the bundles.

I can help with it, though not sure how easy it is to build on mac.

@valbok valbok reopened this May 3, 2024
@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

If you have a macbook, the PKG installer including your last commit is here :

https://files.kde.org/digikam/

Gilles

@valbok
Copy link
Owner

valbok commented May 3, 2024

https://files.kde.org/digikam/

you still see the issue there?

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

yes, problem still reproducible on my macbook pro M1 with a MOV file taken with my iphone. This is what i seen in the Terminal:

digikam.general: Database Info populated for QUrl("file:///System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV")
Creating hardware device context: videotoolbox
Using hardware device context: videotoolbox
hevc : supported hardware device contexts:
videotoolbox
Available pixel formats:
yuv420p : AVPixelFormat( 0 )
videotoolbox_vld : AVPixelFormat( 160 )
Using hardware decoding in videotoolbox_vld
digikam.general: Video Metadata from "/System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV"
digikam.general: ---
digikam.general: Video Streams Available: 1
digikam.general: "creation_time" "2021-12-21T15:34:42.000000Z"
digikam.general: "encoder" "HEVC"
digikam.general: "handler_name" "Core Media Video"
digikam.general: "language" "und"
digikam.general: "rotate" "90"
digikam.general: "vendor_id" "[0][0][0][0]"
digikam.general: ---
digikam.general: Video orientation from QtAVPlayer: 90
digikam.general: Stacked View Mode : 6
digikam.general: Video Metadata from "/System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV"
digikam.general: ---
digikam.general: Video Streams Available: 1
digikam.general: "creation_time" "2021-12-21T15:34:42.000000Z"
digikam.general: "encoder" "HEVC"
digikam.general: "handler_name" "Core Media Video"
digikam.general: "language" "und"
digikam.general: "rotate" "90"
digikam.general: "vendor_id" "[0][0][0][0]"
digikam.general: ---
digikam.general: Video orientation from QtAVPlayer: 90
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
QAVAudioOutput initialization must be on the audio thread
...

The video is well played without sound. Same file into VLC on the same computer has sound.

Gilles

@valbok
Copy link
Owner

valbok commented May 3, 2024

QAVAudioOutput initialization must be on the audio thread

could you confirm that you use Qt::DirectConnection when sending audio frame to audio output?
QObject::connect(&p, &QAVPlayer::audioFrame, &audioOutput, [&audioOutput](const QAVAudioFrame &frame) { audioOutput.play(frame); }, Qt::DirectConnection);

@valbok
Copy link
Owner

valbok commented May 3, 2024

btw, how you create QAVAudioOutput? do you use parent somehow?
like new QAVAudioOutput(parent) ?

Could you try to avoid parent?

upd: ok, fixing this

moveToThread() will fail if the QObject has a parent.

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

*Direct connection : yes

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/player/QtAVPlayer/dvideowidget.cpp?ref_type=heads#L83

*Avoid parent: no

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/player/QtAVPlayer/dvideowidget.cpp?ref_type=heads#L81

I will fix this last point and rebuild the PKG installer

Gilles

@valbok
Copy link
Owner

valbok commented May 3, 2024

thanks, #467

I will fix this last point and rebuild the PKG installer

could you try this fix? and keep parent, as it is

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

I removed the parent and apply your last fix :

digikam.general: Database Info populated for QUrl("file:///System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV")
Creating hardware device context: videotoolbox
Using hardware device context: videotoolbox
hevc : supported hardware device contexts:
videotoolbox
Available pixel formats:
yuv420p : AVPixelFormat( 0 )
videotoolbox_vld : AVPixelFormat( 160 )
Using hardware decoding in videotoolbox_vld
digikam.general: Video Metadata from "/System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV"
digikam.general: ---
digikam.general: Video Streams Available: 1
digikam.general: "creation_time" "2021-12-21T15:34:42.000000Z"
digikam.general: "encoder" "HEVC"
digikam.general: "handler_name" "Core Media Video"
digikam.general: "language" "und"
digikam.general: "rotate" "90"
digikam.general: "vendor_id" "[0][0][0][0]"
digikam.general: ---
digikam.general: Video orientation from QtAVPlayer: 90
digikam.general: Stacked View Mode : 6
digikam.general: Video Metadata from "/System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV"
digikam.general: ---
digikam.general: Video Streams Available: 1
digikam.general: "creation_time" "2021-12-21T15:34:42.000000Z"
digikam.general: "encoder" "HEVC"
digikam.general: "handler_name" "Core Media Video"
digikam.general: "language" "und"
digikam.general: "rotate" "90"
digikam.general: "vendor_id" "[0][0][0][0]"
digikam.general: ---
digikam.general: Video orientation from QtAVPlayer: 90
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""

No sound again. Do i need to restore the parent to the class instantiation as before ?

Gilles

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

This is how is compiled digiKam. Look especially the ffmpeg setup:

digikam version 8.4.0

OpenCV Configuration:

Threads features:

Parallel framework: gcd
Number of Threads: 10
OpenCL availability: No

Hardware features:

SSSE3: Yes
SSE4.2: Yes
SSE4.1: Yes
SSE3: Yes
SSE2: Yes
SSE: Yes
POPCNT: Yes
MMX: Yes

Manifests:

O2 Snapshoot 2022-02-10:
o2: 99902cc37e083a8311c1f8eee918e93c93cbc937
LIBRAW Snapshoot 2024-04-21:
libraw: 83bf3ad5e0744e78b82fa3c34e7542b2d62fcfa4
LIBLQR Snapshoot 2023-11-06:
liblqr: 7b88c05cec2f0e60125e1cfcad18c79721a2b27c
LENSFUN Snapshoot 2024-05-03:
lensfun: 03e4a1057b9a53b8f6c50df52137e7aac818b469
HEIF Snapshoot 2023-03-26:
heif: 5fb52b6134d5e034b51637a86c6e8a7418b35df1
EXIV2 Snapshoot 2024-05-03:
exiv2: 04207b9c39bf7b3b1a7144f7ed4e4f16b4f29ef6
Libraries:
XMP SDK: 7.0
Qt WebEngine version: 5.15.15
Qt Sql drivers: QSQLITE QMARIADB QMYSQL QMYSQL3
Qt Framework: 5.15.11
Libx265: 0.0
LibTIFF: 4.6.0
LibRaw: 0.22.0
LibPNG: 1.6.40
LibPGF: 7.21.07
LibOpenCV: 4.6.0
LibLCMS: 2150
LibJPEG: 80
LibJasper: 4.0.0
LibHEIF: 1.17.0
LibGphoto2: 2.5.31
LibCImg: 130
LibAVUtil: 56.70.100
LibAVFormat: 58.76.100
LibAVCodec: 58.134.100
LensFun: 0.3.95-0
KDE Framework: 5.114.0
ImageMagick codecs: 7.1.0
Geolocation support: Yes
Exiv2: 0.28.2
ExifTool: 12.84
Eigen: 3.4.0
DNG SDK: 1.7.1

FFmpeg Configuration:

Video Encoders:

vc2: SMPTE VC-2
prores_ks: Apple ProRes (iCodec Pro)
prores_aw: Apple ProRes
ljpeg: Lossless JPEG
libxvid: libxvidcore MPEG-4 part 2
libx265: libx265 H.265 / HEVC
libx264rgb: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB
libx264: libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
libtheora: libtheora Theora
libsvtav1: SVT-AV1(Scalable Video Technology for AV1) encoder
hevc_videotoolbox: VideoToolbox H.265 Encoder
h264_videotoolbox: VideoToolbox H.264 Encoder
a64multi5: Multicolor charset for Commodore 64, extended with 5th color (colram)
a64multi: Multicolor charset for Commodore 64

Video Decoders:

zmbv: Zip Motion Blocks Video
zlib: LCL (LossLess Codec Library) ZLIB
zerocodec: ZeroCodec Lossless Video
yuv4: Uncompressed packed 4:2:0
yop: Psygnosis YOP Video
ylc: YUY2 Lossless Codec
y41p: Uncompressed YUV 4:1:1 12-bit
xwd: XWD (X Window Dump) image
xpm: XPM (X PixMap) image
xl: Miro VideoXL
xface: X-face image
xbm: XBM (X BitMap) image
xbin: eXtended BINary text
xan_wc4: Wing Commander IV / Xxan
xan_wc3: Wing Commander III / Xan
wrapped_avframe: AVPacket to AVFrame passthrough
wnv1: Winnov WNV1
wmv3image: Windows Media Video 9 Image
wmv3: Windows Media Video 9
wmv2: Windows Media Video 8
wmv1: Windows Media Video 7
webp: WebP image
wcmv: WinCAM Motion Video
vqavideo: Westwood Studios VQA (Vector Quantized Animation) video
vp9: Google VP9
vp8: On2 VP8
vp7: On2 VP7
vp6f: On2 VP6 (Flash version)
vp6a: On2 VP6 (Flash version, with alpha channel)
vp6: On2 VP6
vp5: On2 VP5
vp4: On2 VP4
vp3: On2 VP3
vmnc: VMware Screen Codec / VMware Video
vmdvideo: Sierra VMD video
vcr1: ATI VCR1
vc1image: Windows Media Video 9 Image v2
vc1: SMPTE VC-1
vble: VBLE Lossless Codec
vb: Beam Software VB
v410: Uncompressed 4:4:4 10-bit
v408: Uncompressed packed QT 4:4:4:4
v308: Uncompressed packed 4:4:4
v210x: Uncompressed 4:2:2 10-bit
v210: Uncompressed 4:2:2 10-bit
utvideo: Ut Video
ultimotion: IBM UltiMotion
txd: Renderware TXD (TeXture Dictionary) image
tscc2: TechSmith Screen Codec 2
truemotion2rt: Duck TrueMotion 2.0 Real Time
truemotion2: Duck TrueMotion 2.0
truemotion1: Duck TrueMotion 1.0
tmv: 8088flex TMV
tiff: TIFF image
tiertexseqvideo: Tiertex Limited SEQ video
thp: Nintendo Gamecube THP video
theora: Theora
tdsc: TDSC
targa_y216: Pinnacle TARGA CineWave YUV16
targa: Truevision Targa image
svq3: Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3
svq1: Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
sunrast: Sun Rasterfile image
srgc: Screen Recorder Gold Codec
speedhq: NewTek SpeedHQ
sp5x: Sunplus JPEG (SP5X)
snow: Snow
smvjpeg: SMV JPEG
smc: QuickTime Graphics (SMC)
smackvid: Smacker video
simbiosis_imx: Simbiosis Interactive IMX Video
sheervideo: BitJazz SheerVideo
sgirle: Silicon Graphics RLE 8-bit video
sgi: SGI image
sga: Digital Pictures SGA Video
screenpresso: Screenpresso
scpr: ScreenPressor
sanm: LucasArts SANM/Smush video
rv40: RealVideo 4.0
rv30: RealVideo 3.0
rv20: RealVideo 2.0
rv10: RealVideo 1.0
rscc: innoHeim/Rsupport Screen Capture Codec
rpza: QuickTime video (RPZA)
roqvideo: id RoQ video
rl2: RL2 video
rawvideo: raw video
rasc: RemotelyAnywhere Screen Capture
r210: Uncompressed RGB 10-bit
r10k: AJA Kona 10-bit RGB Codec
qtrle: QuickTime Animation (RLE) video
qpeg: Q-team QPEG
qdraw: Apple QuickDraw
ptx: V.Flash PTX image
psd: Photoshop PSD file
prosumer: Brooktree ProSumer Video
prores: Apple ProRes (iCodec Pro)
ppm: PPM (Portable PixelMap) image
png: PNG (Portable Network Graphics) image
pixlet: Apple Pixlet
pictor: Pictor/PC Paint
photocd: Kodak Photo CD
pgx: PGX (JPEG2000 Test Format)
pgmyuv: PGMYUV (Portable GrayMap YUV) image
pgm: PGM (Portable GrayMap) image
pfm: PFM (Portable FloatMap) image
pcx: PC Paintbrush PCX image
pbm: PBM (Portable BitMap) image
pam: PAM (Portable AnyMap) image
paf_video: Amazing Studio Packed Animation File Video
nuv: NuppelVideo/RTJPEG
notchlc: NotchLC
mxpeg: Mobotix MxPEG video
mwsc: MatchWare Screen Capture Codec
mvha: MidiVid Archive Codec
mvdv: MidiVid VQ
mvc2: Silicon Graphics Motion Video Compressor 2
mvc1: Silicon Graphics Motion Video Compressor 1
mv30: MidiVid 3.0
mts2: MS Expression Encoder Screen
mszh: LCL (LossLess Codec Library) MSZH
msvideo1: Microsoft Video 1
mss2: MS Windows Media Video V9 Screen
mss1: MS Screen 1
msrle: Microsoft RLE
msp2: Microsoft Paint (MSP) version 2
msmpeg4v2: MPEG-4 part 2 Microsoft variant version 2
msmpeg4v1: MPEG-4 part 2 Microsoft variant version 1
msmpeg4: MPEG-4 part 2 Microsoft variant version 3
mscc: Mandsoft Screen Capture Codec
msa1: MS ATC Screen
mpegvideo: MPEG-1 video
mpeg4: MPEG-4 part 2
mpeg2video: MPEG-2 video
mpeg1video: MPEG-1 video
motionpixels: Motion Pixels video
mobiclip: MobiClip Video
mmvideo: American Laser Games MM Video
mjpegb: Apple MJPEG-B
mjpeg: MJPEG (Motion JPEG)
mimic: Mimic
mdec: Sony PlayStation MDEC (Motion DECoder)
magicyuv: MagicYUV video
m101: Matrox Uncompressed SD
lscr: LEAD Screen Capture
loco: LOCO
libvpx-vp9: libvpx VP9
libvpx: libvpx VP8
librsvg: Librsvg rasterizer
libopenjpeg: OpenJPEG JPEG 2000
libdav1d: dav1d AV1 decoder by VideoLAN
libaom-av1: libaom AV1
lagarith: Lagarith lossless
kmvc: Karl Morton's video codec
kgv1: Kega Game Video
jv: Bitmap Brothers JV video
jpegls: JPEG-LS
jpeg2000: JPEG 2000
ipu: IPU Video
interplayvideo: Interplay MVE video
indeo5: Intel Indeo Video Interactive 5
indeo4: Intel Indeo Video Interactive 4
indeo3: Intel Indeo 3
indeo2: Intel Indeo 2
imm5: Infinity IMM5
imm4: Infinity IMM4
iff: IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN
idf: iCEDraw text
idcinvideo: id Quake II CIN video
hymt: HuffYUV MT
huffyuv: Huffyuv / HuffYUV
hqx: Canopus HQX
hq_hqa: Canopus HQ/HQA
hnm4video: HNM 4 video
hevc: HEVC (High Efficiency Video Coding)
hap: Vidvox Hap
h264: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
h263p: H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
h263i: Intel H.263
h263: H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
h261: H.261
gif: GIF (Graphics Interchange Format)
gdv: Gremlin Digital Video
g2m: Go2Meeting
frwu: Forward Uncompressed
fraps: Fraps
fmvc: FM Screen Capture Codec
flv: FLV / Sorenson Spark / Sorenson H.263 (Flash Video)
flic: Autodesk Animator Flic video
flashsv2: Flash Screen Video v2
flashsv: Flash Screen Video v1
fits: Flexible Image Transport System
fic: Mirillis FIC
ffvhuff: Huffyuv FFmpeg variant
ffv1: FFmpeg video codec #1
exr: OpenEXR image
escape130: Escape 130
escape124: Escape 124
eatqi: Electronic Arts TQI Video
eatgv: Electronic Arts TGV video
eatgq: Electronic Arts TGQ video
eamad: Electronic Arts Madcow Video
eacmv: Electronic Arts CMV video
dxv: Resolume DXV
dxtory: Dxtory
dxa: Feeble Files/ScummVM DXA
dvvideo: DV (Digital Video)
dsicinvideo: Delphine Software International CIN video
dpx: DPX (Digital Picture Exchange) image
dnxhd: VC3/DNxHD
dirac: BBC Dirac VC-2
dfa: Chronomaster DFA
dds: DirectDraw Surface image decoder
cyuv: Creative YUV (CYUV)
cri: Cintel RAW
cpia: CPiA video format
cllc: Canopus Lossless Codec
cljr: Cirrus Logic AccuPak
clearvideo: Iterated Systems ClearVideo
cinepak: Cinepak
cfhd: GoPro CineForm HD
cdxl: Commodore CDXL video
cdtoons: CDToons video
cdgraphics: CD Graphics video
cavs: Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
camtasia: TechSmith Screen Capture Codec
camstudio: CamStudio
c93: Interplay C93
brender_pix: BRender PIX image
bmv_video: Discworld II BMV video
bmp: BMP (Windows and OS/2 bitmap)
bitpacked: Bitpacked
bintext: Binary text
binkvideo: Bink video
bfi: Brute Force & Ignorance
bethsoftvid: Bethesda VID video
ayuv: Uncompressed packed MS 4:4:4:4
avui: Avid Meridien Uncompressed
avs: AVS (Audio Video Standard) video
avrp: Avid 1:1 10-bit RGB Packer
avrn: Avid AVI Codec
av1: Alliance for Open Media AV1
aura2: Auravision Aura 2
aura: Auravision AURA
asv2: ASUS V2
asv1: ASUS V1
argo: Argonaut Games Video
arbc: Gryphon's Anim Compressor
apng: APNG (Animated Portable Network Graphics) image
ansi: ASCII/ANSI art
anm: Deluxe Paint Animation
amv: AMV Video
alias_pix: Alias/Wavefront PIX image
aic: Apple Intermediate Codec
agm: Amuse Graphics Movie
aasc: Autodesk RLE
8bps: QuickTime 8BPS video
4xm: 4X Movie
012v: Uncompressed 4:2:2 10-bit

Supported Extensions:

y4m: YUV4MPEG pipe
xml: WebM DASH Manifest
wv: raw WavPack
wtv: Windows Television (WTV)
webp: WebP
webm: WebM
wav: WAV / WAVE (Waveform Audio)
w64: Sony Wave64
vtt: WebVTT subtitle
voc: Creative Voice
vob: MPEG-2 PS (VOB)
vc1: raw VC-1 video
vag: Simon & Schuster Interactive VAG
uw: PCM unsigned 16-bit little-endian
ul: PCM mu-law
ub: PCM unsigned 8-bit
ttml: TTML subtitle
tta: TTA (True Audio)
thd: raw TrueHD
swf: SWF (ShockWave Flash)
sw: PCM signed 16-bit little-endian
sup: raw HDMV Presentation Graphic Stream subtitles
sub: MicroDVD subtitle format
srt: SubRip subtitle
spx: Ogg Speex
spdif: IEC 61937 (used on S/PDIF - IEC958)
sox: SoX native
scc: Scenarist Closed Captions
sb: PCM signed 8-bit
rso: Lego Mindstorms RSO
roq: raw id RoQ
rcv: VC-1 test bitstream
opus: Ogg Opus
oma: Sony OpenMG audio
ogv: Ogg Video
ogg: Ogg
oga: Ogg Audio
nut: NUT
mxf: MXF (Material eXchange Format) Operational Pattern Atom
mpd: DASH Muxer
mp4: MP4 (MPEG-4 Part 14)
mp3: MP3 (MPEG audio layer 3)
mov: QuickTime / MOV
mmf: Yamaha SMAF
mlp: raw MLP
mkv: Matroska
mka: Matroska Audio
mjpg: MIME multipart JPEG
m4v: raw MPEG-4 video
m3u8: Apple HTTP Live Streaming
m2v: raw MPEG-2 video
lrc: LRC lyrics
lbc: iLBC storage
ivf: On2 IVF
ico: Microsoft Windows ICO
h263: raw H.263
h261: raw H.261
gxf: GXF (General eXchange Format)
gsm: raw GSM
gif: CompuServe Graphics Interchange Format (GIF)
g722: raw G.722
flv: FLV (Flash Video)
flm: Adobe Filmstrip
flac: raw FLAC
fits: Flexible Image Transport System
ffmeta: FFmpeg metadata in text
f4v: F4V Adobe Flash Video
eac3: raw E-AC-3
dvd: MPEG-2 PS (DVD VOB)
dv: DV (Digital Video)
dts: raw DTS
cpk: Sega FILM / CPK
chk: WebM Chunk Muxer
cavs: raw Chinese AVS (Audio Video Standard) video
caf: Apple CAF (Core Audio Format)
c2: codec2 .c2 muxer
bit: G.729 BIT file format
avi: AVI (Audio Video Interleaved)
au: Sun AU
ast: AST (Audio Stream)
aptxhd: raw aptX HD (Audio Processing Technology for Bluetooth)
aptx: raw aptX (Audio Processing Technology for Bluetooth)
apng: Animated Portable Network Graphics
apm: Ubisoft Rayman 2 APM
amv: AMV
amr: 3GPP AMR
al: PCM A-law
adx: CRI ADX
ac3: raw AC-3
3gp: 3GP (3GPP file format)
3g2: 3GP2 (3GPP2 file format)
302: D-Cinema audio

Audio Encoders:

sonicls: Sonic lossless
mp2fixed: MP2 fixed point (MPEG audio layer 2)
libmp3lame: libmp3lame MP3 (MPEG audio layer 3)

Audio Decoders:

xma2: Xbox Media Audio 2
xma1: Xbox Media Audio 1
xan_dpcm: DPCM Xan
ws_snd1: Westwood Audio (SND1)
wmavoice: Windows Media Audio Voice
wmav2: Windows Media Audio 2
wmav1: Windows Media Audio 1
wmapro: Windows Media Audio 9 Professional
wmalossless: Windows Media Audio Lossless
wavpack: WavPack
wavesynth: Wave synthesis pseudo-codec
vorbis: Vorbis
vmdaudio: Sierra VMD audio
twinvq: VQF TwinVQ
tta: TTA (True Audio)
truespeech: DSP Group TrueSpeech
truehd: TrueHD
tak: TAK (Tom's lossless Audio Kompressor)
sonic: Sonic
sol_dpcm: DPCM Sol
smackaud: Smacker audio
siren: Siren
sipr: RealAudio SIPR / ACELP.NET
shorten: Shorten
sdx2_dpcm: DPCM Squareroot-Delta-Exact
sbc: SBC (low-complexity subband codec)
s302m: SMPTE 302M
roq_dpcm: DPCM id RoQ
real_288: RealAudio 2.0 (28.8K)
real_144: RealAudio 1.0 (14.4K)
ralf: RealAudio Lossless
qdmc_at: qdmc (AudioToolbox)
qdmc: QDesign Music Codec 1
qdm2_at: qdm2 (AudioToolbox)
qdm2: QDesign Music Codec 2
qcelp: QCELP / PureVoice
pcm_vidc: PCM Archimedes VIDC
pcm_u8: PCM unsigned 8-bit
pcm_u32le: PCM unsigned 32-bit little-endian
pcm_u32be: PCM unsigned 32-bit big-endian
pcm_u24le: PCM unsigned 24-bit little-endian
pcm_u24be: PCM unsigned 24-bit big-endian
pcm_u16le: PCM unsigned 16-bit little-endian
pcm_u16be: PCM unsigned 16-bit big-endian
pcm_sga: PCM SGA
pcm_s8_planar: PCM signed 8-bit planar
pcm_s8: PCM signed 8-bit
pcm_s64le: PCM signed 64-bit little-endian
pcm_s64be: PCM signed 64-bit big-endian
pcm_s32le_planar: PCM signed 32-bit little-endian planar
pcm_s32le: PCM signed 32-bit little-endian
pcm_s32be: PCM signed 32-bit big-endian
pcm_s24le_planar: PCM signed 24-bit little-endian planar
pcm_s24le: PCM signed 24-bit little-endian
pcm_s24daud: PCM D-Cinema audio signed 24-bit
pcm_s24be: PCM signed 24-bit big-endian
pcm_s16le_planar: PCM signed 16-bit little-endian planar
pcm_s16le: PCM signed 16-bit little-endian
pcm_s16be_planar: PCM signed 16-bit big-endian planar
pcm_s16be: PCM signed 16-bit big-endian
pcm_mulaw_at: pcm_mulaw (AudioToolbox)
pcm_mulaw: PCM mu-law / G.711 mu-law
pcm_lxf: PCM signed 20-bit little-endian planar
pcm_f64le: PCM 64-bit floating point little-endian
pcm_f64be: PCM 64-bit floating point big-endian
pcm_f32le: PCM 32-bit floating point little-endian
pcm_f32be: PCM 32-bit floating point big-endian
pcm_f24le: PCM 24.0 floating point little-endian
pcm_f16le: PCM 16.8 floating point little-endian
pcm_dvd: PCM signed 16|20|24-bit big-endian for DVD media
pcm_bluray: PCM signed 16|20|24-bit big-endian for Blu-ray media
pcm_alaw_at: pcm_alaw (AudioToolbox)
pcm_alaw: PCM A-law / G.711 A-law
paf_audio: Amazing Studio Packed Animation File Audio
opus: Opus
on2avc: On2 Audio for Video Codec
nellymoser: Nellymoser Asao
mpc8: Musepack SV8
mpc7: Musepack SV7
mp3on4float: MP3onMP4
mp3on4: MP3onMP4
mp3float: MP3 (MPEG audio layer 3)
mp3adufloat: ADU (Application Data Unit) MP3 (MPEG audio layer 3)
mp3adu: ADU (Application Data Unit) MP3 (MPEG audio layer 3)
mp3_at: mp3 (AudioToolbox)
mp3: MP3 (MPEG audio layer 3)
mp2float: MP2 (MPEG audio layer 2)
mp2_at: mp2 (AudioToolbox)
mp2: MP2 (MPEG audio layer 2)
mp1float: MP1 (MPEG audio layer 1)
mp1_at: mp1 (AudioToolbox)
mp1: MP1 (MPEG audio layer 1)
mlp: MLP (Meridian Lossless Packing)
metasound: Voxware MetaSound
mace6: MACE (Macintosh Audio Compression/Expansion) 6:1
mace3: MACE (Macintosh Audio Compression/Expansion) 3:1
libvorbis: libvorbis
libspeex: libspeex Speex
libopus: libopus Opus
interplayacm: Interplay ACM
interplay_dpcm: DPCM Interplay
imc: IMC (Intel Music Coder)
ilbc_at: ilbc (AudioToolbox)
ilbc: iLBC (Internet Low Bitrate Codec)
iac: IAC (Indeo Audio Coder)
hcom: HCOM Audio
hca: CRI HCA
gsm_ms_at: gsm_ms (AudioToolbox)
gsm_ms: GSM Microsoft variant
gsm: GSM
gremlin_dpcm: DPCM Gremlin
g729: G.729
g726le: G.726 ADPCM little-endian
g726: G.726 ADPCM
g723_1: G.723.1
g722: G.722 ADPCM
flac: FLAC (Free Lossless Audio Codec)
fastaudio: MobiClip FastAudio
evrc: EVRC (Enhanced Variable Rate Codec)
eac3_at: eac3 (AudioToolbox)
eac3: ATSC A/52B (AC-3, E-AC-3)
dvaudio: Ulead DV Audio
dst: DST (Digital Stream Transfer)
dss_sp: Digital Speech Standard - Standard Play mode (DSS SP)
dsicinaudio: Delphine Software International CIN audio
dsd_msbf_planar: DSD (Direct Stream Digital), most significant bit first, planar
dsd_msbf: DSD (Direct Stream Digital), most significant bit first
dsd_lsbf_planar: DSD (Direct Stream Digital), least significant bit first, planar
dsd_lsbf: DSD (Direct Stream Digital), least significant bit first
dolby_e: Dolby E
derf_dpcm: DPCM Xilam DERF
dca: DCA (DTS Coherent Acoustics)
cook: Cook / Cooker / Gecko (RealAudio G2)
comfortnoise: RFC 3389 comfort noise generator
bmv_audio: Discworld II BMV audio
binkaudio_rdft: Bink Audio (RDFT)
binkaudio_dct: Bink Audio (DCT)
atrac9: ATRAC9 (Adaptive TRansform Acoustic Coding 9)
atrac3plusal: ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)
atrac3plus: ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)
atrac3al: ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)
atrac3: ATRAC3 (Adaptive TRansform Acoustic Coding 3)
atrac1: ATRAC1 (Adaptive TRansform Acoustic Coding)
aptx_hd: aptX HD (Audio Processing Technology for Bluetooth)
aptx: aptX (Audio Processing Technology for Bluetooth)
ape: Monkey's Audio
amrwb: AMR-WB (Adaptive Multi-Rate WideBand)
amrnb: AMR-NB (Adaptive Multi-Rate NarrowBand)
amr_nb_at: amr_nb (AudioToolbox)
als: MPEG-4 Audio Lossless Coding (ALS)
alac_at: alac (AudioToolbox)
alac: ALAC (Apple Lossless Audio Codec)
adpcm_zork: ADPCM Zork
adpcm_yamaha: ADPCM Yamaha
adpcm_xa: ADPCM CDROM XA
adpcm_vima: LucasArts VIMA audio
adpcm_thp_le: ADPCM Nintendo THP (little-endian)
adpcm_thp: ADPCM Nintendo THP
adpcm_swf: ADPCM Shockwave Flash
adpcm_sbpro_4: ADPCM Sound Blaster Pro 4-bit
adpcm_sbpro_3: ADPCM Sound Blaster Pro 2.6-bit
adpcm_sbpro_2: ADPCM Sound Blaster Pro 2-bit
adpcm_psx: ADPCM Playstation
adpcm_mtaf: ADPCM MTAF
adpcm_ms: ADPCM Microsoft
adpcm_ima_ws: ADPCM IMA Westwood
adpcm_ima_wav: ADPCM IMA WAV
adpcm_ima_ssi: ADPCM IMA Simon & Schuster Interactive
adpcm_ima_smjpeg: ADPCM IMA Loki SDL MJPEG
adpcm_ima_rad: ADPCM IMA Radical
adpcm_ima_qt_at: adpcm_ima_qt (AudioToolbox)
adpcm_ima_qt: ADPCM IMA QuickTime
adpcm_ima_oki: ADPCM IMA Dialogic OKI
adpcm_ima_mtf: ADPCM IMA Capcom's MT Framework
adpcm_ima_moflex: ADPCM IMA MobiClip MOFLEX
adpcm_ima_iss: ADPCM IMA Funcom ISS
adpcm_ima_ea_sead: ADPCM IMA Electronic Arts SEAD
adpcm_ima_ea_eacs: ADPCM IMA Electronic Arts EACS
adpcm_ima_dk4: ADPCM IMA Duck DK4
adpcm_ima_dk3: ADPCM IMA Duck DK3
adpcm_ima_dat4: ADPCM IMA Eurocom DAT4
adpcm_ima_cunning: ADPCM IMA Cunning Developments
adpcm_ima_apm: ADPCM IMA Ubisoft APM
adpcm_ima_apc: ADPCM IMA CRYO APC
adpcm_ima_amv: ADPCM IMA AMV
adpcm_ima_alp: ADPCM IMA High Voltage Software ALP
adpcm_ea_xas: ADPCM Electronic Arts XAS
adpcm_ea_r3: ADPCM Electronic Arts R3
adpcm_ea_r2: ADPCM Electronic Arts R2
adpcm_ea_r1: ADPCM Electronic Arts R1
adpcm_ea_maxis_xa: ADPCM Electronic Arts Maxis CDROM XA
adpcm_ea: ADPCM Electronic Arts
adpcm_dtk: ADPCM Nintendo Gamecube DTK
adpcm_ct: ADPCM Creative Technology
adpcm_argo: ADPCM Argonaut Games
adpcm_aica: ADPCM Yamaha AICA
adpcm_agm: ADPCM AmuseGraphics Movie
adpcm_afc: ADPCM Nintendo Gamecube AFC
adpcm_adx: SEGA CRI ADX ADPCM
adpcm_4xm: ADPCM 4X Movie
acelp.kelvin: Sipro ACELP.KELVIN
ac3_fixed: ATSC A/52A (AC-3)
ac3_at: ac3 (AudioToolbox)
ac3: ATSC A/52A (AC-3)
aac_latm: AAC LATM (Advanced Audio Coding LATM syntax)
aac_fixed: AAC (Advanced Audio Coding)
aac_at: aac (AudioToolbox)
aac: AAC (Advanced Audio Coding)
8svx_fib: 8SVX fibonacci
8svx_exp: 8SVX exponential

Features:

Spell-Checking support: No
Rajce support: Yes
Qt Multimedia support: Yes
Parallelized demosaicing: Yes
Panorama support: Yes
Memory available: 16.0 GiB
Media player support: Yes
Image cache size: 983.0 MiB
HTML Gallery support: Yes
HEIF writing support: Yes
HEIF reading support: Yes
Exiv2 supports XMP metadata: Yes
Exiv2 supports JPEG-XL metadata: Yes
Exiv2 supports Base Media: Yes
DBus support: No
Database backend: QSQLITE
CPU cores: 10
Calendar support: Yes
Baloo support: No
AddressBook support: No

Gilles

@valbok
Copy link
Owner

valbok commented May 3, 2024

Audio device is not supported: ""

means that the audio device is null, there is no info about device, very sus

@valbok
Copy link
Owner

valbok commented May 3, 2024

I removed the parent and apply your last fix :

I merged already a fix to support parents, so it should work for your prev code.

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

Do i need to setup something with the audio device ?

NOTE: I don't need to do it under Linux

I recompile digiKam with the parent passed to the class, it's better for the memory cleanup.

Gilles

@valbok
Copy link
Owner

valbok commented May 3, 2024

sorry, not clear what is version of ffmpeg? 7?

brew install qt@5
brew install ffmpeg@5
brew install ffmpeg

and checked widget_video example and it works

% /opt/homebrew/Cellar/qt@5/5.15.13_1/bin/qmake
% cat /opt/ffmpeg.source                                                                        
export FFMPEG_ROOT=/opt/homebrew/Cellar/ffmpeg/7.0_1
export LIBRARY_PATH=$FFMPEG_ROOT/lib:$LIBRARY_PATH
export CPLUS_INCLUDE_PATH=$FFMPEG_ROOT/include:$CPLUS_INCLUDE_PATH
% source /opt/ffmpeg.source
% make
% ./widget_video.app/Contents/MacOS/widget_video ~/Downloads/Missiya_Serenity_2005_BDRip_by_Dalemake.avi

@cgilles
Copy link
Contributor Author

cgilles commented May 3, 2024

Macports said ffmpeg 4.4.4.

Macports have been installed since a while, as few months ago, in 2023. Do you think that i need to re-install all from scratch ?

Gilles

@cgilles
Copy link
Contributor Author

cgilles commented May 4, 2024

hi,

in macport default ffmpeg is 4.4.4.

I recompiled digiKam with extra codecs from ffmpeg GPL3 and nonfree. I re-add the parent to the audio device instance. This do not change anything:

digikam.general: Event is dispatched to OSX desktop notifier
digikam.general: Stacked View Mode : 6
digikam.general: Database Info populated for QUrl("file:///System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV")
Creating hardware device context: videotoolbox
Using hardware device context: videotoolbox
hevc : supported hardware device contexts:
videotoolbox
Available pixel formats:
yuv420p : AVPixelFormat( 0 )
videotoolbox_vld : AVPixelFormat( 160 )
Using hardware decoding in videotoolbox_vld
digikam.general: Video Metadata from "/System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV"
digikam.general: ---
digikam.general: Video Streams Available: 1
digikam.general: "creation_time" "2021-12-21T15:34:42.000000Z"
digikam.general: "encoder" "HEVC"
digikam.general: "handler_name" "Core Media Video"
digikam.general: "language" "und"
digikam.general: "rotate" "90"
digikam.general: "vendor_id" "[0][0][0][0]"
digikam.general: ---
digikam.general: Video orientation from QtAVPlayer: 90
digikam.general: Stacked View Mode : 6
digikam.general: Video Metadata from "/System/Volumes/Data/Users/gilles/Pictures/SALAGOU/2021-12-21/66179368138__C05A772F-62BA-48DF-A389-1C7FFC7EE627.MOV"
digikam.general: ---
digikam.general: Video Streams Available: 1
digikam.general: "creation_time" "2021-12-21T15:34:42.000000Z"
digikam.general: "encoder" "HEVC"
digikam.general: "handler_name" "Core Media Video"
digikam.general: "language" "und"
digikam.general: "rotate" "90"
digikam.general: "vendor_id" "[0][0][0][0]"
digikam.general: ---
digikam.general: Video orientation from QtAVPlayer: 90
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
Audio device is not supported: ""
...

Note: digiKam is compiled as non universal. Only X86_64 target is used. Application run in Rosetta 2 translator like a charm on my M1.

Note : on my second macport pro Intel, the result is the same : no sound.
Gilles

@valbok
Copy link
Owner

valbok commented May 4, 2024

thanks,
would it be possible to remove if (audioDevice.isNull() from https://github.com/valbok/QtAVPlayer/blob/master/src/QtAVPlayer/qavaudiooutput.cpp#L131 and check if the sound works? maybe it is ok to have null device there?

@valbok
Copy link
Owner

valbok commented May 4, 2024

btw, could you confirm that you have installed libqtaudio_coreaudio.dylib?

@cgilles
Copy link
Contributor Author

cgilles commented May 4, 2024

libqtaudio_coreaudio.dylib ??? What's is that ?

@cgilles
Copy link
Contributor Author

cgilles commented May 4, 2024

libqtaudio_coreaudio.dylib is not present in the digiKam bundle...

@valbok
Copy link
Owner

valbok commented May 4, 2024

libqtaudio_coreaudio.dylib ??? What's is that ?

this is core audio plugin from qtmultimedia, not sure it is installed by default.

Used to play audio, without it is unable to play

@cgilles
Copy link
Contributor Author

cgilles commented May 4, 2024

Right it's present in the macports install

pwd

/opt/digikam.org.x86_64/libexec/qt5/plugins/audio

ls -al

total 48
drwxr-xr-x 3 root wheel 96 Jan 26 19:48 .
drwxr-xr-x 19 root wheel 608 May 4 11:27 ..
-rwxr-xr-x 1 root wheel 114992 Jan 26 19:48 libqtaudio_coreaudio.dylib

I will patch the bundle build script to include it immediatly (:-)))

Gilles

@cgilles
Copy link
Contributor Author

cgilles commented May 4, 2024

Bundle re-build in progress...

@cgilles
Copy link
Contributor Author

cgilles commented May 4, 2024

Adding the Qt plugin fix the sound problem. All work as expected now. Thanks valbok for your support and your patience.

Gilles

@cgilles cgilles closed this as completed May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants