SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.04k stars 1.23k forks source link

flac and exiftool? #4863

Closed m95341175 closed 3 years ago

m95341175 commented 3 years ago

Hello,

Has anyone considered building flac or exiftool? I would find those very handy if they were available. Thanks!

Mike

BenjV commented 3 years ago

Flac (Free Lossless Audio Codec) is a codec not a tool.

m95341175 commented 3 years ago

Hi,

I'm gonna disagree with you on that point. If you look here (below), you'll see that there are two command line tools, flac and metaflac. Those are the ones I'm asking about. BTW, I would not have asked if I didn't know what I was talking about. https://xiph.org/flac/download.html

Thanks, Mike

publicarray commented 3 years ago

For package request we have a template that we ask everyone fill out, this avoids such a confusion. Regarding Flac, There is already a ffmpeg package that should be able to do anything flac can do.

  • Name:
  • Description:
  • Website:
  • Software documentation:
  • Build/Installation documentation:
  • Source code:
  • License:
m95341175 commented 3 years ago

Thanks. I'm not sure about the ffmpeg/flac equivalence. I suspect that for my purposes, ffmpeg is not the right tool. In any case, to comply:

Name: flac Description: the codec and the two command line applications flac and metaflac Website: https://xiph.org/flac/ Software documentation: https://xiph.org/flac/documentation.html Build/installation documentation: [in source tarball] Source code: https://ftp.osuosl.org/pub/xiph/releases/flac/ License: https://xiph.org/flac/license.html

Name: ExifTool Description: metadata tool Website: https://exiftool.org/ Software documentation: https://exiftool.org/#running Build/installation documentation: https://exiftool.org/install.html Source code: https://exiftool.org/Image-ExifTool-12.30.tar.gz License: https://exiftool.org/ ("License", 3rd from bottom of page)

I'd still like to get both of these in package form if possible. I'm hesitant to build them directly on my Synology since I have a feeling that they'll be gone after the next update.

Thanks, Mike

BenjV commented 3 years ago

Flac is a codec and not an application, you want flac tools instead. But all functionality of both flac tools and ExifTool are covered by ffmpeg, so no reason add those application.

m95341175 commented 3 years ago

Okay. Well, you're just plain wrong on the second thing. Neither is covered fully by ffmpeg. If you don't want to do it yourself or would seek to prevent others from creating packages for [the] flac [tools] and exiftool then fine. But don't try to tell me that you know what you're talking about WRT what these do. There's one in every crowd, I suppose.

th0ma7 commented 3 years ago

Hi @m95341175 , please adjust your tone as replies as such are not acceptable. Please be mindful that we are a group of volunteer developers doing our best to package free software onto Synology NAS.

As for flac, it is package and part of current ffmpeg: /var/packages/ffmpeg/target/bin/flac You can use it either through ffmpeg or directly through the command line utility.

As for exiftool, it is not currently packaged but feel free to provide code so we can create a package with or add to existing. Also note that ffmpeg does allow playing with metadata to some degree so you may be able to make some mileage there?

Hope this help, cheers.

m95341175 commented 3 years ago

Hi @th0ma7 , I apologize for any intemperate tone but I think being told things that I know aren't so was probably the first intemperate provocation. In any case, I really appreciate your reply as I didn't realize that flac and metaflac were packaged with ffmpeg. I did a search of the package description and didn't see them. Now I do see them on my system but they aren't in my path. Would it be reasonable for me to create symbolic links for them in /usr/local/bin or is that "owned" by the OS and package manager on this distro in such a way that doing so would be considered a problem?

Next, as to exiftool, when you say "provide code" are you talking about the things I provided above namely a link to the tarball or are you talking about me trying to do this myself? If someone had the wherewithal to add exiftool to an existing package, I would really appreciate it. If you look at what it does for 1 or 2 minutes I think you'll see that it's metadata capabilities go WAY beyond what's included in ffmpeg and some of those are what I'm after. Please advise.

And, again, thanks for your comments. I really appreciate the fact that folks take the time to develop and maintain these packages.

Mike

th0ma7 commented 3 years ago

if you are interested and have a bit of development skilset you can provide code to create a cross/exiftool that compiles on all archs the submit a github pull request (PR). In the repository there are tons of examples and we have wiki providing howtos.

If not, well I may (or someone else in the team) have a look at it eventually. Perhaps adding it to the ffmpeg package could somewhat make sense as it already provide all other media type toolset or creating a do-it-yourself package option so user can build them as standalone.

th0ma7 commented 3 years ago

@m95341175 I went on and read a bit on ExifTool and this is a no go. You might be able to install it within your user environment on your local DSM by installing Synology's perl package and invoking CPAN to install it as a module.

By experience sadly many perl cpan modules (or their dependencies) also require a platform compatible local gcc compiler to build source code and link it to perl libraries which is something that can't be achieved easily. Perl doesn't cross-compile (e.g. I cannot build a perl package with CPAN source modules dependencies for another CPU type than the one I am building from, at least not natively and not without heavy changes and a lot of luck, been there, done that).

So all in all, you do have flac through ffmpeg package. As for ExifTool I whish you good luck.

Note that if you do find an equivalent for python it may be much easier to achieve your goal. But using perl is not an technical option.

m95341175 commented 3 years ago

Thanks @th0ma7 , I really appreciate you looking into this. I will make do with flac and metaflac and just run exiftool over my network rather than on-box. Cheers!

hgy59 commented 3 years ago

@m95341175 I have no problem running exiftool on my DS-115j (armada370) I downloaded and extracted Image-ExifTool-12.30.tar.gz (and installed the synology perl package).

$ uname -a
Linux ####### 3.2.40 #25556 Thu Jul 1 14:30:20 CST 2021 armv7l GNU/Linux synology_armada370_ds115j
....../Image-ExifTool-12.30$ ./exiftool t/images/ExifTool.jpg
ExifTool Version Number         : 12.30
File Name                       : ExifTool.jpg
Directory                       : t/images
File Size                       : 25 KiB
File Modification Date/Time     : 2021:04:01 19:30:37+02:00
File Access Date/Time           : 2021:09:17 13:35:47+02:00
File Inode Change Date/Time     : 2021:09:17 13:35:47+02:00
File Permissions                : -rwxrwxrwx
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Description               : A witty caption
Orientation                     : Horizontal (normal)
Software                        : Adobe Photoshop 7.0
Modify Date                     : 2004:02:26 09:36:46
Artist                          : Phil Harvey
Y Cb Cr Positioning             : Co-sited
F Number                        : 3.5
Exposure Program                : Program AE
ISO                             : 100
Exif Version                    : 0210
Create Date                     : 2001:05:19 18:36:41
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 1.6
Brightness Value                : 2
Max Aperture Value              : 3.5
Metering Mode                   : Multi-segment
Flash                           : Fired
Focal Length                    : 6.0 mm
Flashpix Version                : 0100
Exif Image Width                : 100
Exif Image Height               : 80
Focal Plane X Resolution        : 3053
Focal Plane Y Resolution        : 3053
Focal Plane Resolution Unit     : cm
Sensing Method                  : One-chip color area
File Source                     : Digital Camera
Scene Type                      : Directly photographed
Thumbnail Offset                : 852
Thumbnail Length                : 0
JFIF Version                    : 1.01
Thumbnail Image                 : (Binary data 1558 bytes, use -b option to extract)
SPIFF Version                   : 1.2
Color Space                     : YCbCr, ITU-R BT 709, video
Compression                     : JPEG
Resolution Unit                 : inches
Y Resolution                    : 300
X Resolution                    : 300
File Format                     : JPEG (lossy)
Target Compression Ratio        : 2
Pixel Aspect Ratio              : 1
Component Bit Depth             : 8
Color Bit Depth                 : 24
Color BW                        : 1
Target Image Type               : Real-world Subject
Record ID                       : 0
File Number                     : 45
Date/Time Original              : 1998:05:01 21:33:18
Time Zone Code                  : 0
Time Zone Info                  : 0
Original File Name              : C:\DC97\CTG_0000\AUT_0045.JPG
Thumbnail File Name             : C:\DC97\CTG_0000\THM_0045.JPG
Shutter Release Method          : Single Shot
Shutter Release Timing          : Priority on focus
Flash Guide Number              : 0
Flash Threshold                 : 0
Exposure Compensation           : 1
Shutter Speed Value             : 1/83
Aperture Value                  : 6.2
Target Distance Setting         : 476 mm
Measured EV                     : 16.25
Canon File Description          :
Canon Image Type                : AUT:Full automatic mode
Owner Name                      :
Make                            : Canon
Camera Model Name               : Canon PowerShot A5
Base ISO                        : 100
ROM Operation Mode              : USA
Canon Firmware Version          : Firmware Version 01.00
Free Bytes                      : (Binary data 12 bytes, use -b option to extract)
Focal Type                      : Fixed
Focal Plane X Size              : 5.05 mm
Focal Plane Y Size              : 3.71 mm
Interleaved Field               : Not Interleaved
XMP Toolkit                     : Image::ExifTool 4.73
About                           : uuid:80056b68-1045-fa97-3401-6f4ed84cd53d
Creator                         : Phil Harvey
Description                     : UTF-16 (big-endian) encoded XMP
Rights                          : Copyright 2004 Phil Harvey
Subject                         : ExifTool, Test, XMP
Title                           : Test IPTC picture
Authors Position                : My Position
Caption Writer                  : I wrote it
Country                         : Canada
Instructions                    : What instructions
State                           : Ont
Transmission Reference          : What is a transmission reference?
Job Ref Name                    : My Job
Document ID                     : adobe:docid:photoshop:4cc7b857-69d0-11d8-8ac4-bb59c92f0d9a
Marked                          : False
Web Statement                   : https://exiftool.org/
Profile CMM Type                : Adobe Systems Inc.
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1999:06:03 00:00:00
Profile File Signature          : acsp
Primary Platform                : Apple Computer Inc.
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : none
Device Model                    :
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : Adobe Systems Inc.
Profile ID                      : 0
Profile Copyright               : Copyright 1999 Adobe Systems Incorporated
Profile Description             : Adobe RGB (1998)
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Tone Reproduction Curve     : (Binary data 14 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 14 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 14 bytes, use -b option to extract)
Red Matrix Column               : 0.60974 0.31111 0.01947
Green Matrix Column             : 0.20528 0.62567 0.06087
Blue Matrix Column              : 0.14919 0.06322 0.74457
Code Page                       : Unicode UTF-16, little endian
Used Extension Numbers          : 1
Extension Name                  : Screen nail
Extension Class ID              : 10000230-6FC0-11D0-BD01-00609719A180
Extension Persistence           : Invalidated By Modification
Extension Create Date           : 1999:05:14 21:47:25
Extension Modify Date           : 1999:05:14 21:47:25
Creating Application            : Digita
Extension Description           : Presized image for LCD display
Storage-Stream Pathname         : /.Screen Nail_bd0100609719a180
Screen Nail                     : (Binary data 5917 bytes, use -b option to extract)
MPF Version                     : 0100
Number Of Images                : 2
MP Image Flags                  : Dependent child image
MP Image Format                 : JPEG
MP Image Type                   : Large Thumbnail (full HD equivalent)
MP Image Length                 : 1039273
MP Image Start                  : 5945405
Dependent Image 1 Entry Number  : 0
Dependent Image 2 Entry Number  : 0
Film Product Code               : 37
Image Source EK                 : 1
Capture Conditions PAR          : 1
Frame Number                    : 0
Film Category                   : 2
Film Gencode                    : 2
Model And Version               : Version 9
Film Size                       : 1
SBA RGB Shifts                  : 0 0 0
SBA Input Image Colorspace      : 3
SBA Input Image Bit Depth       : 12 12 12
SBA Exposure Record             : (Binary data 368 bytes, use -b option to extract)
User Adj SBA RGB Shifts         : (Binary data 5 bytes, use -b option to extract)
Image Rotation Status           : 0
Roll Guid Elements              : 00000000000000000000000000000000
Metadata Number                 : 0100
Sign Type                       : Information
Location                        : Roundabout
Lit                             : No
Condition                       : Good
Azimuth                         : E
PrintIM Version                 : 0250
NITF Version                    : 2.00
Image Format                    : IMode B
Blocks Per Row                  : 1
Blocks Per Column               : 1
Image Color                     : Monochrome
Bit Depth                       : 8
Image Class                     : General Purpose
JPEG Process                    : Baseline sequential DCT, Huffman coding, 8-bit samples
Stream Color                    : Monochrome
Stream Bit Depth                : 8
Flags                           : 0x1010000
AEC Current Sensor Luma         : 22
AF Position                     : 26
AEC Current Exp Index           : 308
AWB Sample Decision             : 7
ASF5 Enable                     : 1
ASF5 Filter Mode                : 0
ASF5 Exposure Index 1           : 180
ASF5 Exposure Index 2           : 270
ASF5 Max Exposure Index         : 290
Tool Name                       : Media Center
Tool Version                    : 19.0.67
People                          : Santa
Places                          : Jamaica
Date                            : 2013:09:01 20:12:19
Album                           : 2013-09-01
Name                            : Glass home at night
Comment                         : © PhotoStudio Unicode comment..
JPEG-HDR Version                : 11
Ln0                             : 0.122262
Ln1                             : 2.634655
S2n                             : 2.269635e+03
Alpha                           : 1.000000
Beta                            : 1.000000
Correction Method               : 0
Ratio Image                     : (Binary data 19 bytes, use -b option to extract)
JUMD Type                       : (cacb)-0011-0010-800000aa00389b71
JUMD Label                      : cai
Exposure Time                   : 1/155
Resolution                      : 5
Protect                         : 0
Cont Take                       : 0
Color Mode                      : 1
Zoom                            : 2.1
Macro                           : Off
Light S                         : 0
Camera Type                     : SR84
Serial Number                   : #00000001
Version                         : v84-71
ID                              : AGFA DIGITAL CAMERA
Pic Len                         : 561039
Thm Len                         : 3802
Tag Q                           : 96
Tag R                           : 293
Tag B                           : 332
S0                              : 1e8,0,11b0,6f72,15cf,4225,4225,1050000,a1e0004,0,2f0030d,2f102c5,2880090,0,0
T0                              : 11b15600,1290000,e00c0f,2,0,0
Current IPTC Digest             : 6895be53ef9a287520f400aa17242c09
Application Record Version      : 2
Caption-Abstract                : A witty caption
Writer-Editor                   : I wrote it
Headline                        : No headline
Special Instructions            : What instructions
By-line                         : Phil Harvey
By-line Title                   : My Position
Credit                          : My Credit
Object Name                     : Test IPTC picture
Date Created                    : 2004:02:26
City                            : Kingston
Province-State                  : Ont
Country-Primary Location Name   : Canada
Original Transmission Reference : What is a transmission reference
Category                        : 1
Supplemental Categories         : amazing, image, utilities
Copyright Notice                : Copyright 2004 Phil Harvey
Urgency                         : 8 (least urgent)
Source                          : I'm the source
Keywords                        : jambalaya
IPTC Digest                     : 05ad1770b1a95f1f9788ac995fa647da
Displayed Units X               : inches
Displayed Units Y               : inches
Print Style                     : Centered
Print Position                  : 0 0
Print Scale                     : 1
Global Angle                    : 30
Global Altitude                 : 30
Copyright Flag                  : False
URL                             : https://exiftool.org/
URL List                        :
Slices Group Name               : IPTC
Num Slices                      : 1
Has Real Merged Data            : Yes
Writer Name                     : Adobe Photoshop
Reader Name                     : Adobe Photoshop 7.0
Photoshop Quality               : 7
Photoshop Format                : Standard
Progressive Scans               : 3 Scans
Warning                         : IPTCDigest is not current. XMP may be out of sync
Adobe CM Type                   : 3
DCT Encode Version              : 100
APP14 Flags 0                   : (none)
APP14 Flags 1                   : (none)
Color Transform                 : YCbCr
Quality                         : 70
Image Width                     : 8
Image Height                    : 8
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Embedded Audio File Name        : SoundShot_000
Embedded Audio File             : (Binary data 16 bytes, use -b option to extract)
Copyright                       : © 2006 Phil Harvey
Trailer Signature               :
Tagged                          : Yes
Color Class                     : 6 (Typical alt)
VRD Version                     : 1.0.0
WB Adj RGGB Levels              : 0 0 0 0
White Balance Adj               : Shot Settings
WB Adj Color Temp               : 5600
WB Fine Tune Active             : No
WB Fine Tune Saturation         : 0
WB Fine Tune Tone               : 0
Raw Color Adj                   : Shot Settings
Raw Custom Saturation           : 0
Raw Custom Tone                 : 0
Raw Brightness Adj              : 0.00
Tone Curve Property             : Shot Settings
Dynamic Range Min               : 0
Dynamic Range Max               : 4095
Tone Curve Active               : No
Tone Curve Mode                 : RGB
Brightness Adj                  : 0
Contrast Adj                    : 0
Saturation Adj                  : 100
Color Tone Adj                  : 0
Luminance Curve Points          : (0,0) (255,255)
Luminance Curve Limits          : 255 0 255 0
Tone Curve Interpolation        : Curve
Red Curve Points                : (0,0) (255,255)
Red Curve Limits                : 255 0 255 0
Green Curve Points              : (0,0) (255,255)
Green Curve Limits              : 255 0 255 0
Blue Curve Points               : (0,0) (255,255)
Blue Curve Limits               : 255 0 255 0
RGB Curve Points                : (0,0) (255,255)
RGB Curve Limits                : 255 0 255 0
Crop Active                     : No
Crop Width                      : 0
Crop Height                     : 0
Sharpness Adj                   : 0
Crop Aspect Ratio               : Free
Constrained Crop Width          : 0
Constrained Crop Height         : 0
Check Mark                      : Clear
Work Color Space                : sRGB
Original Image Width            : 16
Original Image Height           : 16
Color Planes                    : 3
XY Resolution                   : 9
Rotation                        : 0
Crop Left                       : 24.557%
Crop Top                        : 21.25%
Crop Right                      : 30.676%
Crop Bottom                     : 86.25%
Crop Rotation                   : 0
Aperture                        : 3.5
Image Size                      : 8x8
Megapixels                      : 0.000064
Shutter Speed                   : 1/155
Preview Image                   : (Binary data 1039273 bytes, use -b option to extract)
Light Value                     : 10.9
Scale Factor To 35 mm Equivalent: 6.9
Circle Of Confusion             : 0.004 mm
Field Of View                   : 47.0 deg
Focal Length                    : 6.0 mm (35 mm equivalent: 41.4 mm)
Hyperfocal Distance             : 2.36 m
m95341175 commented 3 years ago

Thanks @hgy59 I'll give it a try.

stephane-archer commented 3 years ago

What is the status of ExifTool? What makes it not possible to package?

th0ma7 commented 3 years ago

Repackaging from someone else's package isn't something we normally do and will not provide much added value. I would advocate that our time is better spent on completing migrations of other packages to DSM7 instead.

I suggest you simply download the tar.gz file online and it should in theory work out of the box. Just follow the howto here: https://exiftool.org/install.html#Unix