-
Notifications
You must be signed in to change notification settings - Fork 179
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
Missing metadata for MP4 #2175
Comments
Just came across this issue that looks similar: MediaArea/MediaInfo#453 Side note: on the other hand, there are some mp4 tags in other files that are shown by MediaInfo but not by FFprobe or Mp3tag. |
Made new sample files and updated the posts above after doing more tests. |
Here is another sample straight from a Samsung phone: samsung_sample.zip For this one,
This is not very important though. |
Location from iPhone video found at drewnoakes/metadata-extractor#515 (comment) is not shown by MediaInfo too. Seems both FFmpeg and iOS are using From
|
Regarding the encoder information, it is in MediaTrace but not shown by MediaInfo output.
|
This does get diff --git a/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp b/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp
index 77e7d921d..437b6d98b 100644
--- a/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp
+++ b/Source/MediaInfo/Multiple/File_Mpeg4_Elements.cpp
@@ -6279,6 +6279,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxVideo()
int16u Width, Height, Depth, ColorTableID;
int8u CompressorName_Size;
+ Ztring CompressorName;
bool IsGreyscale;
Skip_B2( "Version");
Skip_B2( "Revision level");
@@ -6296,12 +6297,12 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxVideo()
{
//This is pascal string
Skip_B1( "Compressor name size");
- Skip_UTF8(CompressorName_Size, "Compressor name");
+ Get_UTF8(CompressorName_Size, CompressorName, "Compressor name");
Skip_XX(32-1-CompressorName_Size, "Padding");
}
else
//this is hard-coded 32-byte string
- Skip_UTF8(32, "Compressor name");
+ Get_UTF8(32, CompressorName, "Compressor name");
Get_B2 (Depth, "Depth");
if (Depth>0x20 && Depth<0x40)
{
@@ -6339,6 +6340,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxVideo()
CodecID_Fill(Codec, Stream_Video, StreamPos_Last, InfoCodecID_Format_Mpeg4);
Fill(Stream_Video, StreamPos_Last, Video_Codec, Codec, true);
Fill(Stream_Video, StreamPos_Last, Video_Codec_CC, Codec, true);
+ Fill(Stream_Video, StreamPos_Last, Video_Encoded_Library, CompressorName);
if (Codec==__T("drms"))
Fill(Stream_Video, StreamPos_Last, Video_Encryption, "iTunes");
if (Codec==__T("encv")) |
It is in theory but IIRC there is a lot of garbage in this MP4 field in lot of files, need to check... Additionally there may be conflict with other places having the writing library. |
I did a quick test with x264 encoded mp4 with FFmpeg. MediaInfo shows For MKV, also MediaInfo only shows
FFmpeg:
|
Because they check only the container, not the video bitstream. In practice here Lavc is not the compressor, it is an intermediate layer forwarding the content to the compressor (x264). |
That's true but in the case of MKV made with FFmpeg using an encoder that does not write name to stream, MediaInfo does show The |
Regarding the Using test file from iPhone as linked above... MediaInfo:
MediaTrace:
|
great, please a PR. |
Made the PR. Now remains #2175 (comment) and the not so important #2175 (comment) for this issue. Also do you want a PR to handle |
I managed to parse all the missing metadata mentioned in this issue so I just made another PR containing everything I have done. The changes work fine on all files I tested so far but I am still open to changes :) |
Found more yet-to-be-mapped metadata from iPhone videos:
|
When video from Android phone is re-encoded with FFmpeg, MediaInfo does not show some metadata such as the location and video encoder for MP4 files. The metadata is present in the file and is shown by FFmpeg/FFprobe or ExifTool. For MKV files, MediaInfo does show such info.
Attached are two samples in a ZIP file.
sample.mp4
created withsample_mdta.mp4
created withFor both,
Lavc61.31.100 av1_qsv
is missing for video encoder. Forsample.mp4
, location information is missing.I think FFmpeg did not include
Lavc61.31.100 libopus
for audio encoder in the metadata although it is shown in output metadata during trascoding as both FFmpeg and ExifTool did not show this when the output file is read. Same with thecreation_time
of video and audio stream.sample.zip
The text was updated successfully, but these errors were encountered: