I have a lot of videos shot on iPhones or iPads in portrait mode. These are MOV (or MP4) files which have an "Orientation" metadata flag set. In iPhoto they are displayed correctly rotated, but in Digikam 4.14 they are not. (I can't test Digikam 5 because even on my Virtualbox Kubuntu 15.10, Digikam 5beta5 packages by philip5 flatly refuse to preview or show videos at all right now.) I would wish for Digikam's player (phonon, gstreamer, ...) to correctly respect the "Orientation" flag in MOV and MP4 files (I don't know about other video formats) and to display the videos correctly. If required, please reassign this bug to the correct project if Digikam itself cannot do anything about this. Thank you! Reproducible: Always
The new digiKam 5 will be based on Qt5Multimedia framework (not Phonon), which use GStreamer backend. 1/ I don't yet checked if Qt5Multimedia handle orientation tag to rotate video accordingly. 2/ digiKam delegate video preview to Qt5Multimedia. We pass the file url to the framework and that all. So, we have nothing to do in digiKam to fix this problem. Gilles Caulier
Thank you! How can I check whether it already works in 5.0beta5, what packages do I need to install for video playback and thumbs to work?
Typically Gstreamer backend whole packages under Linux: http://wiki.qt.io/Qt_5.5.0_Multimedia_Backends For the video thumbnails, Qt5Multimedia cannot do it for the moment. It still delegate to KDE5 imageio plugins Gilles Caulier
Git commit 32ebb7dff83b03cfad91cbe89de252b1f62bdd6e by Gilles Caulier. Committed on 11/12/2016 at 12:02. Pushed by cgilles into branch 'master'. digiKam embeded mediaplayer is now based on QtAV/ffmpeg instead Qt5Multimedia. TODO: - handle video rotation flag with new Exiv2 0.26 to autorotate media in player. - port video thumbnailer to QtAV. - port Presentation audio player to QtAV. - remove Qt5Multimedia dependency. For later: - play video into slideshow tool. - port old videoslideshow tool to QtAv Related: bug 373272, bug 372485, bug 271751, bug 159824, bug 329854 M +12 -6 CMakeLists.txt M +3 -2 app/CMakeLists.txt M +40 -38 app/views/mediaplayerview.cpp M +11 -8 app/views/mediaplayerview.h https://commits.kde.org/digikam/32ebb7dff83b03cfad91cbe89de252b1f62bdd6e
Git commit ec50a8ad510e9fe6ded53f0632afd4ffbdf8ba47 by Gilles Caulier. Committed on 11/12/2016 at 16:37. Pushed by cgilles into branch 'master'. digiKam port to QtAV/ffmpeg instead Qt5Multimedia : port Presentation audio player to QtAV. TODO: - handle video rotation flag with new Exiv2 0.26 to autorotate media in player. - port video thumbnailer to QtAV. - remove Qt5Multimedia dependency. For later: - play video into slideshow tool. - port old videoslideshow tool to QtAv. Related: bug 372485, bug 271751, bug 159824, bug 329854 M +4 -5 app/CMakeLists.txt M +1 -1 app/views/mediaplayerview.cpp M +2 -2 app/views/mediaplayerview.h M +1 -5 utilities/presentation/CMakeLists.txt M +34 -24 utilities/presentation/audio/presentationaudiolist.cpp M +8 -5 utilities/presentation/audio/presentationaudiolist.h M +45 -27 utilities/presentation/audio/presentationaudiowidget.cpp M +9 -5 utilities/presentation/audio/presentationaudiowidget.h https://commits.kde.org/digikam/ec50a8ad510e9fe6ded53f0632afd4ffbdf8ba47
Git commit 193ecfd91745aab81c15ccf1a3889dc033ee7917 by Gilles Caulier. Committed on 11/12/2016 at 21:09. Pushed by cgilles into branch 'master'. digiKam port to QtAV/ffmpeg instead Qt5Multimedia : add video support into Slideshow. TODO: - handle video rotation flag with new Exiv2 0.26 to autorotate media in player. - port video thumbnailer to QtAV. - remove Qt5Multimedia dependency. For later: - port old videoslideshow tool to QtAv. Related: bug 159824, bug 372485, bug 271751, bug 329854 FIXED-IN: 5.4.0 M +8 -6 NEWS M +3 -3 app/views/mediaplayerview.cpp M +1 -1 app/views/mediaplayerview.h M +1 -0 utilities/slideshow/CMakeLists.txt M +68 -5 utilities/slideshow/slideshow.cpp M +3 -0 utilities/slideshow/slideshow.h A +227 -0 utilities/slideshow/slidevideo.cpp [License: GPL (v2+)] C +16 -51 utilities/slideshow/slidevideo.h [from: app/views/mediaplayerview.h - 050% similarity] https://commits.kde.org/digikam/193ecfd91745aab81c15ccf1a3889dc033ee7917
I need to have a fresh feedback here using last digiKam bundle build with QtAV to handle video files. See this GDrive repository to upload a 5.4.0 pre-version : https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM Thanks in advance Gilles Caulier
Git commit 7ce05cef9ce1260aa75cdfa909be57e7aaa49fc5 by Maik Qualmann. Committed on 23/12/2016 at 21:14. Pushed by mqualmann into branch 'master'. add manual rotating the video output with the right mouse button M +39 -6 app/views/mediaplayerview.cpp M +1 -0 app/views/mediaplayerview.h https://commits.kde.org/digikam/7ce05cef9ce1260aa75cdfa909be57e7aaa49fc5
(In reply to caulier.gilles from comment #7) > I need to have a fresh feedback here using last digiKam bundle build with > QtAV to handle video files. See this GDrive repository to upload a 5.4.0 > pre-version : > > https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM I just noticed this same problem with rotated videos in 5.4.0 on both Win7 and Win10. My video has an EXIF:Rotation=180. The video displays properly with VLC on Windows but it displays upside down with Windows Media Player.
I installed QtAV1.11.0-VS2013x86.exe on both Win7 and Win10 and see the same rotation problem when playing my video on the QtAV.Player.
Bill, > I just noticed this same problem with rotated videos in 5.4.0 on both Win7 and > Win10. My video has an EXIF:Rotation=180. Your video has Exif rotation flag set by your camera. Interesting... Please share this file through a cloud web service.. I would to check if Exiv2 0.26 is able to decode this information. If not, i will recommend to post an UPSTREAM Exiv2 bug for the next 0.27 release. It will be a good idea to report this to QtAV bugzilla. The player based on ffmpeg, that DK use, must be able to auto-rotate the media automatically. Gilles Caulier
(In reply to caulier.gilles from comment #11) > Your video has Exif rotation flag set by your camera. Interesting... Please > share this file through a cloud web service.. I would to check if Exiv2 0.26 > is able to decode this information. If not, i will recommend to post an > UPSTREAM Exiv2 bug for the next 0.27 release. The video is available here: https://www.dropbox.com/s/5w8guqu9kjwjlx3/VID_20161224_201626.mp4?dl=0
Confirmed on digiKam 5.4.0 on linux Mint 18.1 KDE
Bug confirmed for digikam 5.6.0 on windows 7 / 64 bit. The Rotation flag I set using Exiftool does not seem to be respected by digikam. Is this the same issue as https://bugs.kde.org/show_bug.cgi?id=375197 ? Dietrich
Confirmed on 5.8.0 pre-release bundle on openSUSE TW KDE. QtAV still ignores the rotation flag. Here an extract from ffmpeg output for a sample file: " Metadata: rotate : 90 creation_time : 2017-11-26T00:45:53.000000Z handler_name : VideoHandle Side data: displaymatrix: rotation of -90.00 degrees" I think usually videoplayers use that displaymatrix value to display a video correctly. Basically it tells you to rotate the image 90 degrees back (-90) I tried to find some info on how to call ffmpeg within c++ on found these: (not sure if they are helpful though) https://stackoverflow.com/questions/35751441/ffmpeg-c-apis-to-detect-if-a-video-is-rotated-shot-on-phone https://ffmpeg.org/doxygen/trunk/index.html https://www.codeproject.com/Tips/111468/FFmpeg-Tutorial https://trac.ffmpeg.org/wiki/Including%20FFmpeg%20headers%20in%20a%20C%2B%2B%20application
Looking at https://github.com/wang-bin/QtAV/blob/master/widgets/GraphicsItemRenderer.cpp (search page for "rotat") it seems that QtAV checks the rotation flag...
Looks like this module does the transformation: https://ffmpeg.org/doxygen/trunk/group__lavu__video__display.html
(In reply to Andrius from comment #16) > Looking at > https://github.com/wang-bin/QtAV/blob/master/widgets/GraphicsItemRenderer. > cpp (search page for "rotat") it seems that QtAV checks the rotation flag... This is the normal rotation feature that QtAV provides and that we also use to rotate the video with the right mouse button. Maik
(In reply to Maik Qualmann from comment #18) > (In reply to Andrius from comment #16) > > Looking at > > https://github.com/wang-bin/QtAV/blob/master/widgets/GraphicsItemRenderer. > > cpp (search page for "rotat") it seems that QtAV checks the rotation flag... > > This is the normal rotation feature that QtAV provides and that we also use > to rotate the video with the right mouse button. > > Maik I wish there was a way to save the set orientation for video and its thumbnail though...
Well the oritnation flag for item (image for exemple) exists in database, but only for the thumbnails. Gilles Caulier
(In reply to caulier.gilles from comment #20) > Well the oritnation flag for item (image for exemple) exists in database, > but only for the thumbnails. > > Gilles Caulier It feels like digiKam always regenerates thumbnails for video files so I don't think there is a point in rotating them
Git commit 194c046adf1ce05cb051740498f9d7e680cdbc28 by Maik Qualmann. Committed on 27/02/2018 at 20:13. Pushed by mqualmann into branch 'development/6.0.0'. play videos with the correct orientation, if available FIXED-IN: 6.0.0 M +25 -2 utilities/assistants/videoslideshow/player/mediaplayerview.cpp https://commits.kde.org/digikam/194c046adf1ce05cb051740498f9d7e680cdbc28
This is marked as FIXED but it is still broken for me. I tested with digiKam-6.1.0-git-20190308T103035-Win64.exe on Windows 7. Same video provided previously. That video plays correctly in VLC.
Video tested here. Thumbnail and play with correct orientation. Reload the metadata from this image. Maik
I'm sorry, Maik. You are correct. It plays correctly after refreshing the metadata. This is great. Thanks!