Metadata in m4a format files

Started by Maxver, May 22, 2020, 09:49:03 AM

Previous topic - Next topic

Maxver

Greetings!

I am using exiftool v11.99 on windows 7.
There are m4a files on the Internet where there is the line "Real-time streaming protocol", in metadata.
How can I delete this line via exiftool?

In these files also, if we look at the information through the mediainfo, we will find two additional sections: "Other #1 with  Type: Object description" and "Other #2 with Type: Scene description".
How delete sections: "Other #1" and "Other #2"  via exiftool?

StarGeek

First, find the names of the tags by running
exiftool -s /path/to/files/

After you find the names of the tags you want to delete, run this, replacing TAG* with the names of the tags
exiftool -TAG= -TAG1= -TAG2= /path/to/files/

But take note that this data may be custom tags which exiftool doesn't have a definition for, so it may not be able to delete them.  In that case, you'll probably have to turn to ffmpeg.  In that case, see this answer.  While that talks about converting from MKV to M4V, the process is the same.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Maxver

#2
Thank you for responding.
I tried exiftool -s / path / to / files / and did not see the tag information.
I did this: exiftool input.m4a
to see all the metadata file information. I am attaching an example metadata list:

File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.0.0
Compatible Brands               : mp42, isom
Movie Header Version            : 0
Create Date                     : 2019:03:15 11:08:30
Modify Date                     : 2019:03:15 11:13:50
Time Scale                      : 48000
Duration                        : 2:01:02
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 4
Track Header Version            : 0
Track Create Date               : 2019:03:15 11:08:30
Track Modify Date               : 2019:03:15 11:13:50
Track ID                        : 1
Track Duration                  : 2:01:02
Track Layer                     : 0
Track Volume                    : 100.00%
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Handler Vendor ID               : Apple
iTunSMPB                        : 0 640 1C0 151F0800 0 0 0 0 0 0 0 0
Encoder                         : fhgaac ;VBR=6
Realtime Streaming Protocol     : (SDP) a=isma-compliance:1,1.0,1..a=mpeg4-iod: "data:application/mpeg4-iod;ba
se64,AoCAghMAT///D///A4CAgSQAAkCAZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1vZC1hdTtiYXNlNjQsQVlDQWdEOEJnSUNBT2dLZkE0Q0FnR
E1BQVFBRWdJQ0FGa0FWQUFsbkFBclVZQUFIWjBrRmdJQ0FCQkd3N1VBR2dJQ0FFQUJFQUFBQUFBQUFBQUFBQUFBQUFBTT0EgICADQEFAABEAAA
AAAAAAAAGgICACQEAAAAAAAAAAAOAgIBeAANAMmRhdGE6YXBwbGljYXRpb24vbXBlZzQtYmlmcy1hdTtiYXNlNjQsd0JBU2dUQXFCVzNBBICAg
BUCDQAACQAAAAAAAAAABYCAgAMAAGAGgICACQEAAAAAAAAAAA=="..
Elementary Stream Track         : 3
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2019:03:15 11:13:50
Media Modify Date               : 2019:03:15 11:13:50
Media Time Scale                : 1000
Media Duration                  : 2:01:02
Handler Type                    : Scene Description
Other Format                    : mp4s
Media Data Size                 : 28
Media Data Offset               : 449154431
Avg Bitrate                     : 485 kbps

There is a line with the name: "Realtime Streaming Protocol :" What is the name of the tag for this line?
I tried the command: exiftool -all = input.m4a. The command works, but does not delete the line "Real-time streaming protocol:"


If we open the file through media information, we see information about the stream "Audio # 1" with "ID : 1", and below we see two additional sections of information: "Other # 1" and "Other # 2". Here is an example:

Other #1
ID                             : 2
Type                           : Object description
Format                         : System
Codec ID                       : mp4s-01
Duration                       : 2 h 1 min
Language                       : English
Encoded date                   : UTC 2019-03-15 11:13:50
Tagged date                    : UTC 2019-03-15 11:13:50

Other #2
ID                             : 3
Type                           : Scene description
Format                         : System Core
Codec ID                       : mp4s-02
Duration                       : 2 h 1 min
Language                       : English
Encoded date                   : UTC 2019-03-15 11:13:50
Tagged date                    : UTC 2019-03-15 11:13:50

What is the name of this tags: "Other # 1" and "Other # 2" ?

Phil Harvey

Quote from: Maxver on May 25, 2020, 07:53:21 AM
There is a line with the name: "Realtime Streaming Protocol :" What is the name of the tag for this line?

Use the -s option to see the tag name.

But RealtimeStreamingProtocol is not currently writable (see the QuickTime tags documentation).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Maxver

#4
Quote from: Phil Harvey on May 25, 2020, 09:31:29 AM

But RealtimeStreamingProtocol is not currently writable (see the QuickTime tags documentation).

Thanks for the link
That's right, there says it's not for the Writable.
I understand what the matter is. An example metadata file that I attached was created by another console encoder: "FhG AAC Encoder". This feature this encoder.

In the table "Realtime streaming protocol"  identifity with Tag ID: 'rtp'

Exiftool understands this tag: 'rtp' ?


Also i find in table ['sdsm' = Scene Description] and ['odsm' = Object Descriptor] from section "QuickTime Handler Tags" .
Tag Name : "HandlerType" identify "Index1: 8"

Exiftool currently understands "QuickTime Handler Tags"?

Phil Harvey

The link I posted lists all of the QuickTime tags that ExifTool understands.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Maxver

I tried like this:
exiftool -TAG= "'-rtp'="  /path/to/file/
and received "Warning: Tag 'TAG' is not defined"

I don't understand where the mistake was made.
Please tell, how to write the 'rtp' removal tag correctly

StarGeek

Quote from: Phil Harvey on May 25, 2020, 09:31:29 AM
But RealtimeStreamingProtocol is not currently writable (see the QuickTime tags documentation).

This means exiftool cannot edit/delete this tag.  You'll have to look into some other software to remove it.  Possibly ffmpeg.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Maxver

#8
Quote from: StarGeek on May 25, 2020, 01:23:14 PM
This means exiftool cannot edit/delete this tag.  You'll have to look into some other software to remove it.  Possibly ffmpeg.
I don't like how ffmpeg deletes metadata in m4a files. It automatically changes the flag to other parameters.
For example, parameter: bitrate! If the bitrate was "Variable", then after ffmpeg delete metadata, it will be displayed as "Constant".
This is wrong behavior.
The second reason - ffmpeg do it slower.

Please add the ability to remove these three tags in a next build of the exiftool.

StarGeek

Don't recompress, just remux.  It will take the same amount of time as if you copied it.
ffmpeg -i Input.mp4 -map 0 -map_metadata -1 -c copy Output.mp4
-c copy tells ffmpeg to copy streams, not recompress
-map 0 tells it to copy all streams, not just the first one.  Useful in case there is more than one audio/subtitle stream
-map_metadata -1 removes all metadata

From this SuperUser answer
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Maxver

#10
Thanks for the answer.
I tried this option like this:
ffmpeg -i input.m4a -map_metadata -1 -c copy Output.m4a
This command is working.
But there is one drawback: after this operation in mediainfo we see "Bitrate mode: Constant".
But it should be like this: "Bitrate mode: Variable", because in the source file it was: Variable.
I noticed that this happens all the time when using ffmpeg with the key "-map_metadata -1" to delete metadata in single m4a files.

If we use the exiftool to delete / edit tags in single m4a files, the line "Bitrate mode: Variable" always remains unchanged. As it should be.

I would like to be able to delete the metadata through the Exiftool. She is better at this task. 8)
Please add new three tags in the next build.