-
Notifications
You must be signed in to change notification settings - Fork 0
/
Notizen
61 lines (47 loc) · 4.3 KB
/
Notizen
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
..:: Notizen ::..
- video mit den überblendungen musik fantasie bei sergej
+ check filenames in source dir >> ./main.py
+ render all files
+ image (including soft sharpening)
1. make all sizes (400w, 600w, 800w, 1000w, 1500w, 2000w, 2500w)
+ jpg: convert -strip -define jpeg:dct-method=float -geometry 400x -sharpen 0x0.5 -quality 90 input.jpg input-400w.jpg
// - webp (transpile via png necessary!): convert -strip -geometry 400w -sharpen 0x0.9 input.jpg input-400w.png
cwebp -q 90 -m 6 input-400w.png -o input-400x.webp
+ preload images in low quality: convert -strip -geometry 400x -blur 0x20 -quality 5 input.jpg output-preload.jpg
cwebp -q 1 -m 6 input-400.png -o input-preview.webp
// convert all files in a dir to webp: find . -iname '*.png' | parallel 'cwebp -q 90 -m 6 {} -o {}.webp'
2. // wipe metadata (unnecessary, convert -strip does the job)
exiftool -all= input.jpg
for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done
3. write Creative Commons metadata
exiftool -P -overwrite_original_in_place -OwnerName='John Doe' \
-IFD0:Artist='John Doe' \
-IPTC:By-line='John Doe' \
-XMP-dc:Creator='John Doe' \
-IPTC:By-lineTitle='Photographer' \
-IPTC:Contact='email: [email protected]; website: https://john-doe.com' \
-XMP-iptcCore:CreatorWorkURL='https://gabriel-wolf.de' \
-d %Y -IFD0:Copyright='Creative Commons CC-BY 4.0' \
-d %Y -IPTC:CopyrightNotice='https://creativecommons.org/licenses/by/4.0/deed.de' \
-d %Y -XMP-dc:Rights='Creative Commons CC-BY 4.0' input.jpg
+ audio
+ mp3s no reencoding (due to quality), but transpile to wipe some metadata
+ ffmpeg -i input.mp3 -metadata originator= -metadata encoded_by= -metadata encoder_settings= -c:v copy -c:a copy output.mp3
+ wavs
+ mp3: ffmpeg -i input.wav -metadata originator= -metadata encoded_by= -codec:a libmp3lame -q:a 0 output.mp3
+ ogg: ffmpeg -i input.wav -metadata originator= -metadata encoded_by= -metadata encoder_settings= -codec:a libvorbis -q:a 9 output.ogg
+ flac: ffmpeg -i input.wav -metadata originator= -metadata encoded_by= -metadata encoder_settings= -compression_level 8 output.flac
+ video
+ poster image: ffmpeg -i input.mp4 -ss 00:00:00.200 -vframes 1 output.jpg
reduce file size: convert -strip -geometry 400x -blur 0x20 -quality 1 output.jpg output-preload.jpg
+ webm: ffmpeg -i input.mp4 -vcodec libvpx -b:v 5120k -c:a libvorbis -ac 2 -b:a 192k -ar 44100 output.webm
+ ogg: ffmpeg -i input.mp4 -c:v libtheora -c:a libvorbis -b:v 5120k -b:a 192k -ar 44100 output.ogg
+ mp4: ffmpeg -i input.mp4 -vcodec h264 -vb 5120k -acodec aac -ab 192k -pix_fmt yuv420p output.mp4
+ text
convert_txt_to_html_to_json_positive input.txt output.json
+ score
pdf: exiftool -P -overwrite_original_in_place -Producer= -OwnerName='Gabriel Wolf' -IFD0:Artist='Gabriel Wolf' -IPTC:By-line='Gabriel Wolf' -XMP-dc:Creator='Gabriel Wolf' -IPTC:By-lineTitle='Composer' -IPTC:Contact='email: [email protected]; website: https://gabriel-wolf.de' -XMP-iptcCore:CreatorWorkURL='https://gabriel-wolf.de' -d %Y -IFD0:Copyright='Creative Commons CC-BY 4.0' -d %Y -IPTC:CopyrightNotice='https://creativecommons.org/licenses/by/4.0/deed.de' -d %Y -XMP-dc:Rights='Creative Commons CC-BY 4.0' output.pdf
preview image: gs -r300x300 -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -o output.png input.pdf
gm convert -geometry 300x +dither -depth 8 -colors 50 output.png output.png
// cwebp -q 90 -m 6 output.png -o output.webp
+ chmod 644 *