Coder Social home page Coder Social logo

Comments (9)

barasher avatar barasher commented on May 23, 2024

Hi @shadow431 !
The extraInitArgs is a 'private' attribute (starting with a lower-cased letter) of the Exiftool struct : this attribute can only be accessed (or modified) within the github.com/barasher/go-exiftool package.
I didn't want to expose this attribute because it is "risky" towards go-exiftool inner mechanism (ex : if an extra argument changes the exiftool output serialization, go-exiftool won't be able to interpret the results).
I rather prefer to add new functional options to go-exiftool that add arguments that are not "harmful" for the library.
I can make a few tests to check wether or not your use-case is legit for a new functional options.
Is that ok ?

from go-exiftool.

shadow431 avatar shadow431 commented on May 23, 2024

That makes sense. I had figured that but kept being told it should work but go kept saying nope lol. If you'd be willing to make some test that would be great, I would really appreciate it.

from go-exiftool.

barasher avatar barasher commented on May 23, 2024

Based on exiftool's documentation, I did some tests directly with exiftool, with and without the -ee3 parameter but I couldn't find an example where the extraction with -ee3 extracted more medatata than the version without the argument. I tried with a sample AVCHD file, with a PDF embedding JPGs, ...
Could you please provide me example that actually works ?
What I'm worried about is the exiftool built-in JSON serialization.
Thank's a lot !

from go-exiftool.

barasher avatar barasher commented on May 23, 2024

I found differences when using -ee parameter (without any number) on a PDF file that embeds a JPG picture :

barasher:/tmp$ exiftool p.pdf | sort | uniq | wc -l
18
batasher:/tmp$ exiftool -ee p.pdf | sort | uniq | wc -l
38

Concerning my fear about JSON serialization :

barasher:/tmp$ exiftool -ee p.pdf | grep 'File.*Type.*Extension'
File Type Extension             : pdf
File Type Extension             : jpg
barasher:/tmp$ exiftool -ee -j p.pdf | grep 'File.*Type.*Extension'
  "FileTypeExtension": "pdf",

Unfortunately, exiftool deduplicates when converting to metadata to json.

Could you please tell me more about your use-case ? I'm still interested in :

  • a sample file
  • the exact exiftool command that suits your use-case

from go-exiftool.

shadow431 avatar shadow431 commented on May 23, 2024

Sorry for the delayed response, it was a very busy weekend.

So at the link bellow is an example its got a small video file from a go pro that is less the a second but you can see the data. There's also two outputs from exiftool one just exiftool <file> the other exiftool -ee <file> mainly in this case I'm looking for "Other Serial Number" which I only get from adding -ee. I have some other examples, but couldn't readily find them. I haven't taken the time yet to look and see what args go-exiftool pass by default and try that with the -ee. I'll do that later today if I get a chance after work.

Mostly these are for files from camera's I no longer have but I still would like to be able to work with them.

https://www.dropbox.com/sh/r9g3z5fi7c7l5zm/AACDXYN8Bq3Yi2arrlxmwqQta?dl=0

from go-exiftool.

barasher avatar barasher commented on May 23, 2024

Just to tell you that I haven't forgotten this issue, I was a little bit busy these last days.

from go-exiftool.

shadow431 avatar shadow431 commented on May 23, 2024

That's fine. I appreciate it. I am able to move forward with the rest of the development for most of my files so I am not blocked on it. Currently I am replacing a python script that got lost and I can no longer find any copies off. In that I ended up using two different libraries with multiple if statements to check file type, and based on type look for different fields and if a field wasn't there try a different library, etc, etc. Later this week I am hoping to run this as is against my whole library again and see what comes back nil and maybe get some better examples.

from go-exiftool.

barasher avatar barasher commented on May 23, 2024

PR #28

from go-exiftool.

barasher avatar barasher commented on May 23, 2024

A ExtractEmbedded functionnal option has been integrated and released in v1.5.0.

from go-exiftool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.