-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTODO
97 lines (91 loc) · 9.64 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
ToDo list created by Todo+ for VSC
----------------------------------
Todo:
✔ Bei .mov vom I-Phone gibt es tatsächlich eine Stunde Differenz zwischen "Änderungsdatum" und "Medium erstellt", z.B. bei IMG_E0095_c.MOV. Achtung: Im Sommer sind es 2 h Offset! @done(19-03-19 21:53)
✔ Ab verlässlichsten und einheitlichsten scheinen das "CreationDate" (iPhone), "DateTimeOriginal" (andere) und "FileModifyDate" zu sein. -> Wenn vorhanden, das CreationDate verwenden, nur sonst das MinimalDate. @done(19-03-19 21:53)
✔ @high Weitere Exif-Daten übernehmen (Panasonic speichert einiges ab, siehe EXIF_Data.txt) @done(19-03-26 21:47)
✔ Get Timezone and add it back to the dates that use (ausschliesslich aus dem FileModifyDate oder Apples CreationDate! (bei Apple aus dem jeweils kleineren)) @done(19-03-19 21:53)
✔ @critical metadata_to_use_dict in set_metadata() so anpassen, dass mit Tags statt Description umgegangen werden kann @done(19-03-25 22:06)
☐ @low Metadaten in Flatfile auslagern, aber nur jene, die keine zusätzliche Logik benötigen (also z.B. nicht die Datumsfelder)
☐ @low Im Metadaten-Flatfile mit Flag definieren, ob Feld auch befüllt werden soll, wenn im Original nicht vorhanden, neu aber ein Wert vorhanden ist (z.B. die meisten Datumsangaben aber nicht alle)
✔ Von allen Datumsfeldern den kleinsten Wert nehmen (der bei edierten Movies nicht immer das ModifyDate sein muss) @done(19-03-19 21:54)
✔ Mit Avi und MPEG testen @done(19-12-14 13:40)
✔ Prüfen ob es ein thm-File gibt, wenn ja, Metadatan daraus einlesen @done(19-03-19 22:09)
✔ @high Möglichkeit der Videobeschneidung einbauen (Start, Stop) @done(19-04-07 13:56)
https://superuser.com/questions/138331/using-ffmpeg-to-cut-up-video
The following would clip the first 30 seconds, and then clip everything that is 10 seconds after that:
https://trac.ffmpeg.org/wiki/Seeking
ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy -copyts cut.mp4
✔ Wahlweise x264 oder x265 @done(19-03-22 22:02)
✔ Default für x264: CRF25 veryslow @done(19-03-22 22:02)
✔ Default für x265: CRF26 slow @done(19-03-22 22:02)
☐ @low Audio format was changed for Olympus: Audio Bits Per Sample: 8 -> 16, Audio Format: raw -> mp4a -> Read Docu, under which circumstances audio is rencoded!
-c:a copy OUTPUT would prevent encoding of audio, but is that wanted? What is the default audio encoding?
when cutting up the video, audio and video may need to be reencoded to avoid choppy/out of sync playback
✔ @high Change command to get group names: exiftool -G1 -t f:\TestMovies\CameraTest\CanonG12\MVI_4929.MOV -> Total Format change!! @done(19-04-04 22:19)
✔ @high Set extracted group names together with tag: -EXIF:CreateDate @done(19-04-04 22:19)
✔ @high metadata_to_use_dict: ignore group names here: several brands may use the same tag. Don't want to add them for every single brand! @done(19-04-04 22:20)
✔ @high Group names may need to be included in the predefined date tags (within metadata_to_use_dict) -> make separate dict for that? @done(19-04-04 22:20)
✔ @high Makernotes (Canon group) are not yet writable in movies (w/o error). Some tags are converted the group XMP-exif, but only if the Canon group is not forced @done(19-04-04 22:20)
✔ @high First try to add the group tags, then check which tags have NOT been written (included in the output list but missing in the output file) and write them again not using the group @done(19-04-04 22:20)
✔ @medium Checkback: x movies detected in folder / following movies detected in folder -> proceed? @done(19-04-12 00:27)
✔ @medium default for path: current work directory -> handle that in batch file. Unknown what the wd will be in such a call! (works for all movies in a directory, but not when specifying single movies) @done(19-12-29 20:40)
✔ @high add tune option, e.g. grain for darker szenes. They differ for x264 and x265! @done(19-04-16 21:59)
✘ @high Implement aq-mode setting. --aq-mode 3 is good for dark szenes (x264 and x265): http://forum.doom9.org/showthread.php?t=173870 @cancelled(19-04-21 21:56)
3. AQ enabled with auto-variance and bias to dark scenes. This is recommended for 8-bit encodes or low-bitrate 10-bit encodes, to prevent color banding/blocking.
https://unix.stackexchange.com/questions/230800/re-encoding-video-library-in-x265-hevc-with-no-quality-loss
pass it like -x265-params --aq-mode=3 or -x265-params "aq-mode=3" (see https://stackoverflow.com/questions/41949638/ffmpeg-wont-recognize-x265-options)
for x264: -x264opts aq-mode=3
✔ @high Or even better: find optimal setting for dark szenes and implement it as -tune HQ @done(19-04-21 21:56)
-> x264 -crf 22 -preset veryslow -tune film
✔ @low Lower the default CRF by 1 to increase default quality a bit: x265: 26 -> 25, x264: 25 -> 24 @done(19-04-21 21:56)
✔ @high add codec as suffix to filename (x264, x265) @done(19-04-22 14:54)
✔ @high exclude files ending in x264/x265 when searching the directory for movies @done(19-04-22 15:16)
✔ @medium modify batch file to allow passing options even when the path is not specified @done(19-04-23 01:23)
✔ @medium add parameter to rotate movie (-vf "transpose=1") https://www.ostechnix.com/how-to-rotate-videos-using-ffmpeg-from-commandline/ @done(19-12-20 16:16)
✔ @medium Either embedd ffmpeg and exiftool (check how to deal with open source license) or create a config file containing the paths to these tools @done(19-12-21 20:11)
✔ @medium Create readme @done(19-12-26 20:06)
☐ @medium Add -vf option (video filter)
☐ @medium Add flag for unsharp filter with default options (unsharp=5:5:0.8:3:3:0.4), currently enforced when stabilization is True
☐ @low Add kwargs to enable all ffmpeg arguments (Possible via command prompt? Maybe use a parameter called "kwargs"?)
✔ @medium Add 2 step stabilization using vidstab @done(20-03-15 00:04)
✔ Delete transforms.trf after using stabilization @done(20-03-16 21:11)
Bugs:
✔ @critical bei CreateDate & ModifyDate die Zeitzone abschneiden, da sie von Windows falsch interpretiert wird (Datum / Medium erstellt 1-2 Stunden zu spät dargestellt) @done(19-04-12 00:26)
"CreateDate": original_date_tz, # Wird in Windows immer um 1-2 h verschoben als "Datum" und "Medium erstellt" angezeigt, unabhängig von dem TZ-Shift
Ohne diesen Tag wird das "Datum" basierend auf einem andern Tag korrekt angezeigt.
✔ @critical Durch das zweite Schreiben der Tags wird das FileModifyDate auf das aktuelle Datum gesetzt -> beim zweiten Mal ebenfalls inkludieren! @done(19-04-12 00:13)
✔ @critical Pfade mit Hochkomma können nicht verarbeitet werden, z.B. "f:\Libraries\Pesche\Pictures\Digicams\2019\'19_03_23 Zoo Zürich\" @done(19-04-14 21:05)
✔ @critical Pfad wir nun zwar weitergeben, stürzt aber beim Prozessieren der einzelnen Movies ab! @done(19-04-14 21:25)
☐ @low Warning: Value below int16u minimum for Panasonic:ProgramISO
☐ @low set -charset option for exiftools, which may have sideffects, though: http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q18 http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=6721.0
✔ @critical When specifying a movie instead of a directory and adding an option (e.g. -t HQ) an error is thrown @done(19-04-22 19:58)
✔ @critical Process hangs when there is no metadata aside from dates (at the step set_metadata_without_group) @done(19-04-22 20:44)
☐ @high When using cut and stabilize at the same time, it analyzes the full lenght movie and then applies the stabilization to the cut movie: out of sync -> even more shakes
☐ @high When cutting the movie first with low compression, and then stabilize it in a second run (normal compression), the group tags can't be written. It hangs with the following output (maybe just implement a timeout):
✔ @critical Panasonic metadata can no longer be applied (index out of range) @done(24-08-18 21:46)
☐ @critical Certain movies hang when they reach "Trying to write makershift tags without groups ..." (movies that were cut using LosslessCut?), e.g. P1046241.MP4
Trying to write makershift tags without groups ...
======== -
Manual workaround:
- Abort using Ctrl + C
- Adjust the FileModifyDate and FileCreateDate using AttributeMagic
- exiftool "-CreateDate<FileModifyDate" "-DateTimeOriginal<FileModifyDate" "-DateCreated<FileModifyDate" "-TimeCreated<FileModifyDate" *.*
Ideas:
☐ @low Proper Docstrings using Autodocstring
☐ @low Parameter validition e.g. by using dictionaries or when calling it from cmd
☐ @low Parameter typing: https://mypy.readthedocs.io/en/latest/cheat_sheet_py3.html
☐ @medium Ability to transfer meta data from one movie to another (e.g. for cases when a movie is processed and saved by another tool)
-> in process_movie()
if transfer_metadata
- supress compression_output_dict = compress_movie()
- set movie_path_out to passed parameter for target movie (movie_path is the source movie)
✔ @low as default: use folder from which script is called @done(19-12-20 16:18)
Notes:
• More info on Exif Tags: https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/
• MKV is not yet writable by EXIFTOOL (error message).
• MOV and MP4 are partially writable. Only XMP tags are written. Tags from the canon group etc. (makernotes) are only written if they have a corresponding XMP-tag.
• For MOV and MP4, there is no error message that some tags have not been written.
• http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,10001.msg52030.html#msg52030
• My way of trying to add makernotes to the appropriate group is currently futile, as no video container is supported that way by EXIFTOOL.
This may change with newer versions of EXIFTOOL.