Open AndriusWild opened 7 years ago
Editing metadata is not in my plan if there is no tool can be used
Can this SDK be considered as a tool? https://www.bento4.com/
Here is one more: https://sourceforge.net/projects/mediainfo/?source=navbar
This is one is more for metadata reading not writing.
What metadata do you want to read? ffmpeg already supports reading metadata. You can use ffprobe to see the video information
What metadata do you want to read? ffmpeg already supports reading metadata. You can use ffprobe to see the video information You are actually correct. Ffmpeg is already able to read a lot of metadata.
Is there a way to pull these via API call directly from QtAV?
ffmpeg can write metadata too. Example: It can write too. I just wrote GPS location into mp4 file using this command ffmpeg -i inputfile -metadata location="+50.8893-114.0159/" outputfile
Is that possible to do that via QtAV without adding ffmpeg as dependency to an application (digiKam) ?
I vote for this feature too, for digiKam video metadata support. We don't need something complicated, but at least to be able to get main metadata from video file as QString (comments, date-time, camera model, etc).
In digiKam, the plan since a very long time is to see this feature implemented through Exiv2 shared library. Even if video file support is implemented in this lib, the code is full of bugs and crash quickly because nobody want to fix the code...
So we need a simple alternative, at least to populate the collection database from digiKam, in goal to search video items registered.
Gilles Caulier
Also is there any possibility to get chapters (for example menu from MKV files)? I saw some initial support in the code but the current functions only return "undefined".
090ebb2 this commit add chapters
property and seekChapter()
for AVPlayer
Great, could you also in addition to the chapters() function provide chapterNames() and chapterTimes()? Or is it already possible to somehow obtain these values?
Thanks a lot.
Writing metadata to video files would be high on my wish list in order to support that in Digikam. http://digikam.1695700.n4.nabble.com/REad-write-metadata-video-files-avi-mov-mp4-mkv-td4692739.html
My collection has both images and videos, and I would like to use both the same way.
I personalty implemented the video metadata support with ffmpeg in next digiKam 6.0.0.
It's in Read only and i re-route the video tags reported by ffmpeg to Exiv2 container that we use everywhere in digiKam. It's not perfect as Exiftool can do, but at least this permit to extract the most important tags from video files to register data in digiKam database. The write process is not suitable with ffmpeg. So to write metadata, you need to use XMP sidecar.
For more info, look this code :
https://cgit.kde.org/digikam.git/tree/core/libs/dmetadata/dmetadata_ffmpeg.cpp
Note : using Exiv2 to read/write wideo metadata crash digiKam in few seconds to use. Exiv2 code to handle video file is bugous, and nobody want to patch, hack, stabilize the code (at least to read data). So my solution is the best way as digiKam already depends of ffmpeg and is stable.
Gilles Caulier
for reading metadata you can add these lines of code to QtAV source code from ffmpeg examples and rebuild it
AVDictionaryEntry *tag = NULL;
while ((tag = av_dict_get(d->format_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)))
qDebug("metadata: %s=%s\n", tag->key, tag->value);
i put them in AVDemuxer.cpp and it works:
Debug: "metadata: title=El Cid 1961 720p TInyMoviez\n"
Debug: "metadata: encoder=libebml v1.3.0 + libmatroska v1.4.0\n"
Debug: "metadata: creation_time=2013-07-26T13:50:54.000000Z\n"
Hello, Is there a chance to have that option released in future?
I am particularly interested in reading/writing the following metadata: