Advertisement
seiburii

exiftool - media conversions

Oct 19th, 2020 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. Expected Formatting
  2.  
  3. ############
  4. Videos
  5. ############
  6.  
  7. Subject_---_DateTime_---_DeviceName_--_Dimensions_&_codec_--_Title_-__SHASUM.EXT
  8. MediaPersonal_NAME_---_DATETIME_---_DeviceName
  9.  
  10. NAME= whoever the files belong to
  11. DeviceName may be found only if:
  12. there exists images in the same folder
  13. TITLE= existing filename info or to be entered later
  14.  
  15. ############
  16. Pictures
  17. ############
  18. Subject_---_DateTime_---_DeviceName_--_Dimensions_&_codec_--_Title_-__SHASUM.EXT
  19.  
  20.  
  21. ############
  22. Audio File
  23. ############
  24.  
  25. Devices
  26.  
  27. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  28. To Organise
  29.  
  30. exiftool -config ~/exiftool.config \
  31. -ext "WAV" -ext "AAC" -ext "AMR" \
  32. -d %Y%m%d_%H%M%S \
  33. '-filename<RecordingsDictaphone_[NAME]_---_${Filename;s/\..{3}$//;s/ /_/g;s/-//g;s/_(IN|OUT)_.*//}_---_Duration_H00M00S00_--_${Filename;s/_(IN|OUT)_0/_$1_+44/;s/^.*_(IN|OUT)_([+0-9]+)\..{3}$/$1_-__$2/}__${SHA256}.%ue' \
  34. '-filename<RecordingsDictaphone_[NAME]_---_${Filename;s/\..{3}$//;s/ /_/g;s/-//g;s/_(IN|OUT)_.*//}_---_Duration_${Duration;s/:/H/;s/:/M/;s/$/S/}_--_${Filename;s/_(IN|OUT)_0/_$1_+44/;s/^.*_(IN|OUT)_([+0-9]+)\..{3}$/$1_-__$2/}__${SHA256}.%ue' \
  35. ./*
  36.  
  37.  
  38. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  39. ls -1 | while read line; do NEWNAME=$(echo "$line" | sed -E 's/([0-9]+)-([0-9]+)_([A-Za-z_0-9]+)..{3}$/RecordingsDictaphone_Wayne_---_$1-$2SS_--_$3.$4/'); done
  40.  
  41. '([0-9]+)-([0-9]+)_([A-Za-z_0-9]+)..{3}$'
  42. RecordingsDictaphone_Wayne_---_\1-\2SS_--_\3.\4
  43.  
  44.  
  45. =======================================================================================================
  46.  
  47. **##### Target:** Audio recording 2016-12-22 20-54-49.aac
  48.  
  49. **##### Target:** Audio recording 2016-12-22 20-54-49.wav
  50.  
  51. **##### Outcome:** RecordingsDictaphone_[NAME]_---\_20161222_205449\_---\_Duration_00H00M00S\_--\_TITLE\_-__SHA256SUM.aac
  52.  
  53. ** ##### Command to run: **
  54.  
  55. ```bash
  56. exiftool -config ~/exiftool.config \
  57. -ext "WAV" -ext "AAC" -ext "AMR" \
  58. -d %Y%m%d_%H%M%S \
  59. '-testname<RecordingsDictaphone_[NAME]_---_${Filename;s/\..{3}$//;s/ /_/g;s/-//g}_---_Duration_${Duration;s/:/H/;s/:/M/;s/$/S/}_--_${Filename;s/.*_-_(.*)\..*$/$1/}_-__${SHA256}.%ue' \
  60. ./*
  61. ```
  62.  
  63. * * *
  64.  
  65. **##### Target:** 2017-01-01_16-42-08_-_MOV_0005.MP4
  66. **##### Outcome:** MediaPersonal_[NAME]__---\_20170101_164208\_---\_Sony_E6633\_--\_3840x2160\_--\_MOV_0005\_-__SHA256SUM.JPG
  67.  
  68. **##### Command to run:**
  69.  
  70. ```bash
  71. exiftool -config ~/exiftool.config \
  72. -ext "MP4" \
  73. -d %Y%m%d_%H%M%S \
  74. '-testname<MediaPersonal_[NAME]_---_${Filename;s/-//g;s/_-_.*//}_---_${Make}_${Model}_--_${ImageSize}_--_${Filename;s/.*_-_(.*)\..*$/$1/}_-__${SHA256}.%ue' \
  75. ./100ANDRO/
  76. ```
  77.  
  78. * * *
  79.  
  80. **##### Target:** 2017-01-01_16-42-08_-_DSC_0005.JPG
  81.  
  82. **##### Outcome:** MediaPersonal_[NAME]_---**20170101_164208**---**Sony_E6633**--**3840x2160**--**DSC_0005**-__SHA256SUM.JPG
  83.  
  84. **##### Command to run:**
  85.  
  86. ```bash
  87. exiftool -config ~/exiftool.config \
  88. -ext "MP4" \
  89. -d %Y%m%d_%H%M%S \ '-testname<MediaPersonal_[NAME]_---_${Filename;s/-//;s/-//;s/-//;s/-//;s/\..{3}$//;s/_-_.*//;s///}_---_${Make}_${Model}_--_${ImageSize}_--_${Filename;s/.*_-_(.*)\..*$/$1/}_-__${SHA256}.%ue' \
  90. ./
  91. ```
  92.  
  93. * * *
  94.  
  95. **##### Target:** 2016-04-22_09-36-59_OUT_08003586552.AMR
  96.  
  97. **##### Outcome:** RecordingsCall_[NAME]_---\_20160422_093659\_---\_Duration_00H00M00S\_--\_OUT_-__+448003586552__SHA256SUM.aac
  98.  
  99. ** ##### Command to run: **
  100.  
  101. ```bash
  102. exiftool -config ~/exiftool.config \
  103. -ext "WAV" -ext "AAC" -ext "AMR" \
  104. -d %Y%m%d_%H%M%S \
  105. '-testname<RecordingsDictaphone_[NAME]_---_${Filename;s/\..{3}$//;s/ /_/g;s/-//g;s/_(IN|OUT)_.*//}_---_Duration_H00M00S00_--_${Filename;s/_(IN|OUT)_0/_$1_+44/;s/^.*_(IN|OUT)_([+0-9]+)\..{3}$/$1_-__$2/}__${SHA256}.%ue' \
  106. '-testname<RecordingsDictaphone_[NAME]_---_${Filename;s/\..{3}$//;s/ /_/g;s/-//g;s/_(IN|OUT)_.*//}_---_Duration_${Duration;s/:/H/;s/:/M/;s/$/S/}_--_${Filename;s/_(IN|OUT)_0/_$1_+44/;s/^.*_(IN|OUT)_([+0-9]+)\..{3}$/$1_-__$2/}__${SHA256}.%ue' \
  107. ./*
  108.  
  109. ### Result
  110. ### './2016-04-23_14-57-03_OUT_07792749276.AMR' --> './RecordingsDictaphone_[NAME]_---_20160423_145703_---_Duration_H00M00S00_--_OUT_-__+447792749276__7d810e17290479cc3b396651e412e73f2058c0444d2fbdf182666fd680730e2b.AMR'
  111. ```
  112.  
  113. * * *
  114.  
  115. **##### Target:**
  116.  
  117. **##### Outcome:**
  118.  
  119. **##### Command to run:**
  120.  
  121. ```bash
  122. Empty
  123. ```
  124.  
  125. * * *
  126.  
  127. **##### Target:**
  128.  
  129. **##### Outcome:**
  130.  
  131. **##### Command to run:**
  132.  
  133. ```bash
  134. Empty
  135. ```
  136.  
  137. * * *
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement