Messaggi di Settembre 2017
Post n°59 pubblicato il 10 Settembre 2017 da taichung
Tag: exiftool
Exiftool è disponibile per tutte le maggiori distribuzioni Linux. Esso permette di rimuovere uono o più metadati di una fotografia, come la data, li tipo di apparecchio fotografico, la geolocalizzazione, l'uso del flash, l'apertura focale ecc. Per cancellarli tutti si usa il comando: # exiftool -all= /nomedirectory/nomefile.jpg Ovviamente si può utilizzare anche con immagini di formato diverso, png, raw, ecc. Di seguito alcuni esempi tratti dal sito http://owl.phy.queensu.ca/~phil/exiftool/examples.html : 0) Extract information from a file exiftool a.jpg A basic command to extract all metadata from a file named a.jpg.
1) Basic write example exiftool -artist=me a.jpg Writes Artist tag to a.jpg. Since no group is specified, EXIF:Artist will be written and all other existing Artist tags will be updated with the new value ("me").
2) Write multiple files exiftool -artist=me a.jpg b.jpg c.jpg Writes Artist tag to three image files.
3) Write to all files in a directory exiftool -artist=me /tmp/images Writes Artist tag to all files in directory /tmp/images.
4) Write multiple tags exiftool -artist="Phil Harvey" -copyright="2011 Phil Harvey" a.jpg Writes two tags to a.jpg.
5) Extracting duplicate tags exiftool -a -u -g1 a.jpg Print all meta information in an image, including duplicate and unknown tags, sorted by group (for family 1).
6) undefined exiftool -common dir Print common meta information for all images in dir.
7) undefined exiftool -T -createdate -aperture -shutterspeed -iso DIR > out.txt List meta information in tab-delimited column form for all images in directory DIR to an output text file named "out.txt".
8) undefined exiftool -s -ImageSize -ExposureTime b.jpg Print ImageSize and ExposureTime tag names and values.
9) undefined exiftool -l -canon c.jpg d.jpg Print standard Canon information from two image files.
10) undefined exiftool -r -w .txt -common pictures Recursively extract common meta information from files in C directory, writing text output into files with the same names but with a C<.txt> extension.
11) undefined exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg Save thumbnail image from C to a file called C.
12) undefined exiftool -b -JpgFromRaw -w _JFR.JPG -ext CRW -r . Recursively extract JPG image from all Canon CRW files in the current directory, adding C<_JFR.JPG> for the name of the output JPG files.
13) undefined exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s *.jpg Print formatted date/time for all JPG files in the current directory.
14) undefined exiftool -IFD1:XResolution -IFD1:YResolution image.jpg Extract image resolution from EXIF IFD1 information (thumbnail image IFD).
15) undefined exiftool "-*resolution*" image.jpg Extract all tags with names containing the word "Resolution" from an image.
16) undefined exiftool -xmp:author:all -a image.jpg Extract all author-related XMP information from an image.
17) undefined exiftool -xmp -b a.jpg > out.xmp Extract complete XMP data record intact from a.jpg and write it to out.xmp using the special XMP tag (see the Extra Tags).
19) undefined exiftool -p '$filename has date $dateTimeOriginal' -q -f dir Print one line of output containing the file name and DateTimeOriginal for each image in directory dir.
21) undefined exiftool -ee -p '$gpslatitude, $gpslongitude, $gpstimestamp' a.m2ts Extract all GPS positions from an AVCHD video.
22) undefined exiftool -icc_profile -b -w icc image.jpg Save complete ICC_Profile from an image to an output file with the same name and an extension of C<.icc>.
23) undefined
exiftool -htmldump -w tmp/%f_%e.html t/images Generate HTML pages from a hex dump of EXIF information in all images from the C directory. The output HTML files are written to the C directory (which is created if it didn't exist), with names of the form "FILENAME_EXT.html"
Post n°58 pubblicato il 07 Settembre 2017 da taichung
In Linux per estrarre i sottotitoli contenuti in un file video Matroska, quelli con estensione mkv per intenderci, si fa ricorso alla suite di programmi mkvtoolnix. Essa sui sistemi simil Debian si installa col solito: # apt-get install mkvtoolnix Supponendo di avere un file video chiamato foobar.mkv da cui vogliamo estrarre i sottotitoli, dobbiamo innanzitutto individuare la traccia del file che li contiene. Ci avvaliamo a tale scopo del programma mkvmerge: # mkvmerge -i foobar.mkv Nella vostra finestra di terminale apparirà l'elenco delle tracce e fra queste il numero della traccia contenente i sottotitoli. Nel caso fossero presenti più tracce di sottotitoli, perché le lingue sottotitolate sono più di una, la fase seguente va ripetuta, modificando ogni volta il numero di traccia ed ovviamente il nome del sottotitolo, altrimenti lo sovrascrivereste: # mkvextract tracks foobar.mkv <num. traccia>:foobar.srt Ovviamente a <num. traccia> dovete sostituire il numero della traccia contenente i sottotitoli, ed a foobar il nome del vostro file video.
Post n°57 pubblicato il 07 Settembre 2017 da taichung
È possibile estarre le immagini contenute in un file pdf attraverso uno dei tool contenuti nella suite imagemagick, che deve quindi essere stata preventivamente installata. Si fa uso del programma convert, in essa contenuta. La sintassi è: # convert nomefile.pdf -append nomeimmagine%d.png Ciò creerà una serie di file del tipo nomeimmagine-0.png, nomeimmagine-1.png... Per ulteriori possibili opzioni, come sempre # man convert Ovviamente non è indispensabile utilizzare il formato png per le immagini risultanti, si può sceglierne anche un altro, JPG per esempio. La conversione dovrebbe funzionare anche con i file di tipo Post Script (.ps), ma non ho provato.
|
||||||||
|
Inviato da: cassetta2
il 23/08/2019 alle 12:59