Skip to content
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

Feature request: Improved Metadata Support #345

Open
Malko29 opened this issue Sep 28, 2016 · 79 comments
Open

Feature request: Improved Metadata Support #345

Malko29 opened this issue Sep 28, 2016 · 79 comments

Comments

@Malko29
Copy link

Malko29 commented Sep 28, 2016

Hi, can we get a enhancement in handbrake for preserving the metadata after converting videos.
Most of the time I have to use ffmpeg with map_metadata to preserve metadata. And it is not user-friendly.

Is there any possibility in handbrake?

@sr55
Copy link
Contributor

sr55 commented Oct 2, 2016

While there isn't any interest in adding a really good meta data UI, passthru may be an option. We can disucss and decide later. Right now we are concentrating on getting 1.0 out the door.

@jstebbins
Copy link
Contributor

What additional metadata are you interested in?

HB already preserves title, artist director, composer, release date, summary, genre, description, and synopsis from any file demuxed by libav (so everything other than BD and DVD sources).

I've done some brief testing with mkv sources to verify no bugs have crept in. But if you see a problem with other source types, please let us know.

@sr55
Copy link
Contributor

sr55 commented Oct 6, 2016

Not actually tested it. Does it require the metadata json block to be popualted? I don't do that at the moment.

@jstebbins
Copy link
Contributor

Sorry, I forgot to get back to you about this question. hb_job_init, hb_job_init_json and hb_preset_job_init copy the title's metadata into the job they create. So if you are initializing your job with any of these, the metadata should already be there.

@bradleysepos
Copy link
Contributor

bradleysepos commented Dec 29, 2016

HB already preserves title, artist director, composer, release date, summary, genre, description, and synopsis from any file demuxed by libav (so everything other than BD and DVD sources).

I know the Linux GTK GUI has more metadata stuffs. Wondering if it's useful to add an option to preserve or remove additional metadata fields other than the above. For example:

|x| Title
|x| Artist
|x| Description
|x|

Other metadata:
  (o) Passthru
  ( ) Remove

Could also be a checkbox but the explicit nature of the radio control seems more suited for clarity.

@bradleysepos bradleysepos added this to the Unscheduled milestone Dec 29, 2016
@sr55
Copy link
Contributor

sr55 commented Dec 29, 2016

Your close enough to just adding a MetaData tab to the GUI at that point.

I'm still on the shelf about that. I have been wanting to write a Subler clone for windows for some time though. Just not found the time.

I had thought about tight integration with the likes of Subler. I.e HandBrake could launch super pre-encode, store the info and let Subler tag it afterwords. So you get the Power of Subler, without writing much code.

Otherwise you'll end up with requests for connecting to various meta data websites, adding fields and all the other nice stuff Subler has anyway.

@bradleysepos
Copy link
Contributor

Your close enough to just adding a MetaData tab to the GUI at that point.

GTK has a tab for this. Fields are minimal, useful for clarifying what's happening and changing some very basic properties.

I absolutely agree we shouldn't get into tagging beyond this. My suggestion is to improve upon the GTK implementation with a catch-all for the rest of the metadata we don't plan to mess around with.

@bradleysepos
Copy link
Contributor

I had thought about tight integration with the likes of Subler. I.e HandBrake could launch super pre-encode, store the info and let Subler tag it afterwords. So you get the Power of Subler, without writing much code.

Agreed, it would be cool if Subler had an API we could access programmatically.

@bradleysepos
Copy link
Contributor

Screenshot of the GTK Tags tab:

handbrake-gtk-tags

@cortig
Copy link

cortig commented Jan 23, 2017

I noticed that some of the field are properly preserved, but the cover art for instance is lost. Content and Advisory Ratings are lost too from what I remember.

@mmattel
Copy link

mmattel commented Jun 11, 2017

When you create videos with a camera, a timestamp and GPS info is (most times) added.
It would be great if this can be preserved.

@gregalex72
Copy link

gregalex72 commented Jul 28, 2017

Is this likely to happen?

I'd love to convert my 1080i50 h264 content to 1080p50 while keeping timecodes (iMovie and Photos just blends it to 1080p25).

Actually... 1080i50 h264 converted to 1080p50 HEVC with timecodes will be a great conversion for the new Mac "High Sierra" in a couple of months.

@martijnspaan
Copy link

martijnspaan commented Aug 15, 2017

Would be an awesome feature to preserve the meta data. When I convert my files on Windows 10, the new file has 'date created' and 'date modified' set to the day of the conversion. Would be great if it could have the creation date of the original file.

E.g. this stackoverflow post has a solution by using ffmpeg, so should be fairly easy to implement in Handbrake, which is already using it.

@tmchow
Copy link

tmchow commented Oct 26, 2017

+1 for preserving some metadata. The key one, like @martijnspaan mentioned is the "date created" and "date modified". In particular, when I'm converting older family videos to conserve file space, I don't want to muck with the date modified so it imports into digital libraries correctly like Google Photos.

@StephKoenig
Copy link

+1 for preserving meta as well...

I think use cases described above are leading the developers into considering (then obviously discounting) a full meta data editing tab. This is obviously a chunk of work. There's plenty of 3rd party tools to do this already for things like commercial movies etc.. MetaX for example happily adds film meta mkv/mp4 alike.

Also HB isn't just for (commercial) movies, I use it extensively to shrink family movies made on inefficient cameras - where the difference between 264 quick saved on a battery/processor limited camera to 265 can be huge. In this use case it's incredibly important to preserve the metadata already created - geo, time date, aperture, white balance blah blah blah because there's no way to add them back (easily) afterwards without laboriously saving them and then re-adding them.. cloud image/video libraries such as google photos/flickr etc largely do their magic because they can use this meta data very effectively for albums, image processing and improvement etc.

So simply preserving meta data (either added before hand for movies via something like metaX or embedded by cameras first hand) would be ideal and not as much work as a full meta data editing tab with all the error checking etc that would involve.

@bradleysepos
Copy link
Contributor

bradleysepos commented Feb 3, 2018

I don't think we have any objection to preserving (passing through) existing metadata, just haven't implemented it extensively yet. IIRC there was a patch on our old ReviewBoard to preserve more than we do now, but it's likely far out of date by now.

@flin-8
Copy link

flin-8 commented Feb 17, 2018

Where's the code that requires the changes to preserve say the created date? Is it inside libhb or the c# solution?

@misterbridge
Copy link

So it that going to happen anytime soon ? Such a needed feature, that would really be amazing !
Great job on the tool, it is awesome.

@sr55
Copy link
Contributor

sr55 commented Mar 31, 2018

It's not high up on anyone's todo list, sorry.

@diegoteliz
Copy link

What about approaching this in 2 phases?

Phase 1

Preserving "date created" and "date modified" (for all those who are converting older family videos to save space).
Since HB already preserves some other metadata, it doesn't seem to be too complicated to implement (?)

Perhaps a checkbox under Preferences\Output files:

  • Keep original file Creation and Modification dates

Phase 2

Adding a MetaData tab to the GUI for additional values (or a similar solution)

@sr55
Copy link
Contributor

sr55 commented Jun 13, 2018

This issue is about retention of container metadata, not filesystem metadata.

All I can suggest is you create a small powershell script that gets executed using the "When Done" feature in preferences. Stackoverflow has examples of how to set filesystem metadata this way but it's not something i'd recommend doing in the first place.

@jeroen020
Copy link

Having this feature would totally rock my world. I have hundreds of GBs of videos collected over a decade that I'd love to convert to H265 in batch but as they don't have any tags I rely fully on their creation date for meta data.
One thing that may make this easier is that this feature was previously present in HandBrakeBatch, but the developer stopped updating it unfortunately... But code is on Github so you can see how to implement keeping the date stamps the same.

@fmvdb
Copy link

fmvdb commented Jul 15, 2018

Would be great to have HandBrake keep the original EXIF information. Any progress on this?

@sr55
Copy link
Contributor

sr55 commented Jul 15, 2018

Nothing has changed.

@fmvdb
Copy link

fmvdb commented Jul 23, 2018

Can we do anything to increase the priority for this request?

@sr55
Copy link
Contributor

sr55 commented Jul 23, 2018

Nope, Afraid not.

@bradleysepos
Copy link
Contributor

While I still have a sliver of hope that the recent comments will convince the developers to add this feature

The issue is open, not rejected. Nobody has made time or shown interest, yet. We're a very small team and none of us work on HandBrake full time.

Thanks for understanding. Some of these things may happen, it's just hard to say when.

@sr55
Copy link
Contributor

sr55 commented May 14, 2020

Just a reminder that those of you using Windows Nightly builds can utilise the Send File To Option. Either to ffmpeg or a script. You can do the same on mac but it's a little more tricky to script it on that platform as you only get the destination.

image

and use the examples above to map metadata.

@GLLM
Copy link

GLLM commented May 15, 2020

I'm on linux, so I cannot use this GUI feature, but if people are looking to do something with exiftool, here is what you can use : exiftool -overwrite_original -tagsfromfile {source} {destination}

@johnsonea
Copy link

For sources shot on a camera (e.g., Canon), it would be nice to block copy the camera metadata as well as the EXIF data.

@devildant
Copy link

Hello,

still no change? (preservation of audio track names, sub ...)

@galad87
Copy link
Contributor

galad87 commented Sep 1, 2020

Audio and subs track names are preserved.

@devildant
Copy link

Audio and subs track names are preserved.

my bad, I was not up to date :)

@dhoenig
Copy link

dhoenig commented Sep 9, 2020

I'm on linux, so I cannot use this GUI feature, but if people are looking to do something with exiftool, here is what you can use : exiftool -overwrite_original -tagsfromfile {source} {destination}

I second the request to have the meta data preserved.

I've spent the last days to find out how to accomplish this with exiftool, and I can say that the above command will actually not do the job as exiftool will re-interpret e.g. the location data which then is no more readable by Apple Photos (in my use case at least).
What you do need is the -all:all option that keeps the original structure intact.
However, that command again may cause videos to rotate erroneously, so you need to add some more. This is the command that works for me (moving tags from .mov to .mp4 in this example):
exiftool -all= -tagsfromfile ./src/%f.mov -ext mp4 -all:all --matrixstructure --rotation ./dest

For those interested in details, see this thread in the exiftool forum:
https://exiftool.org/forum/index.php?topic=11610.0

@phatcat73
Copy link

phatcat73 commented Apr 14, 2021

Sure would be nice when I export a video to preserve metadata from Photos (Mac) in order to reduce the file size in Handbrake and reimport a smaller file.

  • Date Created
  • Camera device
  • Camera specs and settings
  • Favorite (heart shape)
  • Faces
  • Location

Screen Shot 2021-04-14 at 5 55 00 AM

@JC3
Copy link

JC3 commented Jun 20, 2021

Can we please have this? It kind of stinks having to batch process everything again afterwards just to copy creation times and such...

It just needs to preserve metadata, I think. There's other software that can be used to edit it, but by not preserving it at all Handbrake is dropping potentially important info from files. Just an all or nothing passthrough.

@jontelang
Copy link

jontelang commented Oct 13, 2022

I'm on linux, so I cannot use this GUI feature, but if people are looking to do something with exiftool, here is what you can use : exiftool -overwrite_original -tagsfromfile {source} {destination}

I second the request to have the meta data preserved.

I've spent the last days to find out how to accomplish this with exiftool, and I can say that the above command will actually not do the job as exiftool will re-interpret e.g. the location data which then is no more readable by Apple Photos (in my use case at least). What you do need is the -all:all option that keeps the original structure intact. However, that command again may cause videos to rotate erroneously, so you need to add some more. This is the command that works for me (moving tags from .mov to .mp4 in this example): exiftool -all= -tagsfromfile ./src/%f.mov -ext mp4 -all:all --matrixstructure --rotation ./dest

For those interested in details, see this thread in the exiftool forum: https://exiftool.org/forum/index.php?topic=11610.0

For me this copies the GPS and much more correctly, but not the creation/modification dates. So I added -FileCreateDate

exiftool -all= -tagsfromfile ./IN/IMG_0310.MOV -ext mp4 -all:all -FileCreateDate --matrixstructure --rotation ./OUT2/IMG_0310.mp4

EDIT:
I am using this script to go through a folder, compress MOV to mp4, and transfer the metadata back to the new files. It also generates a basic result page where is checks the old-vs-new metadata and highlights any differences.
https://gist.github.com/jontelang/767d8b3b9074a8dda55767ffb1b96947

Some videos seems to have the medatadata, but it doesnt show up in finder.

@Tinyu-Zhao
Copy link

So why, after so many years, can't the development team provide users with an option to preserve EXIF data?

@Handkep
Copy link

Handkep commented Apr 25, 2024

so much potential is lost just because this feature is not implemented yet :(

@jstebbins
Copy link
Contributor

Why after so many years hasn't someone who uses and wants EXIF data contributed a patch to add it?

@dradutu
Copy link

dradutu commented Apr 25, 2024

this is the reason why i switched to shutter encoder

@beatschubser
Copy link

this is the reason why i switched to shutter encoder

Nice, I'll definitely give this a try. If the folks at HandBrake don't care about basic features it's time to move on I guess.

@bjspi
Copy link

bjspi commented Apr 26, 2024

this is the reason why i switched to shutter encoder

I also switched to ShutterEncoder and also advised a few friends to do so.
I still think Handbrakes UI is better, but the features integrated in ShutterEncoder are really good, especially the "Keep Hierarchy", and obviously the preservation of Metadata.

I mean it's IMHO one of the MOST basic features, as a lot of people (which I personally know) want to compress their bloated Smartphone videos to a suitable filesize using x265. Loosing GPS-Tags, Datetime Tags etc is an absolute NoGo - these files are completely messed up and when uploading to Google Photos or similarly, the whole purpose of creating an album is gone (because those videos being mixed up completely).

@Handkep
Copy link

Handkep commented Apr 26, 2024

this is the reason why i switched to shutter encoder

so i tried shutter encoder a bit now. I think HandBrakes UI is more convenient but the metadata copy just works great

@bjspi
Copy link

bjspi commented Jul 28, 2024

Yeah, I mean, without proper metadata support/passthrough, this tool, very unfortunate, is pretty much useless.
Especially nowadays where you want to compress your files and backup/host it on some Cloud service to be able to conveniently show and search your media. If all metadata is gone, a lot of functionality wont work.

@RamseyKal
Copy link

RamseyKal commented Sep 29, 2024

I would like metadata to be retained and for the creation and modified dates to be retained as well. I don't have the time and dislike having to use a bulk file changer / date editor to edit the dates back to original dates of many videos after compressing. I'll check out Shutter Encoder.

Edit: Just did and yes the UI is pretty bad compared to HandBrake. The dates were not kept even with Preserve metadata, so I won't be using this.
But, I really like that the editing process (Image Adjustment) shows the results live, and has lots of options. There are no pre-defined presets though so I can quickly compress but at least we can make our own. But, it's not easy to compress as everything has to be chosen manually using more technical terms rather than just "compression level".

@payamazadi
Copy link

payamazadi commented Nov 16, 2024

@sr55 it's absolutely bonkers that for all these years you still don't find this an important feature? i realize it's a small team etc but what makes you think this is a useful user experience? anybody who has dated files and want to run conversion will now have their timestamps hardcoded to now? now they can't track any files historically? you haven't given any explanation for why the existing interface is correct or why a new interface would be cumbersome. many people have suggested a simple checkbox that will passthrough the exif data. none of the users have asked for fine grained control to set different fields to different things. the code to implement this would be:
for field in exifdata { newfile.exifdata.field = oldfile.exifdata.field.value }

this is a 5 line code change plus 3 to add it to the interface
suggesting to people to have this piped into another program is also bonkers. youve probably spent more time responding to these comments shutting people down than it wouldve taken you to code it

@HandBrake HandBrake locked as too heated and limited conversation to collaborators Nov 16, 2024
@galad87
Copy link
Contributor

galad87 commented Nov 16, 2024

Oh please, not again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests