-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmUhGuI.ahk
3285 lines (3027 loc) · 112 KB
/
mUhGuI.ahk
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
GetFFMPEG() ;Executes if User doesnt have ffmpeg or mUhGuI in PATH env variable.
{
Gui, 14:Add, Button, x68 y65 w70 h24 gPrefer, Preferred
Gui, 14:Add, Button, x247 y65 w54 h24 gRecent, Latest
Gui, 14:Add, Text, x5 y5 w358 h27, `n It looks like you dont have ffmpeg, pls select a version bb <3
Gui, 14:Show, w368 h96,START YOUR ENGINES!!!
Gui, 14:-Sysmenu
return
Prefer:
Gui, 14:Destroy
global FFMPegVersion = "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-3.3.2-win64-static.zip"
return
Recent:
Gui, 14:Destroy
global FFMPegVersion = "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip"
return
}
FileCreateDir, fUn\debug
EnvGet, CheckPathEnvVar, PATH
If !RegExMatch(CheckPathEnvVar,"(ffmpeg|mUhGuI)") ; check if PATH enviroment variable contains ffmpeg or mUhGuI
{
GetFFMPEG()
WinWaitClose, START YOUR ENGINES!!!
url = %FFMPegVersion%
SplitPath, url, name, dir, ext, name_no_ext, drive
F1=%A_ScriptDir%\%name_no_ext%.%ext%
SplashTextOn, 400, 40, ,Now downloading`n%name_no_ext%
urldownloadtofile,%url%,%f1%
SplashTextOff
msgbox, 262208,Download ,Download Complete...
runwait, %A_ScriptDir%/fUn/unzipmove.ahk ; run external ahk to perform actions to properly setup FFMpeg
}
else
Quote := chr(0x22) ; Damn Windows not letting me escape characters
ActivateBinaryVar = 0 ; NEED THIS
global GuiColor = 884488
global comb := "m|e|m|e"
;Seelect random video codec and randomize variable values for hex editing the background image.
FileDelete, %A_ScriptDir%\fUn\background.bmp
Random, randNum, 10, 99
Random, randNum2, 1000, 9999
Random, randNum3, 1, 30
Random, randNum4, 10, 99
Random, randNum5, 1000, 9999
Array := ["msvideo1", "jpegls -pred median", "libxavs", "libvpx", "libtheora", "zmbv", "libopenjpeg", "cinepak", "utvideo", "libvpx-vp9 -tile-columns 0 -pix_fmt gbrp", "libvpx-vp9 -tile-columns 0 -pix_fmt yuv444p", "wmv2", "png", "asv1", "asv2", "vc2"]
Random, randint, 1, % Array.MaxIndex()
Codec := Array[randint]
Array2 := ["%randNum2%", "%randNum%"]
Random, randint, 1, % Array2.MaxIndex()
RANDUMB1 := Array2[randint]
transform, RANDUMB1, Deref, %RANDUMB1%
;Make Backround via atagens "chexr" command line hex editor.
makeBack :=
(
"ffmpeg -ss %randNum3% -f lavfi -i testsrc2=s=640x360 -f avi -q:v 0 -vcodec %Codec% -frames 1 -vf eq=contrast=-1 outpls.fuk -y && chexr outpls.fuk %randNum4% %RANDUMB1% bentpls.fuk && ffmpeg -f avi -i bentpls.fuk %A_ScriptDir%\fUn\background.bmp -y"
)
transform, makeBack, Deref, %makeBack%
runwait, cmd.exe /c %makeBack%,,Hide, pid
RetryBackground:
ifNotExist, %A_ScriptDir%\fUn\background.bmp
{
Random, randNum, 10, 99
Random, randNum2, 1000, 9999
Random, randNum3, 1, 30
Random, randNum4, 10, 99
Random, randNum5, 1000, 9999
Random, randint, 1, % Array.MaxIndex()
Codec := Array[randint]
Array2 := ["%randNum2%", "%randNum%"]
Random, randint, 1, % Array2.MaxIndex()
RANDUMB1 := Array2[randint]
makeBack :=
(
"ffmpeg -ss %randNum3% -f lavfi -i testsrc2=s=640x360 -f avi -q:v 0 -vcodec %Codec% -frames 1 -vf eq=contrast=-1 outpls.fuk -y && chexr outpls.fuk %randNum4% %RANDUMB1% bentpls.fuk && ffmpeg -f avi -i bentpls.fuk %A_ScriptDir%\fUn\background.bmp -y"
)
transform, RANDUMB1, Deref, %RANDUMB1%
transform, makeBack, Deref, %makeBack%
;;;msgbox, RETRYING`nCodec=%Codec%`nHex Target=%randNum4%`nHex Replace=%RANDUMB1% ;Display Codec and Hex Values at startup
runwait, cmd.exe /c %makeBack%,,Hide, pid
ifNotExist, %A_ScriptDir%\fUn\background.bmp
{
gosub, RetryBackground
return ; need this return here for bug issues
}
}
FileDelete, %A_ScriptDir%\outpls.fuk
FileDelete, %A_ScriptDir%\bentpls.fuk
;Make ComboBox arrays, fuk u Skitty my indentation looks pretty
ArrayListIndex := 0
loop, read, fUn\vcodecs.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList0 = %A_Index%
}
Loop,%ArrayList0%
List .= ArrayList%A_Index% . "|"
ArrayListIndex := 1
loop, read, fUn\acodecs.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList1 = %A_Index%
}
Loop,%ArrayList1%
List2 .= ArrayList%A_Index% . "|"
ArrayListIndex := 2
loop, read, fUn\adecoders.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList2 = %A_Index%
}
Loop,%ArrayList2%
List3 .= ArrayList%A_Index% . "|"
ArrayListIndex := 3
loop, read, fUn\pixfmts.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList3 = %A_Index%
}
Loop,%ArrayList3%
List4 .= ArrayList%A_Index% . "|"
ArrayListIndex := 4
loop, read, fUn\pixfmts.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList4 = %A_Index%
}
Loop,%ArrayList4%
List5 .= ArrayList%A_Index% . "|"
ArrayListIndex := 5
loop, read, fUn\vdecoders.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList5 = %A_Index%
}
Loop,%ArrayList5%
List6 .= ArrayList%A_Index% . "|"
ArrayListIndex := 6
loop, read, fUn\soxfx.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList6 = %A_Index%
}
Loop,%ArrayList6%
List7 .= ArrayList%A_Index% . "|"
ArrayListIndex := 7
loop, read, fUn\afilters.txt
{
ArrayList%A_Index% := A_LoopReadLine
ArrayList7 = %A_Index%
}
Loop,%ArrayList7%
List8 .= ArrayList%A_Index% . "|"
; if advapi32\MD5Init doesnt exist use a native Binary function instead. (For Window 10 Issues, although it seems Windows 10 supports this MD5 function now???)
data = %A_Sec%%A_Min%%A_Hour%
makefilename := MD5(data,StrLen(data))
MD5( ByRef V, L=0 ) {
VarSetCapacity( MD5_CTX,104,0 ), DllCall( "advapi32\MD5Init", Str,MD5_CTX )
DllCall( "advapi32\MD5Update", Str,MD5_CTX, Str,V, UInt,L ? L : VarSetCapacity(V) )
DllCall( "advapi32\MD5Final", Str,MD5_CTX )
Loop % StrLen( Hex:="123456789ABCDEF0" )
N := NumGet( MD5_CTX,87+A_Index,"Char"), MD5 .= SubStr(Hex,N>>4,1) . SubStr(Hex,N&15,1)
if ErrorLevel {
msgbox, `n(This may be unstable)`nOh shiet you're on windows 10?`n(Or you're missing Windows MD5 shit)`nFalling back to Binary filename method.
;if (Var > 2) Break, BinaryPls
;goSub BinaryPls
global ActivateBinaryVar = 1 ;THIS IS THE SWEET SPOT FOR ENABLING BINARY FILENAME SYSTEM, if not manually i guess.
}
else
Return MD5
}
;THIS BE THE BINARY FUNCTIONZ
TxtToBin(txt) {
Loop Parse, txt
Loop 2
bin := bin (Asc(A_LoopField) >> (2 - A_Index) & 1)
StringTrimLeft, bin, bin, 10
global makefilename = bin
Return Bin
}
;Process, Close, ffmpeg.exe ;close backgound image glitching process
Process, Close, %pid% ;close backgound image glitching process
;Process, Close, cmd.exe ;close backgound image glitching process
Process, Close, chexr.exe ;close backgound image glitching process
Gui, Color, %GuiColor%
clipboardnew = "%clipboard%" ;convert clipboard into a dynamic variable and then apply transform to start GUI with clipboard input
transform, clipboardnew, Deref, %clipboardnew%
InputBox, UserInput, m̶̨̙̖̻͉̦̅̄̈͐̐͌Ë̸̱̣̹͖͎̅̓̀̆̃͠m̶̜͓̲̀̿̍͐̚E̵̐͠, UPDATE CLIPBOARD WITH DESIRED INPUT AND RESTART...`nBackground Image Variables:`nCodec=%Codec%`nHex Target=%randNum4%`nHex Replace=%RANDUMB1%, , x400 y357 w70 h70,,,,,,-i %clipboardnew%
Gui, Add, Button, x8 y360 w38 h30 gPlayMyStream,ffplay
Gui, Add, Button, x8 y399 w38 h40 gSendMyStream,stream
Gui, Add, Button, x585 y390 w53 h22 gPreviewPls,pReViEw
Gui, Add, Button, x592 y362 w38 h22 gInput,Input
Gui, Add, ComboBox, x478 y357 w100 h88 vDecoderchoice Choose140, %List6%
Gui, Add, ComboBox, x378 y357 w110 h88 vEncoderchoice Choose66, %List%
Gui, Add, Text, +BackgroundTrans x404 y389 w190 h20 , Video Encoders && Decoders
Gui, Add, Text, +BackgroundTrans x122 y389 w170 h20 , Audio Decoders && Encoders
Gui, Add, ComboBox, x200 y357 w115 h88 vADecoderchoice Choose157, %List3%
Gui, Add, ComboBox, x110 y357 w100 h88 vAEncoderchoice Choose68, %List2%
Gui Add, Picture, x-1 y-13 w659 h340 +BackgroundTrans , %A_ScriptDir%\fUn\background.bmp
Gui Add, Picture, x-11 y-12 w659 h325 +BackgroundTrans, %A_ScriptDir%\fUn\overlay.png
Gui, Show,,WARNING!!! MAY CAUSE SEIZURES HEARING LOSS AND MENTAL ILLNESS!!! :'D ;Gui Bug Fix
Gui, +Resize +MinSize666x462 +MaxSize666x462 ;Gui Bug Fix
WinMove, WARNING!!! MAY CAUSE SEIZURES HEARING LOSS AND MENTAL ILLNESS!!! :'D,,, , 10,10 ;Gui Bug Fix
Gui, Add, Button, x326 y367 w40 h20 gSaveMe,Save
;Gui, Add, Button, x356 y367 w40 h20 gPreset,Pre
Gui, Add, Button, x302 y387 w90 h40 gChoose,[DEPRICATED]`nMore Soon
Gui, Add, Button, x325 y427 w40 h15 gLocalGlitch,LOCAL
Gui, Add, Button, x77 y361 w8 h52 gAudioAndVideoSonification,KMS
Gui, Add, Button, x32 y342 w52 h14 gMultiChannel,MULTI
Gui, Add, CheckBox, x2 y342 w10 h14 vDebugVar gEnableDebugMode, test
Gui, Add, CheckBox, x2 y330 w10 h14 vEnableCleanUpModeVar gEnableCleanUpMode, test
Gui, Add, CheckBox, x15 y330 w10 h14 vEnableBinaryVar gEnableBinaryMode, test
Gui, Add, Button, x57 y361 w8 h52 gUDPOverload,PLS
Gui, Add, Button, x97 y361 w8 h52 gSaveIt,SAVE
Gui, Add, ComboBox, x53 y418 w68 h88 vPixfmt Choose29, %List4%
Gui, Add, ComboBox, x578 y418 w68 h88 vPixfmtdec Choose29, %List5%
Gui, Add, Edit, x410 y409 w140 h20 vDecoderSetting,-ar 4000 -af volume=0.5
Gui, Add, Edit, x132 y409 w150 h20 vEncoderSetting,-ar 8000 -f avi -s 640x360
gosub GetPresetWindow
goto wao
Return
BinaryPls:
;DOITVAR = BinaryPls
BinArray = A,B,C,D,E,F,G,H,I,J,K,L,N,M,O,P,Q,R,S,T,U,V,W,X,Y,Z,1,2,3,4,5,6,7,8,9
Sort, BinArray, Random D,
BinStr := RegExReplace(BinArray, ",")
Text = %BinStr%
Bin := TxtToBin(Text)
makefilename := TxtToBin(Text)
return
EnableCleanUpMode:
GuiControlGet, EnableCleanUpModeVar
if (EnableCleanUpModeVar = 0) {
msgbox, Clean Up Mode Disabled!
}
else {
}
if (EnableCleanUpModeVar = 1) {
msgbox, Clean Up Mode Enabled!
}
else {
;no
}
return
MakeNewFolder:
array = A,B,C,D,E,F,G,H,I,J,K,L,N,M,O,P,Q,R,S,T,U,V,W,X,Y,Z,1,2,3,4,5,6,7,8,9
Sort, array, Random D,
mystr := RegExReplace(array, ",")
StringTrimLeft, RandyNums, mystr, 20
NewFolder := "OUTPUT/%DirectoryVal%/%RandyNums%" ;;ADDED GLOBAL HERE WARNING
transform, NewFolder, Deref, %NewFolder%
{
;WinGetPos X, Y, Width, Height, A
MaxX := A_ScreenWidth - 550
MaxY := A_ScreenHeight - 90
Splashimage,,b w600 h50 x%MaxX% y%MaxY% CWsilver m9 b fs10 zh0,New Folder Is: %NewFolder%
;msgbox, New Folder Is: %NewFolder%
sleep, 500
}
splashimage,off
return
EnableDebugMode:
GuiControlGet, DebugVar
BatchCommand := ""
transform, BatchCommand, Deref, %BatchCommand%
commandval := "msgbox, WAOOOO!!!!!!"
if (DebugVar = 0) {
BatchCommand := ""
;IsBatch := ""
msgbox, Debug Mode Disabled!
}
else {
}
if (DebugVar = 1) {
;IsBatch := "echo"
;BatchCommand := " > run.bat"
msgbox, Debug Mode Enabled!
global comb := "up|down|down|left|right|left|right|b|a|enter"
}
else {
;no
}
return
EnableBinaryMode:
GuiControlGet, EnableBinaryVar
if (EnableBinaryVar = 0) {
ActivateBinaryVar = 0
msgbox, Binary Filename Mode Disabled!
}
else {
}
if (EnableBinaryVar = 1) {
ActivateBinaryVar = 1
msgbox, Binary Filename Mode Enabled!
}
else {
;no
}
return
OpenLocation:
Destination := StrReplace(NewFolder, "/", "\")
ExpPath := "%A_ScriptDir%\%Destination%"
transform, ExpPath, Deref, %ExpPath%
if !(hWnd := WinExist(ExpPath)) ; Fixes issue with too many explorer windows being opened <3
run, % "explorer.exe /e," ExpPath,,,pid3
else
{
WinGet MMX, MinMax, ahk_id %hWnd%
if (hWnd = WinExist("A"))
WinClose, ahk_id %hWnd%
else
{
if (MMX = -1)
WinMaximize, ahk_id %hWnd%
if (MMX = 1)
WinMinimize, ahk_id %hWnd%
if (MMX = 0)
WinActivate, ahk_id %hWnd%
}
}
If (WinExist("<3"))
{
WinWait, OUTPUT
WinSet, AlwaysOnTop,, OUTPUT,
sleep, 500
WinActivate, OUTPUT
}
return
EnableAudio:
if (AudioVar = 0) {
AttemptAudio := ""
Gui, Submit, Nohide
}
else {
AttemptAudio := "ffplay -vn %UserInput%"
transform, AttemptAudio, Deref, %AttemptAudio%
msgbox, %AttemptAudio%
}
Gui, Submit, Nohide
return
wao:
{
#IfWinActive, WARNING!!! MAY CAUSE SEIZURES HEARING LOSS AND MENTAL ILLNESS!!
~up::
Loop, parse, comb, |
{
input, var,T.900,{%a_loopfield%}
if inStr(ErrorLevel, "Timeout")
return
}
msgbox, You Must Construct Additional Pylons...
gosub pls
return
}
#IfWinActive
pls:
loop {
random, RanNumb, 1000, 999999
gui 1:color, %RanNumb%
gui 2:color, %RanNumb%
gui 3:color, %RanNumb%
gui 4:color, %RanNumb%
gui 5:color, %RanNumb%
gui 6:color, %RanNumb%
gui 7:color, %RanNumb%
gui 8:color, %RanNumb%
gui 9:color, %RanNumb%
gui 10:color, %RanNumb%
gui 11:color, %RanNumb%
gui 12:color, %RanNumb%
gui 13:color, %RanNumb%
gui wao:color, %RanNumb%
;GuiControl,,aDecSmplr8, %aDecSmplr8%
sleep, 100
}
return
SaveIt:
Gui,Submit, Nohide
Run, cmd.exe
sleep, 666
Send, ffmpeg -vcodec %Decoderchoice% -an -i udp://127.0.0.1:1337?overrun_nonfatal=1 -vcodec ffvhuff -f avi -y fUn/ayylmao.avi -f nut - | ffplay - {Enter}
return
LocalGlitch:
Gui, Submit, Nohide
SendStream := " %NewerInput% -vcodec %Encoderchoice% -acodec %AEncoderchoice% -vf format=%Pixfmt% %EncoderSetting% - | "
transform, SendStream, Deref, %SendStream%
PlayStream := "ffplay -vcodec %Decoderchoice% -acodec %ADecoderchoice% -vf format=%Pixfmtdec% %DecoderSetting% -i - "
transform, PlayStream, Deref, %PlayStream%
extension = gif
;;;AllowLoop := ""
IfInString, UserInput, %extension% ; check if file extension is gif, if so use alternate loop option
{
loopit := "-ignore_loop 0"
Run, cmd.exe /k "ffmpeg %loopit% %SendStream%%PlayStream%"
}
else {
loopit := ""
Run, cmd.exe /k "ffmpeg %loopit% %SendStream%%PlayStream%"
}
sleep, 88
AppendMePls = `nffmpeg %SendStream%%PlayStream%`n
transform, AppendMePls, Deref, %AppendMePls%
Fileappend,%AppendMePls%,fUn\debug\log.txt
return
PlayMyStream:
Gui,Submit, Nohide
PlayStream := "ffplay -vcodec %Decoderchoice% -acodec %ADecoderchoice% -vf format=%Pixfmtdec% %DecoderSetting% -i udp://127.0.0.1:1337?overrun_nonfatal=1"
transform, PlayStream, Deref, %PlayStream%
Run, cmd.exe
sleep, 666
Send, %PlayStream% {Enter}
return
SendMyStream:
Gui,Submit, Nohide
SendStream := "ffmpeg -re %UserInput% -vcodec %Encoderchoice% -acodec %AEncoderchoice% -vf format=%Pixfmt% %EncoderSetting% udp://127.0.0.1:1337"
transform, SendStream, Deref, %SendStream%
Run, cmd.exe
sleep, 666
Send, %SendStream% {Enter}
return
PreviewPls:
Gui,Submit, Nohide
extension = gif
AllowLoop := "-loop 0"
IfInString, UserInput, %extension% ; check if file extension is gif, if so use alternate loop option
{
Gui,Submit, Nohide
AllowLoop := "-ignore_loop 0"
Run, cmd.exe /k "ffplay %AllowLoop% %NewerInput%"
;newinput3 := UserInput ; this might also cause bug!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
else {
Run, cmd.exe /k "ffplay %AllowLoop% %NewerInput%"
}
return
; Added native file browser, input flag and double quotes for filenames with spaces in them
Input:
Gui, Submit, Nohide
FileSelectFile, UserInput
Plusss := chr(43)
AddFFMpegInputFlagToCommand := "-i "
;UserInput := StrReplace(UserInput, "!", "{!}")
UserInput := StrReplace(UserInput, "`+", Plusss)
;UserInput := StrReplace(UserInput, "-", "{-}")
NewerInput = %AddFFMpegInputFlagToCommand%%Quote%%UserInput%%Quote%
GuiControl, 3:, aEncParam, -ss 00:00:00 ;Reset Audio Encoder Param to avoid duration conflict
GuiControl, 3:, vEncParam, -ss 00:00:00 ;Reset Video Encoder Param to avoid duration conflict
Gui, 13:Destroy ; quick fix for closing the "Sauce" input windows.
;GuiControlGet, PlsNoNewFolderVar,13:, PlsNoNewFolder
iniWrite, %PlsNoNewFolder%, Configuration.ini, NoNewFolder , PlsNoNewFolderVar ;quick fix to save a checkbox config
return
SaveMe:
AppendMe = `n%SendStream%`n%PlayStream%`n`n
transform, AppendMe, Deref, %AppendMe%
Fileappend,%AppendMe%,fUn\debug\log.txt
Gui,Submit, Nohide
msgbox, Saved to output/log.txt
return
Choose:
Gui,Submit, Nohide
MsgBox,
(
Video Decoder = %Decoderchoice%
Video Encoder = %Encoderchoice%
Audio Decoder = %ADecoderchoice%
Audio Encoder = %AEncoderchoice%
Encoder Params = %EncoderSetting%
Decoder Params = %DecoderSetting%
Encoder Pixel Format = %Pixfmt%
Decoder Pixel Format = %Pixfmtdec%
)
return
AudioAndVideoSonification:
{
DirectoryVal = SonifyBatch
gosub MakeNewFolder
FileCreateDir, OUTPUT\SonifyBatch
FileCreateDir, %NewFolder%
}
{
DirectoryVal = SonifyVideo
gosub MakeNewFolder
FileCreateDir, OUTPUT\SonifyVideo
FileCreateDir, %NewFolder%
}
{
DirectoryVal = SonifyAudioBatch
gosub MakeNewFolder
FileCreateDir, OUTPUT\SonifyAudioBatch
FileCreateDir, %NewFolder%
}
{
DirectoryVal = SonifyAudio
gosub MakeNewFolder
FileCreateDir, OUTPUT\SonifyAudio
FileCreateDir, %NewFolder%
}
Gui,Submit, Nohide
Gui, 3:Color, %GuiColor%, -caption
Gui, 3:Add, Button, gFugvideo x302 y279 w130 h60 , fUcKiNg dO iT
; Fixed ComboBox default values
Gui, 3:Add, ComboBox, x42 y239 w130 h500 VvCompressor Choose68, %List%
Gui, 3:Add, ComboBox, x42 y199 w130 h500 VAencodercodec Choose55, %List2%
Gui, 3:Add, ComboBox, x302 y239 w130 h500 vBentAcodec Choose55, %List2%
Gui, 3:Add, ComboBox, x302 y199 w130 h500 vBentVcodec Choose68, %List%
Gui, 3:Add, Edit, x302 y259 w130 h20 vAFilters , -af flanger,flanger
Gui, 3:Add, Edit, x42 y259 w130 h20 VvFilters , -vf vflip`,hflip
; removed sample rate boxes for now
Gui, 3:Add, Edit, x42 y219 w130 h20 VaEncParam , -ss 00:00:00
Gui, 3:Add, Edit, x302 y219 w130 h20 VvEncParam, -ss 00:00:00
; Modified Boxes
Gui, 3:Add, Edit, x432 y279 w40 h20 vOutputFmt , -f u8
Gui, 3:Add, Edit, x432 y199 w40 h20 VInputFmt , -f u8
Gui, 3:Add, Edit, x2 y199 w40 h20 VEncFmt , -f u8
Gui, 3:Add, Edit, x2 y279 w40 h20 VDecFmt , -f u8
Gui, 3:Add, Text, x52 y169 w100 h30 , Audio Bending Here
Gui, 3:Add, Text, x322 y169 w100 h30 , Video Bending Here
Gui, 3:Add, Button, gFugAudio x42 y279 w130 h60 , fUcKiNg dO iT
; Added gInput here
Gui, 3:Add, Button, gInput x2 y219 w40 h60 gInputa, Sauce
Gui, 3:Add, Button, x432 y219 w40 h60 gInputv,Sauce
Gui, 3:Add, ComboBox, x192 y209 w90 h500 VEffect1 Choose31, %List7%
Gui, 3:Add, Edit, x182 y229 w110 h20 VFXParam1 , -n 9001
Gui, 3:Add, Text, x212 y189 w40 h20 , SOX FX
Gui, 3:Add, ComboBox, x192 y249 w90 h500 VEffect2 , %List7%
Gui, 3:Add, Edit, x182 y269 w110 h20 VFXParam2 , ;0.8 0.88 60 0.4
Gui, 3:Add, Edit, x182 y309 w110 h20 VFXParam3 , ;17
Gui, 3:Add, ComboBox, x192 y289 w90 h500 VEffect3 , %List7%
; Added Volume Slider
Gui, 3:Add, Slider, x62 y359 w100 h20 Tooltip VFugAudioVol TickInterval2 Range0-10, 1
Gui, 3:Add, Text, x2 y339 w60 h20 , Sample R8
Gui, 3:Add, Slider, x312 y339 w100 h20 Tooltip VvDecSmplr8 TickInterval2 Range666-88100, 8000
Gui, 3:Add, Slider, x312 y359 w100 h20 , 25
Gui, 3:Add, Text, x422 y339 w60 h20 , Sample R8
Gui, 3:Add, Slider, x62 y339 w100 h20 Tooltip VaDecSmplr8 TickInterva500 Range1000-199999, 44100
Gui, 3:Add, Text, x2 y359 w60 h20 , Volume
Gui, 3:Add, Text, x422 y359 w60 h20 , Volume
Gui, 3:Add, Button, x2 y142 w40 h35 gPLSBATCH2, batch
Gui, 3:Add, Button, x2 y177 w40 h22 gSaveFugAudio,Save
Gui, 3:Add, Button, x432 y177 w40 h22 gSaveFugVideo,Save
Gui, 3:Add, Button, x197 y137 w65 h20 gGetResolution, Get Res
Gui, 3:Add, Edit, x197 y159 w80 h20 VGlobalRes , -s 640x360
Gui, 3:Add, Button, x264 y137 w13 h13 gSwapRes,
Gui, 3:Add, Button, x432 y142 w40 h35 gPLSBATCH, batch
Gui, 3:Add, Checkbox, right x412 y115 w60 h23 0x80 vBatchMatchResVar, Match Res?
Gui, 3:Add, Checkbox, right x396 y90 h23 0x80 vFullSCreenVar gIsFullscreen, Fullscreen?
Gui, 3:Add, GroupBox, x12 y9 w440 h60 , *notices GUI* oWo Wats This?~
Gui, 3:Add, Text, x32 y29 w410 h30 , Pretty much a groovy way to kinda trick ffmpeg to sonify video`, compress audio data with video codecs`, process audio with video effects`, etc in real time... (and with SOX)
Gui, 3:Add, Button, x282 y249 w10 h20 , ?
Gui, 3:Add, Button, x182 y249 w10 h20 gFrei0rPreset1, ?
; Added Channel Count
Gui, 3:Add, ComboBox, x2 y319 w40 h200 vChanCount2 Choose2, 1|2|3|4|5||6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
Gui, 3:Add, ComboBox, x2 y299 w40 h200 vChanCount1 Choose2, 1|2|3|4|5||6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
Gui, 3:Add, ComboBox, x432 y299 w40 h200 vChanCount4 Choose3, 1|2|3|4|5||6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
Gui, 3:Add, ComboBox, x432 y319 w40 h200 vChanCount3 Choose3, 1|2|3|4|5||6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
;Added Checkbox for SOX
Gui, 3:Add, Checkbox, x195 y330 w102 h12 vSoxVar gEnableSox, Enable Sox?
Gui, 3:Add, Checkbox, x195 y342 w102 h12 vNibbleVar gEnableNibble, Reverse Nibbles?
Gui, 3:Add, Checkbox, x195 y354 w102 h12 vBitVar gEnableBits, Reverse Bits?
Gui, 3:Add, Button, gBack2 x2 y379 w470 h10 , bAcKBaCkbAcKBacKbAcKBaCkbAcKBaCkbAcKBacKbAcKBaCkbAcKBaCkbAcKBacKbAcK
Gui, 3:Add, GroupBox, x192 y122 w90 h65 , Global Resolution
Gui, 3:Add, ComboBox, x177 y99 h500 vLePixFmtIn Choose4, %list4%
Gui, 3:Add, ComboBox, x177 y77 h500 vLePixFmtOut Choose4, %list4%
Gui, 3:Show, x328 y144 h395 w477, ITSHAPPENINGITSHAPPENINGITSHAPPENINGITSHAPPENINGITSHAPPENINGITSHAPPENINGITSHAPPENING
Gui, 3:-Sysmenu
Gui, 1:Hide
gosub GetPresetWindow
Return
Frei0rPreset1:
Gui, Submit, Nohide
GuiControl,, vFilters, -vf frei0r=pixeliz0r:0.002:0.002
return
Inputv:
DirectoryVal = SonifyVideo
iniRead, NoNewFolder, Configuration.ini, NoNewFolder, PlsNoNewFolderVar
IsNewFolder = MakeNewFolder
if (NoNewFolder = 1)
{
IsNewFolder = no
}
gosub %IsNewFolder%
FileCreateDir, OUTPUT\SonifyVideo
FileCreateDir, %NewFolder%
Gui, Submit, Nohide
clipboardnew = -i "%clipboard%" ;convert clipboard into a dynamic variable and then apply transform to start GUI with clipboard input
transform, clipboardnew, Deref, %clipboardnew%
Gui, 13:Add, Edit, x5 y36 w358 h24 vInputVvar, %clipboardnew%
Gui, 13:Add, Button, x68 y65 w70 h24 gInput, Select File
Gui, 13:Add, Button, x247 y65 w54 h24 gDefaultInputV, Default
Gui, 13:Add, Checkbox, x145 y65 vPlsNoNewFolder,Disable`nNew Folder
GuiControl, 13:, PlsNoNewFolder, %NoNewFolder%
Gui, 13:Add, Text, x5 y5 w358 h27, Pls Use -i And Enter Input File Path 4 Now...
OnMessage(0x100, "OnKeyDown")
OnKeyDown(wParam)
{
if (A_Gui = 13 && wParam = 13) ;Close GUI after hitting ENTER Key
{
Gui, Submit, Nohide
GuiControlGet, InputVvar
GuiControlGet, IsANewFolder,13:, PlsNoNewFolder
global NewerInput = InputVvar
iniWrite, %IsANewFolder%, Configuration.ini, NoNewFolder , PlsNoNewFolderVar ;quick fix to save a checkbox config
Gui, 13:Destroy
}
}
Gui, 13:Show, w368 h96,
Return
DefaultInputV:
Gui, Submit, Nohide
GuiControl,, InputVvar, -f lavfi -i testsrc2=s=640x360
iniWrite, %PlsNoNewFolder%, Configuration.ini, NoNewFolder , PlsNoNewFolderVar ;quick fix to save a checkbox config
Return
Inputa:
Gui, Submit, Nohide
DirectoryVal = SonifyAudio
iniRead, NoNewFolder, Configuration.ini, NoNewFolder, PlsNoNewFolderVar
IsNewFolder = MakeNewFolder
if (NoNewFolder = 1)
{
IsNewFolder = no
}
gosub %IsNewFolder%
FileCreateDir, OUTPUT\SonifyAudio
FileCreateDir, %NewFolder%
Gui, Submit, Nohide
clipboardnew = -i "%clipboard%" ;convert clipboard into a dynamic variable and then apply transform to start GUI with clipboard input
transform, clipboardnew, Deref, %clipboardnew%
Gui, 13:Add, Edit, x5 y36 w358 h24 vInputAvar, %clipboardnew%
Gui, 13:Add, Button, x68 y65 w70 h24 gInput, Select File
Gui, 13:Add, Button, x247 y65 w54 h24 gDefaultInputA, Default
Gui, 13:Add, Checkbox, x145 y65 vPlsNoNewFolder,Disable`nNew Folder
GuiControl, 13:, PlsNoNewFolder, %NoNewFolder%
Gui, 13:Add, Text, x5 y5 w358 h27, Pls Use -i And Enter Input File Path 4 Now...
OnMessage(0x100, "OnKeyDown2")
OnKeyDown2(wParam)
{
if (A_Gui = 13 && wParam = 13) ;Close GUI after hitting ENTER Key
{
Gui, Submit, Nohide
GuiControlGet, InputAvar
GuiControlGet, IsANewFolder,13:, PlsNoNewFolder
global NewerInput = InputAvar
iniWrite, %IsANewFolder%, Configuration.ini, NoNewFolder , PlsNoNewFolderVar ;quick fix to save a checkbox config
Gui, 13:Destroy
}
}
Gui, Submit, Nohide
Gui, 13:Show, w368 h96
Return
DefaultInputA:
Gui, Submit, Nohide
GuiControl,, InputAvar, -f lavfi -i "sine=frequency=55:sample_rate=888:duration=30"
Return
Back2:
Gui, 1:Show
Gui, 3:Destroy
gosub, GetPresetWindow
Return
UDPOverload:
Gui, 2:Color, %GuiColor%, -caption
Gui, 2:Add, Button, gBack x2 y16 w20 h410 , bAcKBaCkbAcKBacKbAcKBaCkbAcKBaCkbAcKBacKbAcKBaCkbAcKBaCkbAcKBacKbAcKBaCk
Gui, 2:Add, Button, gUDP4 x442 y9 w90 h30 , DO IT
Gui, 2:Add, Button, gUDP3 x332 y9 w90 h30 , DO IT
Gui, 2:Add, Button, gUDP2 x222 y9 w90 h30 , DO IT
Gui, 2:Add, Button, gUDP1 x112 y9 w90 h30 , DO IT
Gui, 2:Add, Edit, x332 y39 w90 h20 vUDPvset3, -b:v 8888 -f avi
Gui, 2:Add, Edit, x222 y39 w90 h20 vUDPvset2, -b:v 8888 -f avi
Gui, 2:Add, Edit, x112 y39 w90 h20 vUDPvset1, -b:v 8888 -f avi
Gui, 2:Add, Edit, x442 y39 w90 h20 vUDPvset4, -b:v 8888 -f avi
Gui, 2:Add, ComboBox, x112 y59 w90 h20 vUDPvcodec1 Choose9, %List%
Gui, 2:Add, ComboBox, x222 y59 w90 h21 vUDPvcodec2 Choose10, %List%
Gui, 2:Add, ComboBox, x332 y59 w90 h21 vUDPvcodec3 Choose11, %List%
Gui, 2:Add, ComboBox, x442 y59 w90 h21 vUDPvcodec4 Choose12, %List%
Gui, 2:Add, Edit, x442 y79 w90 h20 vUDPaset4, -af volume=0.5
Gui, 2:Add, ComboBox, x442 y99 w90 h21 vUDPacodec1 Choose17, %List2%
Gui, 2:Add, Edit, x332 y79 w90 h20 vUDPaset3, -af volume=0.5
Gui, 2:Add, ComboBox, x332 y99 w90 h21 vUDPacodec2 Choose18, %List2%
Gui, 2:Add, Edit, x222 y79 w90 h20 vUDPaset2, -af volume=0.5
Gui, 2:Add, ComboBox, x222 y99 w90 h21 vUDPacodec3 Choose19, %List2%
Gui, 2:Add, Edit, x112 y79 w90 h20 vUDPaset1, -af volume=0.5
Gui, 2:Add, ComboBox, x112 y99 w90 h21 vUDPacodec4 Choose20, %List2%
Gui, 2:Add, Button, gUDP8 x442 y149 w90 h30 , DO IT
Gui, 2:Add, Button, gUDP7 x332 y149 w90 h30 , DO IT
Gui, 2:Add, Button, gUDP6 x222 y149 w90 h30 , DO IT
Gui, 2:Add, Button, gUDP5 x112 y149 w90 h30 , DO IT
Gui, 2:Add, Edit, x442 y179 w90 h20 vUDPvset5, -b:v 8888 -f avi
Gui, 2:Add, ComboBox, x442 y199 w90 h20 vUDPvcodec5 Choose13, %List%
Gui, 2:Add, Edit, x442 y219 w90 h20 vUDPaset8, -af volume=0.5
Gui, 2:Add, ComboBox, x442 y239 w90 h21 vUDPacodec5 Choose20, %List2%
Gui, 2:Add, Edit, x332 y179 w90 h20 vUDPvset6, -b:v 8888 -f avi
Gui, 2:Add, ComboBox, x332 y199 w90 h21 vUDPvcodec6 Choose14, %List%
Gui, 2:Add, Edit, x332 y219 w90 h20 vUDPaset7, -af volume=0.5
Gui, 2:Add, ComboBox, x332 y239 w90 h21 vUDPacodec6 Choose20, %List2%
Gui, 2:Add, Edit, x222 y179 w90 h20 vUDPvset7, -b:v 8888 -f avi
Gui, 2:Add, Edit, x222 y219 w90 h20 vUDPaset6, -af volume=0.5
Gui, 2:Add, ComboBox, x222 y199 w90 h21 vUDPvcodec7 Choose15, %List%
Gui, 2:Add, ComboBox, x222 y239 w90 h21 vUDPacodec7 Choose20, %List2%
Gui, 2:Add, Edit, x112 y179 w90 h20 vUDPvset8, -b:v 8888 -f avi
Gui, 2:Add, ComboBox, x112 y199 w90 h21 vUDPvcodec8 Choose16, %List%
Gui, 2:Add, Edit, x112 y219 w90 h20 vUDPaset5, -af volume=0.5
Gui, 2:Add, ComboBox, x112 y239 w90 h20 vUDPacodec8 Choose20, %List2%
Gui, 2:Add, GroupBox, x162 y279 w290 h140 , oWo Wats This?
Gui, 2:Add, Text, x172 y309 w270 h90 , Spawn multiple FFMpeg instances that stream your stuff to udp://127.0.0.1:1337. Try mixing different codecs and formats into eachother for rad results :') -f nut`, -f rawvideo`, -f alaw`, or -f mulaw may help if -f avi breaks or fails
; im gay lol
Gui, 2:-Sysmenu
Gui, 2:Show,W555 h444 , HERE COME DAT BOI... O SHIT WADDUP??!?!?!!!???!??!?!!!?!??!?!?!!?!?!??!?!??!?!!!?!?!?!??!?!!!??!??!?!?!?!?!?!
Return
Back:
Gui, 1:Show
Gui, 2:Destroy
Return
EnableNibble:
Gui, Submit, Nohide
GuiControlGet, NibbleVar
if (NibbleVar = 0) {
GibNibble =
}
else {
}
if (NibbleVar = 1) {
GibNibble = --reverse-nibbles
}
else {
;no
}
return
EnableBits:
Gui, Submit, Nohide
GuiControlGet, BitVar
if (BitVar = 0) {
GibBit =
}
else {
}
if (BitVar = 1) {
GibBit = --reverse-bits
}
else {
;no
}
return
EnableSox:
GuiControlGet, SoxVar
if SoxVar = 0
AllowSox := ""
else
AllowSox := "| sox -V1 -t raw -b 8 --encoding unsigned-integer -c 1 -r 44.1k - -b 8 --encoding unsigned-integer -c 1 -t raw %GibNibble% %GibBit% - %Effect1% %FXParam1% %Effect2% %FXParam2% %Effect3% %FXParam3%"
; This transform option here allows variables within this local string
transform, AllowSox, Deref, %AllowSox%
Gui,Submit, Nohide
return
FugVideo:
Gui, Submit, Nohide
extension = gif
NewerInput := StrReplace(NewerInput, "{!}", "!")
IfInString, NewerInput, %extension% ; check if file extension is gif, if so use alternate loop option
{
loopit := "-ignore_loop 0"
}
else {
loopit := ""
}
gosub EnableSox
gosub, EnableSox ;DONT FORGET ABOUT THESE HANDY FUNCTIONS, FIXED CHECKBOX BUG
transform, AllowSox, Deref, %AllowSox%
Run, %ComSpec%,,,pid2
sleep, 666
Sendraw, ffmpeg %loopit% %NewerInput% %vEncParam% -f rawvideo -c:v %BentVcodec% -pix_fmt %LePixFmtIn% %GlobalRes% - %AllowSox% | ffmpeg %InputFmt% -ar %vDecSmplr8% -ac %ChanCount4% -i - %GlobalRes% -codec %BentAcodec% %AFilters% %OutputFmt% -ac %ChanCount3% -ar %vDecSmplr8% - | ffplay -f rawvideo %GlobalRes% -pix_fmt %LePixFmtOut% -i - %IsFS%
sleep, 60
Send, {Enter}
return
SaveFugVideo:
Gui,Submit, Nohide
gosub EnableSox
data = %A_Sec%%A_Min%%A_Hour%
makefilename := MD5(data,StrLen(data))
;NewerInput := StrReplace(NewerInput, "{+}", "+") ;OLD METHOD
sfv := "ffmpeg %NewerInput% %vEncParam% -f rawvideo -c:v %BentVcodec% -pix_fmt %LePixFmtIn% %GlobalRes% - %AllowSox% | ffmpeg %InputFmt% -ar %vDecSmplr8% -ac %ChanCount4% -i - %GlobalRes% -codec %BentAcodec% %AFilters% %OutputFmt% -ac %ChanCount3% -ar %vDecSmplr8% - | ffmpeg -f rawvideo %GlobalRes% -pix_fmt %LePixFmtOut% -i - -c:v h263p -q:v 0 -y %NewFolder%/%makefilename%.avi %NewFolder%/%makefilename%.gif"
if NewerInput contains png,jpg,bmp,tiff,jpeg,targa,xwd
{
msgbox, Image Input Detected!
transform, AllowSox, Deref, %AllowSox%
sfv := "ffmpeg %NewerInput% %vEncParam% -f rawvideo -c:v %BentVcodec% -pix_fmt %LePixFmtIn% %GlobalRes% - %AllowSox% | ffmpeg %InputFmt% -ar %vDecSmplr8% -ac %ChanCount4% -i - %GlobalRes% -codec %BentAcodec% %AFilters% %OutputFmt% -ac %ChanCount3% -ar %vDecSmplr8% - | ffmpeg -f rawvideo %GlobalRes% -pix_fmt %LePixFmtOut% -i - -y %NewFolder%/%makefilename%.bmp"
}
else
transform, AllowSox, Deref, %AllowSox%
transform, sfv, Deref, %sfv%
;Gui,Submit, Nohide
Runwait, %ComSpec% /c %sfv%,,,pid2
AppendMe1 = %sfv%`n`n
Fileappend,%AppendMe1%,fUn\debug\log.txt
gosub OpenLocation
return
PLSRESBB:
;msgbox, fuckme it worked
ffprobe := "ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 %ALF% | clip"
transform, ffprobe, Deref, %ffprobe%
runwait, %ComSpec% /c %ffprobe%
StringReplace, clipboard, clipboard, `r`n, %A_Space%, All ;Remove linebreak from clipboard
NewRes = `-s %clipboard%
transform, NewRes, Deref, %NewRes%
Return
PLSRESBB2:
;msgbox, fuckme it worked
ffprobe := "ffprobe %aEncParam% -i %Quote%%ALF%%Quote% -show_entries format=duration -v quiet -of csv=s=x:p=0 | clip"
transform, ffprobe, Deref, %ffprobe%
msgbox, %ffprobe%
runwait, %ComSpec% /c %ffprobe%
StringReplace, clipboard, clipboard, `r`n, %A_Space%, All ;Remove linebreak from clipboard
Duration := clipboard
size := (Duration*705)
msgbox, %size% Size!
width := (size/24)
width := floor(width)
msgbox, %width% Width!
height = 1000
NewRes = `-s %width%x%height%
transform, NewRes, Deref, %NewRes%
msgbox, %NewRes% New
Return
PLSBATCH:
Gui,Submit, Nohide
if (BatchMatchResVar = 0) {
NewRes = %GlobalRes%
transform, NewRes, Deref, %NewRes%
MatchRes = no
}
if (BatchMatchResVar = 1) {
MatchRes = PLSRESBB
msgbox, Matching input/output resolution with original files!
PercentVar = `%
}
else
#EscapeChar `
PercentVar = `%
Gui, Submit, Nohide
DirectoryVal = SonifyBatch
gosub MakeNewFolder
FileCreateDir, OUTPUT\SonifyBatch
FileCreateDir, %NewFolder%
Percent = `%
FileSelectFolder, leFolder,,3 ; select the input folder
if errorlevel {
msgbox, You Didnt Select Anything lol
return
}
gosub EnableSox
data = %A_Sec%%A_Min%%A_Hour%
makefilename := MD5(data,StrLen(data))
;ButtonCancel:
;GuiEsscape:
;Gui, hide
;return
Loop,%leFolder%\*.*,0,1
{
global ALF = A_LoopFileFullPath
SplitPath, ALF, name, dir, ext, name_no_ext, drive
transform, ALF, Deref, %ALF%
If RegExMatch(ext,"(jpg|png|tiff|targa|xwd|bmp|tga|jpeg|apng|svg|pdf|txt)")
{
gosub %MatchRes%
;msgbox, IMAGE INPUT DETECTED :0
global ext = ext
BatchCommand := "ffmpeg -i %ALF% %vEncParam% -f rawvideo -c:v %BentVcodec% -pix_fmt %LePixFmtIn% -frames 1 %NewRes% - %AllowSox% | ffmpeg %InputFmt% -ar %vDecSmplr8% -ac %ChanCount4% -i - %NewRes% -codec %BentAcodec% %AFilters% %OutputFmt% -ac %ChanCount3% -ar %vDecSmplr8% - | ffmpeg -f rawvideo %NewRes% -pix_fmt %LePixFmtOut% -i - -y %Quote%%A_ScriptDir%/%NewFolder%/%name_no_ext%.bmp%Quote%"
transform, ALF, Deref, %ALF%
transform, AllowSox, Deref, %AllowSox%
transform, BatchCommand, Deref, %BatchCommand%
Splashimage,,b w600 h50 x100 Y400 CWsilver m9 b fs10 zh0,Sonifying Image...`n%name_no_ext%
runwait,%comspec% /c %BatchCommand%
AppendMe1 = %BatchCommand%`n`n
Fileappend,%AppendMe1%,fUn\debug\log.txt
Splashimage,off
}
If RegExMatch(ext,"(webm|gif|avi|nut|mkv|wmv)")
{
gosub %MatchRes%
global ext = ext
BatchCommand := "ffmpeg -i %ALF% %vEncParam% -f rawvideo -c:v %BentVcodec% -pix_fmt %LePixFmtIn% %NewRes% - %AllowSox% | ffmpeg %InputFmt% -ar %vDecSmplr8% -ac %ChanCount4% -i - %NewRes% -codec %BentAcodec% %AFilters% %OutputFmt% -ac %ChanCount3% -ar %vDecSmplr8% - | ffmpeg -f rawvideo %NewRes% -pix_fmt %LePixFmtOut% -i - -y %Quote%%A_ScriptDir%/%NewFolder%/%name_no_ext%.%ext%%Quote%"
transform, ALF, Deref, %ALF%
transform, AllowSox, Deref, %AllowSox%
transform, BatchCommand, Deref, %BatchCommand%
Splashimage,,b w600 h50 x100 Y400 CWsilver m9 b fs10 zh0,Sonifying Video...`n%name_no_ext%
runwait,%comspec% /c %BatchCommand%
AppendMe1 = %BatchCommand%`n`n
Fileappend,%AppendMe1%,fUn\debug\log.txt
Splashimage,off
}
}
if ErrorLevel {
msgbox, fuck you did it now, didnt you?
}
gosub OpenLocation
return
PLSBATCH2:
Gui,Submit, Nohide
if (BatchMatchResVar = 0) {
NewRes = %GlobalRes%
transform, NewRes, Deref, %NewRes%
MatchRes = no
}
if (BatchMatchResVar = 1) {
MatchRes = PLSRESBB2