gianni-rosato / aviator

A lightweight, Flatpak-first, easy-to-use GUI utility for encoding with SVT-AV1 & Opus.
GNU General Public License v3.0
156 stars 14 forks source link

Feature Request: Option To Preserve All Metadata #67

Closed Saijin-Naib closed 2 months ago

Saijin-Naib commented 2 months ago

When archiving videos from one format to AV1+OPUS, it would be excellent if all the metadata from the original could be kept.

This would include things like create/modify date, camera, software, geolocation, et al.

gianni-rosato commented 2 months ago

Hi, thanks for the feature request! I'm going to close #68 as a duplicate, as this issue addresses it.

Could you provide an example video where metadata isn't being properly preserved, and what fields you'd like to maintain? I'd like to know if it is discarding only some metadata, or everything you've specified above.

Also, I'm firmly against preserving the create & modify date of the original file in an encode. I know it is convenient, but the reality is that the encode's create & modify date are factually different from the source's; even if this is possible, I will not do it.

Saijin-Naib commented 2 months ago

Do you need the videos themselves, or will exiftool dumps suffice?

I understand your position, but it will break most sorting in things like ShotWell, gThumb, et al, unless folks first rename the files using the timestamp and then sort on that.

gianni-rosato commented 2 months ago

I'd like a sample video if possible. Thanks.

Saijin-Naib commented 2 months ago

How do you prefer receiving the files? Link to a file hosting site, personal cloud...?

gianni-rosato commented 2 months ago

Up to you. If one is small enough, you may attach it here.

Saijin-Naib commented 2 months ago

Please find the metadata dumps from exiftool and the zipped transcoded files and their metadata dumps below.


exiftool 2016-10-08\ 11-40-16\ \[D750].mp4 
ExifTool Version Number         : 12.80
File Name                       : 2016-10-08 11-40-16 [D750].mp4
Directory                       : .
File Size                       : 4.2 MB
File Modification Date/Time     : 2016:10:08 11:40:16-04:00
File Access Date/Time           : 2024:07:05 00:09:22-04:00
File Inode Change Date/Time     : 2016:10:08 11:40:16-04:00
File Permissions                : -rwxr-xr-x
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/quicktime
Major Brand                     : Apple QuickTime (.MOV/QT)
Minor Version                   : 2007.9.0
Compatible Brands               : qt  , niko
Media Data Size                 : 4026616
Media Data Offset               : 32
Movie Header Version            : 0
Modify Date                     : 2016:10:08 11:40:16
Time Scale                      : 60000
Duration                        : 1.00 s
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                   : 3
Track Header Version            : 0
Track Create Date               : 2016:10:08 11:40:16
Track Modify Date               : 2016:10:08 11:40:16
Track ID                        : 1
Track Duration                  : 1.00 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 1920
Image Height                    : 1080
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 1920
Source Image Height             : 1080
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Color Profiles                  : nclc
Color Primaries                 : BT.709
Transfer Characteristics        : Unspecified
Matrix Coefficients             : BT.601
Video Frame Rate                : 59.94
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2016:10:08 11:40:16
Media Modify Date               : 2016:10:08 11:40:16
Media Time Scale                : 48000
Media Duration                  : 1.00 s
Handler Class                   : Media Handler
Handler Type                    : Audio Track
Balance                         : 0
Audio Format                    : sowt
Make                            : NIKON CORPORATION
Model                           : NIKON D750
Software                        : NIKON D750 Ver.1.02
Create Date                     : 2016:10:08 11:40:16
Date/Time Original              : 2016:10:08 11:40:16
Frame Count                     : 60
Frame Rate                      : 59.94
Frame Width                     : 1920
Frame Height                    : 1080
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Exposure Time                   : 1/125
F Number                        : 1.4
Exposure Program                : Manual
Exposure Compensation           : 0
Metering Mode                   : Multi-segment
Focal Length                    : 85.0 mm
Maker Note Version              : 2.11
White Balance                   : COOL WHT FL
Focus Mode                      : MANUAL
Crop Hi Speed                   : 16:9 Crop (6032x4032 cropped to 6032x3392 at pixel 0,320)
Color Space                     : sRGB
VR Info Version                 : 0100
Vibration Reduction             : Off
VR Mode                         : Normal
Picture Control Version         : 0200
Picture Control Name            : Standard
Picture Control Base            : Standard
Picture Control Adjust          : Default Settings
Picture Control Quick Adjust    : Normal
Sharpness                       : 3.00
Clarity                         : n/a
Contrast                        : None
Brightness                      : Normal
Saturation                      : None
Hue                             : None
Filter Effect                   : n/a
Toning Effect                   : n/a
Toning Saturation               : n/a
Picture Control Data            : (Binary data 68 bytes, use -b option to extract)
Time Zone                       : -05:00
Daylight Savings                : No
Date Display Format             : D/M/Y
ISO                             : 252
ISO Expansion                   : Off
ISO2                            : 252
ISO Expansion 2                 : Off
White Balance Fine Tune         : 0 0
Lens Type                       : D
Lens                            : 85mm f/1.4
Flash Mode                      : Did Not Fire
Flash Info Version              : 0107
Flash Source                    : None
External Flash Firmware         : n/a
External Flash Zoom Override    : No
External Flash Status           : Flash Not Attached
External Flash Ready State      : n/a
Flash Compensation              : 0
Flash GN Distance               : 0
Flash Group A Control Mode      : Off
Flash Group B Control Mode      : Off
Flash Group C Control Mode      : Off
Flash Group A Compensation      : 0
Flash Group B Compensation      : 0
Flash Group C Compensation      : 0
High ISO Noise Reduction        : Normal
AF Info 2 Version               : 0100
Contrast Detect AF              : Off
AF Area Mode                    : Single Area
Phase Detect AF                 : Off
Primary AF Point                : (none)
AF Points Used                  : (none)
Contrast Detect AF In Focus     : No
Thumbnail Image                 : (Binary data 9612 bytes, use -b option to extract)
Preview Image                   : (Binary data 118019 bytes, use -b option to extract)
Aperture                        : 1.4
Image Size                      : 1920x1080
Megapixels                      : 2.1
Shutter Speed                   : 1/125
Auto Focus                      : Off
Lens Spec                       : 85mm f/1.4 D
Avg Bitrate                     : 32.2 Mbps
Rotation                        : 0
Focal Length                    : 85.0 mm
Light Value                     : 6.6

2016-10-08 11-40-16 [D750].mp4.zip


exiftool 2016-10-08\ 11-40-16\ \[D750].webm 
ExifTool Version Number         : 12.80
File Name                       : 2016-10-08 11-40-16 [D750].webm
Directory                       : .
File Size                       : 226 kB
File Modification Date/Time     : 2024:07:05 01:07:03-04:00
File Access Date/Time           : 2024:07:05 01:07:03-04:00
File Inode Change Date/Time     : 2024:07:05 01:07:03-04:00
File Permissions                : -rwxr-xr-x
File Type                       : WEBM
File Type Extension             : webm
MIME Type                       : video/webm
EBML Version                    : 1
EBML Read Version               : 1
Doc Type                        : webm
Doc Type Version                : 4
Doc Type Read Version           : 2
Timecode Scale                  : 1 ms
Muxing App                      : Lavf61.1.100
Writing App                     : Lavf61.1.100
Video Frame Rate                : 59.94
Image Width                     : 1920
Image Height                    : 1080
Video Scan Type                 : Unknown (2)
Track Number                    : 2
Track UID                       : 6ead4c08f0ea05f3
Track Language                  : eng
Codec ID                        : A_OPUS
Track Type                      : Audio
Audio Channels                  : 2
Audio Sample Rate               : 48000
Audio Bits Per Sample           : 16
Major Brand                     : qt
Minor Version                   : 537331968
Compatible Brands               : qt  niko
Comment                         : "Encoded with Aviator"
Tag Track UID                   : 6ead4c08f0ea05f3
Vendor Id                       : [0][0][0][0]
Encoder                         : Lavc61.3.100 libopus
Duration                        : 00:00:01.009000000
Image Size                      : 1920x1080
Megapixels                      : 2.1

2016-10-08 11-40-16 [D750].webm.zip


exiftool 2016-10-08\ 11-40-16\ \[D750].mkv 
ExifTool Version Number         : 12.80
File Name                       : 2016-10-08 11-40-16 [D750].mkv
Directory                       : .
File Size                       : 226 kB
File Modification Date/Time     : 2024:07:05 01:08:24-04:00
File Access Date/Time           : 2024:07:05 01:08:24-04:00
File Inode Change Date/Time     : 2024:07:05 01:08:24-04:00
File Permissions                : -rwxr-xr-x
File Type                       : MKV
File Type Extension             : mkv
MIME Type                       : video/x-matroska
EBML Version                    : 1
EBML Read Version               : 1
Doc Type                        : matroska
Doc Type Version                : 4
Doc Type Read Version           : 2
Timecode Scale                  : 1 ms
Muxing App                      : Lavf61.1.100
Writing App                     : Lavf61.1.100
Video Frame Rate                : 59.94
Image Width                     : 1920
Image Height                    : 1080
Video Scan Type                 : Unknown (2)
Display Unit                    : Unknown
Track Number                    : 2
Track UID                       : b7e77463e4c337a0
Track Language                  : eng
Codec ID                        : A_OPUS
Track Type                      : Audio
Audio Channels                  : 2
Audio Sample Rate               : 48000
Audio Bits Per Sample           : 16
Major Brand                     : qt
Minor Version                   : 537331968
Compatible Brands               : qt  niko
Comment                         : "Encoded with Aviator"
Tag Track UID                   : b7e77463e4c337a0
Vendor Id                       : [0][0][0][0]
Encoder                         : Lavc61.3.100 libopus
Duration                        : 00:00:01.009000000
Image Size                      : 1920x1080
Megapixels                      : 2.1

2016-10-08 11-40-16 [D750].mkv.zip

gianni-rosato commented 2 months ago

Thanks for the info, I'll look into this ASAP.

Saijin-Naib commented 2 months ago

Thanks so much!

Will you need more examples from different cameras as well?

gianni-rosato commented 2 months ago

I was just able to test your source video. It seems nearly every field here is an MP4/MOV-specific piece of metadata, and Aviator doesn't support either container. A lot of camera makers like to inject custom meta keys in the MP4/MOV container, and unfortunately there isn't an easy way to copy these to the Matroska or WebM containers Aviator supports. Sorry for the inconvenience, but until Aviator supports MP4 (which is still up in the air), you're going to have to look elsewhere to support your usecase with AV1.

Saijin-Naib commented 2 months ago

Ah, that sucks, but makes sense.

I'll see what options I have.

Thanks for taking a look!