Jump to content

zPlayer - My own little audio/video player


CYCho
 Share

Go to solution Solved by TheXman,

Recommended Posts

I do not believe that any handler is involved when accessing the properties of a file.  Shell.Application is just a programmatic version of File Explorer if you allow me the comparaison.  With the exact same properties, the file extension should not change speed of access.

Link to comment
Share on other sites

I particularly use MediaInfo.dll to get the data I need from audio and video files and it works well for me with all audio and video extensions.

Link to comment
Share on other sites

26 minutes ago, Nine said:

Did you try on another computer ?

I tried on my laptop, a little slower than my desktop, and it takes even longer. Even among MP4 files, there seem to be considerable variations depending on files. Generally file size of 1 GB seems to be about the borderline, even though some larger files take far shorter time than some smaller ones.

 

18 minutes ago, argumentum said:

It's probable ( in my mind ) that the handler/dll for MKV is better than the MP4 one.

It's a good point. My take-away lesson is M4 files are not friendly to GetDetailsOf() function.

Thanks to both of you for your attention.

Link to comment
Share on other sites

13 minutes ago, Belini said:

I particularly use MediaInfo.dll to get the data I need from audio and video files and it works well for me with all audio and video extensions.

Thanks for sharing the information. My zPlayer was meant to be a small player without 3rd party dependency, and I would lkie to keep it that way if at all possible.

Link to comment
Share on other sites

I guess then there is an unknown issue with that particular mp4 file.  Did you try to locate which one of the properties is taking a long time to obtain ?  Instead of getting all 327 video properties, try to get only a few, see if that change access speed.

FWIW, I tested my script against multiple video ext files with various length, I even changed extensions from .avi to .mp4, .wmv to .mkv, etc, and accessing all 327 properties take equally about 250 ms.  In your case, 1.5 sec is very long compare to what I observed.

Edited by Nine
Link to comment
Share on other sites

3 minutes ago, Nine said:

Did you try to locate which one of the properties is taking a long time to obtain ? 

I also thought abou it and I tried 1 to 100, 101 to 200, and 201 to 300 items and each 100 items took about the same time. I didn't test individually yet. I must go to bed now because I have a golf appoinment tomorrow. I will come back as soon as possible.

Link to comment
Share on other sites

Posted (edited)
18 hours ago, Nine said:

Did you try to locate which one of the properties is taking a long time to obtain ?

I used the following code to measure the time taken by each property.

; File name: GetDetailsOf_Time_Comparison.au3
#include <Array.au3>
#include <File.au3>

Global $aInfo[329][6]
$aInfo[0][0] = "Index"
$aInfo[0][1] = "Property Name"
$aInfo[0][2] = "MP4 Property Value"
$aInfo[0][3] = "MP4 Time"
$aInfo[0][4] = "MKV Property Value"
$aInfo[0][5] = "MKV Time"

$oShellApp = ObjCreate("shell.application")

Global $sFileName, $sDir, $oDir, $oFile
Global $sPath = "E:\Movies\다이하드\Die Hard 1990 1080p.mp4.mkv"
$sFileName = StringMid($sPath, StringInStr($sPath, "\", 0, -1)+1)
$sDir = StringLeft($sPath, StringInStr($sPath, "\", 0, -1))
$oDir = $oShellApp.NameSpace($sDir)
$oFile = $oDir.Parsename($sFileName)

For $i = 0 To 326
    $sPropertyName = $oDir.GetDetailsOf("", $i)
    $aInfo[$i+1][0] = $i
    $aInfo[$i+1][1] = $sPropertyName
Next

_FileProperties(1)

$sPath = "E:\Movies\다이하드\Die Hard 1990 1080p.mp4"
$sFileName = StringMid($sPath, StringInStr($sPath, "\", 0, -1)+1)
$sDir = StringLeft($sPath, StringInStr($sPath, "\", 0, -1))
$oDir = $oShellApp.NameSpace($sDir)
$oFile = $oDir.Parsename($sFileName)

_FileProperties(2)

_ArrayDisplay($aInfo)

$sFile = FileOpen("GetDetailsOf_Time_Comparison.csv", 2+32)
FileWriteLine($sFile, "Index,Property Name,MP4 Property Value,MP4 Time,MKV Property Value,MKV Time")
For $i = 1 To 328
    $sLine = $aInfo[$i][0] & ',"' & $aInfo[$i][1] & '","' & $aInfo[$i][2] & '",' & $aInfo[$i][3] & ',"' & $aInfo[$i][4] & '",' & $aInfo[$i][5]
    FileWriteLine($sFile, $sLine)
Next
FileClose($sFile)

Func _FileProperties($pass)
    Local $hh = TimerInit()
    For $i = 0 To 326
        If $aInfo[$i+1][1] == "" Then ContinueLoop
        Local $h = TimerInit()
        $sPropertyValue = $oDir.GetDetailsOf($oFile, $i)
        If $pass = 1 Then
            $aInfo[$i+1][4] = $sPropertyValue
            $aInfo[$i+1][5] = TimerDiff($h)
        Else
            $aInfo[$i+1][2] = $sPropertyValue
            $aInfo[$i+1][3] = TimerDiff($h)
        EndIf
    Next
    If $pass = 1 Then
        $aInfo[328][5] = TimerDiff($hh)
    Else
        $aInfo[328][3] = TimerDiff($hh)
    EndIf
EndFunc     ;==>_FileProperties

Below is the result in CSV format.

Index,Property Name,MP4 Property Value,MP4 Time,MKV Property Value,MKV Time
0,"이름","Die Hard 1990 1080p.mp4",3.0631,"Die Hard 1990 1080p.mp4.mkv",7.8614
1,"크기","1.78GB",0.056,"1.78GB",0.0907
2,"항목 유형","MP4 Video File",0.9114,"Matroska Video File",0.9655
3,"수정한 날짜","2023-12-27 08:28",0.0372,"2023-12-27 08:28",1.337
4,"만든 날짜","2024-01-03 12:28",0.0784,"2023-12-27 08:25",0.0371
5,"액세스한 날짜","2024-01-03 12:29",0.0244,"2023-12-27 14:21",0.0334
6,"특성","AP",0.0149,"A",0.0217
7,"오프라인 상태","",76.4595,"",41.0655
8,"사용 가능성","",63.8677,"",9.7971
9,"인식 유형","비디오",73.8957,"비디오",11.7257
10,"소유자","DESKTOP-MAIN\CYCho",65.4929,"DESKTOP-MAIN\CYCho",12.2532
11,"종류","비디오",66.1417,"비디오",15.065
12,"찍은 날짜","",66.8936,"",13.582
13,"참여 음악가","",65.685,"",12.5167
14,"앨범","",72.008,"",10.0275
15,"연도","",66.7872,"",9.3085
16,"장르","",69.8391,"",10.0227
17,"지휘자","",69.3105,"",9.9945
18,"태그","",67.0479,"",9.9224
19,"등급","등급이 지정되지 않음",65.7666,"등급이 지정되지 않음",9.687
20,"만든 이","",73.1121,"",9.7518
21,"제목","",63.2458,"",9.5898
22,"주제","",60.7488,"",9.5796
23,"범주","",65.2308,"",9.5324
24,"설명","",70.6327,"",9.5423
25,"저작권","",74.6807,"",9.6648
26,"#","",65.9636,"",9.4747
27,"길이","02:03:21",70.2474,"02:03:21",9.5933
28,"비트 전송률","‎88kbps",68.7755,"‎88kbps",10.3432
29,"보호","아니요",63.4952,"",10.2576
30,"카메라 모델","",68.5612,"",9.8769
31,"사진 크기","",61.114,"",10.0885
32,"카메라 제조업체","",67.7801,"",10.2135
33,"회사","",69.3818,"",10.0224
34,"파일 설명","",68.4443,"",13.3698
35,"마스터 키워드","",63.794,"",12.7912
36,"마스터 키워드","",63.4306,"",10.1146
37,"","",,"",
38,"","",,"",
39,"","",,"",
40,"","",,"",
41,"","",,"",
42,"프로그램 이름","",64.002,"",11.4839
43,"지속 기간","",66.6222,"",9.3855
44,"온라인 상태","",71.5746,"",9.5498
45,"되풀이","",62.6805,"",9.1524
46,"위치","",65.7317,"",9.3323
47,"선택 참석자 주소","",63.5121,"",9.0928
48,"선택 참석자","",64.8234,"",9.3032
49,"이끌이 주소","",61.6177,"",9.2805
50,"이끌이 이름","",66.735,"",9.1113
51,"미리 알림 시간","",71.9525,"",9.4305
52,"필수 참석자 주소","",71.2276,"",9.3093
53,"필수 참석자","",67.5435,"",9.5913
54,"리소스","",66.1239,"",11.4626
55,"모임 상태","",61.9019,"",9.5407
56,"상태 표시","",65.3456,"",9.2457
57,"전체 크기","931GB",71.622,"931GB",9.4841
58,"계정 이름","",67.0149,"",9.1253
59,"","",,"",
60,"작업 상태","",63.4415,"",9.3919
61,"컴퓨터","DESKTOP-MAIN(이 PC)",67.8289,"DESKTOP-MAIN(이 PC)",10.5241
62,"기념일","",61.6693,"",9.9737
63,"비서 이름","",61.6833,"",9.4866
64,"비서 전화 번호","",63.7605,"",9.3556
65,"생일","",61.295,"",9.134
66,"근무처 주소","",68.8477,"",9.5392
67,"구/군/시(회사)","",61.6676,"",9.1888
68,"회사 국가/영역","",68.8696,"",9.5012
69,"회사 사서함","",68.3125,"",9.548
70,"우편 번호(회사)","",65.4922,"",9.4482
71,"회사 시/도","",62.4667,"",13.0864
72,"주소(회사)","",63.2268,"",9.5925
73,"회사 팩스","",70.9158,"",9.2095
74,"회사 홈 페이지","",68.9231,"",9.4724
75,"근무처 전화","",66.875,"",10.9388
76,"콜백 번호","",69.6263,"",9.5345
77,"카폰","",63.6595,"",9.4001
78,"자녀","",64.5019,"",10.8072
79,"회사 대표 전화","",62.3915,"",11.7146
80,"부서","",62.1256,"",9.389
81,"전자 메일","",72.4972,"",9.6485
82,"전자 메일2","",64.5475,"",9.5321
83,"전자 메일3","",65.3645,"",9.768
84,"전자 메일 목록","",69.7917,"",9.9103
85,"전자 메일 표시 이름","",65.0327,"",10.1346
86,"다음으로 파일","",63.3795,"",10.2868
87,"연락처 이름","",63.3803,"",10.0825
88,"전체 이름","",65.1382,"",10.0032
89,"성별","",65.8866,"",9.9956
90,"연락처 이름","",75.4915,"",10.1797
91,"취미","",65.7989,"",10.201
92,"집 주소","",62.6339,"",9.4476
93,"구/군/시(집)","",70.9951,"",11.1712
94,"집 국가/영역","",63.4265,"",9.9033
95,"집 사서함","",70.5791,"",11.1873
96,"우편 번호(집)","",64.2293,"",10.7294
97,"집 시/도","",63.6011,"",9.5518
98,"주소(집)","",68.3227,"",9.2741
99,"집 팩스","",66.0305,"",11.5422
100,"집 전화","",63.5334,"",10.0834
101,"IM 주소","",70.2093,"",10.3911
102,"이니셜","",66.4064,"",11.3268
103,"직함","",61.9372,"",10.2147
104,"레이블","",69.6138,"",9.763
105,"성","",61.2334,"",9.4688
106,"우편 주소","",64.0243,"",9.4355
107,"중간 이름","",67.2798,"",9.1791
108,"이동 전화","",73.4792,"",11.5796
109,"애칭","",62.7271,"",9.513
110,"사무실 위치","",66.4542,"",9.1749
111,"기타 주소","",66.2637,"",11.3687
112,"다른 도시","",71.218,"",9.3352
113,"다른 국가/지역","",61.4879,"",9.1717
114,"다른 사서함","",69.9389,"",9.5329
115,"다른 우편 번호","",64.1962,"",10.0145
116,"다른 시/도","",67.5299,"",10.7699
117,"다른 주소","",73.5658,"",9.2538
118,"호출기","",66.3716,"",9.6562
119,"영문 호칭","",64.1731,"",11.1321
120,"구/군/시","",70.7043,"",9.5631
121,"국가/지역","",69.3363,"",9.3379
122,"사서함","",65.442,"",9.2061
123,"우편 번호","",63.5363,"",9.2782
124,"시/도","",70.5661,"",9.1407
125,"주소","",69.8573,"",9.1968
126,"기본 전자 메일 주소","",64.4557,"",9.2992
127,"기본 전화","",63.855,"",9.137
128,"직업","",65.9622,"",9.4307
129,"배우자/파트너","",63.5273,"",9.1886
130,"접미사","",68.0115,"",9.4191
131,"TTY/TTD 전화","",64.1319,"",9.3816
132,"텔렉스","",71.4298,"",9.4641
133,"웹 페이지","",64.1562,"",11.552
134,"콘텐츠 상태","",64.4208,"",9.2983
135,"콘텐츠 형식","",70.8671,"",9.3537
136,"취득한 날짜","",62.0448,"",11.2232
137,"보관된 날짜","",61.3057,"",10.6195
138,"완료 날짜","",63.9444,"",11.0514
139,"장치 범주","",62.7956,"",9.3071
140,"연결됨","",65.9427,"",9.3251
141,"검색 방법","",68.3272,"",9.1541
142,"이름","",61.1547,"",11.5516
143,"로컬 컴퓨터","",65.5262,"",9.3145
144,"제조업체","",61.3745,"",9.1114
145,"모델","",67.2367,"",11.4738
146,"쌍으로 연결됨","",63.2704,"",10.8106
147,"분류","",64.8881,"",9.4152
148,"상태","",62.1156,"",9.5486
149,"상태","",69.7845,"",9.4084
150,"클라이언트 ID","",66.0062,"",9.2375
151,"도와주신 분들","",72.9267,"",11.4985
152,"콘텐츠 작성 날짜","",63.4297,"",10.6301
153,"마지막으로 인쇄한 날짜","",63.8918,"",9.7706
154,"마지막으로 저장한 날짜","",70.3922,"",9.514
155,"국(부서)","",65.296,"",9.4799
156,"문서 ID","",63.3009,"",9.1663
157,"페이지","",69.7306,"",9.4904
158,"슬라이드","",64.1981,"",10.0827
159,"총 편집 시간","",68.7433,"",10.5364
160,"단어 수","",63.4717,"",9.254
161,"기한","",66.0095,"",9.6836
162,"끝 날짜","",62.7865,"",10.7244
163,"파일 수","",60.9437,"",9.2977
164,"파일 확장명",".mp4",61.3148,".mkv",9.1845
165,"파일 이름","Die Hard 1990 1080p.mp4",60.8845,"Die Hard 1990 1080p.mp4.mkv",9.711
166,"파일 버전","",69.354,"",11.0528
167,"플래그 색","",66.155,"",9.9178
168,"플래그 상태","",70.6768,"",10.5646
169,"사용 가능한 공간","102GB",65.3372,"102GB",10.8464
170,"","",,"",
171,"","",,"",
172,"그룹","",68.2991,"",9.9193
173,"공유 유형","",68.85,"",9.6184
174,"비트 수준","",66.3164,"",9.5241
175,"수평 해상도","",66.7444,"",9.3398
176,"너비","",67.6489,"",9.7862
177,"수직 해상도","",64.9049,"",11.481
178,"높이","",68.7388,"",9.74
179,"중요도","",68.1132,"",11.3455
180,"첨부 파일임","",61.2173,"",9.6144
181,"삭제됨","",63.3175,"",10.0681
182,"암호화 상태","",63.9474,"",10.2945
183,"플래그 있음","",70.6822,"",9.2647
184,"완료됨","",66.7306,"",9.6512
185,"완료 안 됨","",62.4843,"",10.7295
186,"읽음 상태","",64.9979,"",12.3298
187,"공유됨","아니요",67.7799,"아니요",21.4677
188,"작성자","",64.4937,"",9.2522
189,"날짜","",67.9154,"",9.3224
190,"폴더 이름","다이하드",74.3761,"다이하드",9.2371
191,"파일 위치","E:\Movies\다이하드",66.5978,"E:\Movies\다이하드",9.289
192,"폴더","다이하드(E:\Movies)",68.5235,"다이하드(E:\Movies)",9.3764
193,"참가자","",66.4261,"",9.1438
194,"경로","E:\Movies\다이하드\Die Hard 1990 1080p.mp4",69.6194,"E:\Movies\다이하드\Die Hard 1990 1080p.mp4.mkv",11.6428
195,"위치별","",66.0242,"",9.4489
196,"유형","MP4 Video File",65.454,"Matroska Video File",9.5248
197,"연락처","",67.2693,"",11.4546
198,"저널 항목 유형","",64.139,"",10.3201
199,"언어","",65.5853,"",10.2308
200,"열어본 날짜","",65.0431,"",11.7812
201,"주석","",73.8948,"",11.4894
202,"연결 상태","해결되지 않음",65.8393,"해결되지 않음",9.5095
203,"링크 대상","",66.2288,"",9.262
204,"URL","",72.316,"",9.3306
205,"","",,"",
206,"","",,"",
207,"","",,"",
208,"미디어 작성 날짜","‎2012-‎09-‎08 ‏‎02:05",66.9502,"‎2012-‎09-‎08 ‏‎03:05",9.2127
209,"릴리스 날짜","",66.023,"",9.3105
210,"인코딩한 사람","",68.6279,"",9.2729
211,"에피소드 번호","",63.129,"",9.144
212,"제작자","",64.798,"",9.3502
213,"게시자","",65.8145,"",9.3358
214,"시즌 번호","",61.0541,"",11.2713
215,"자막","",69.4433,"",10.9902
216,"사용자 웹 URL","",65.3315,"",9.3713
217,"작사가","",70.5091,"",9.2218
218,"","",,"",
219,"첨부 파일들","",72.4973,"",11.5857
220,"숨은 참조 주소","",64.2834,"",10.3279
221,"숨은 참조","",68.7803,"",10.6102
222,"참조 주소","",66.3922,"",10.2814
223,"참조","",71.0713,"",9.3916
224,"대화 ID","",68.4893,"",9.5443
225,"받은 날짜","",66.8852,"",9.6008
226,"보낸 날짜","",66.3187,"",9.9353
227,"보낸 사람 주소","",63.5641,"",9.8016
228,"보낸 사람","",64.1802,"",9.7825
229,"첨부 파일 있음","",72.2602,"",9.8196
230,"발신자 주소","",71.1541,"",11.0937
231,"발신자 이름","",64.1907,"",11.4096
232,"저장소","",68.853,"",9.6478
233,"받는 사람 주소","",64.8478,"",9.4361
234,"할 일 제목","",61.4642,"",9.506
235,"받는 사람","",68.6809,"",9.4074
236,"진행 정도","",64.3285,"",9.4651
237,"앨범 음악가","",62.7039,"",9.5955
238,"앨범 음악가 정렬","",72.1842,"",9.4843
239,"앨범 ID","",68.0971,"",9.6631
240,"앨범 정렬","",62.301,"",9.6007
241,"참여 음악가 정렬","",68.5039,"",9.4862
242,"분당 비트 수","",67.1253,"",9.2863
243,"작곡가","",65.5905,"",9.2626
244,"작곡가 정렬","",63.1017,"",9.1265
245,"디스크","",65.9176,"",9.3124
246,"초기 키","",65.2333,"",9.1561
247,"컴파일의 일부","",63.4994,"",9.3699
248,"분위기","",64.5523,"",9.2429
249,"집합의 일부","",62.0423,"",9.1361
250,"기간","",71.5526,"",9.4293
251,"색","",69.6342,"",9.5343
252,"자녀 보호 등급","",73.7988,"",10.8649
253,"자녀 보호 등급 근거","",68.6094,"",9.6855
254,"사용된 공간","‎89%",60.7829,"‎89%",9.8941
255,"EXIF 버전","",62.1634,"",9.6183
256,"이벤트","",73.6646,"",9.7706
257,"노출 바이어스","",64.7031,"",9.4198
258,"노출 프로그램","",62.6725,"",9.3935
259,"노출 시간","",68.2474,"",9.3458
260,"F-스톱","",63.0021,"",9.1225
261,"플래시 모드","",62.6467,"",11.4244
262,"초점 거리","",65.9691,"",9.4339
263,"35mm 초점 거리","",64.0305,"",9.0988
264,"ISO 감도","",65.4129,"",9.2702
265,"렌즈 제조업체","",74.9223,"",9.2294
266,"렌즈 모델","",63.7962,"",9.1861
267,"광원","",70.8937,"",9.5745
268,"조리개 최대 개방","",74.8533,"",9.144
269,"측광 모드","",66.952,"",11.31
270,"방향","",67.8962,"",11.2443
271,"피플","",66.3064,"",11.5814
272,"프로그램 모드","",66.5268,"",9.3333
273,"채도","",63.0115,"",9.7355
274,"피사체 거리","",68.4801,"",9.3938
275,"화이트 밸런스","",65.3569,"",9.2068
276,"우선 순위","",62.4139,"",9.3184
277,"프로젝트","",68.227,"",9.0864
278,"채널 번호","",62.3944,"",9.3021
279,"에피소드 이름","",69.9127,"",9.3273
280,"자막","",69.995,"",9.1345
281,"다시 실행","",61.2097,"",9.2985
282,"SAP","",70.7932,"",9.104
283,"브로드캐스트 날짜","",65.1338,"",11.1369
284,"프로그램 설명","",70.7243,"",9.322
285,"녹음/녹화 시간","",68.6934,"",9.0625
286,"방송국 호출 부호","",72.4872,"",9.3028
287,"방송국 이름","",65.0355,"",9.3085
288,"요약","",67.6469,"",9.0658
289,"짧은 요약","",68.2816,"",9.2817
290,"자동 요약","",70.7561,"",9.0439
291,"정확도","",62.8296,"",9.5115
292,"파일 소유권","",62.8391,"",9.2063
293,"우편물 종류","",70.4059,"",9.069
294,"공유 사용자","",72.594,"",12.7789
295,"공유 상태","공유 안 됨",71.584,"공유 안 됨",12.1245
296,"","",,"",
297,"제품 이름","",64.9751,"",9.3411
298,"제품 버전","",75.2943,"",9.4842
299,"지원 링크","",63.3756,"",9.6396
300,"원본","",64.8945,"",9.2387
301,"시작 날짜","",65.6941,"",9.4464
302,"공유","",67.4388,"",10.7705
303,"가용성 상태","",67.8588,"",10.1281
304,"상태","",71.6115,"",13.4537
305,"대금 청구 정보","",63.4004,"",9.4688
306,"완료","",72.9123,"",9.3607
307,"작업 소유자","",73.4447,"",9.1814
308,"제목 정렬","",74.4474,"",9.2437
309,"전체 파일 크기","",66.2521,"",9.1478
310,"등록 상표","",63.836,"",9.5705
311,"비디오 압축","{34363248-0000-0010-8000-00AA00389B71}",65.3131,"",10.0136
312,"감독","",61.5243,"",9.9249
313,"데이터 속도","‎1982kbps",65.1799,"‎1982kbps",9.3746
314,"프레임 높이","812",64.5847,"812",9.3505
315,"프레임 속도","‎23.98 프레임/초",65.8575,"‎23.98 프레임/초",9.0811
316,"프레임 너비","1920",62.4838,"1920",11.3384
317,"구면","아니요",65.2535,"",9.3673
318,"스테레오","아니요",66.1184,"",9.0702
319,"비디오 방향","0",64.9827,"",9.3539
320,"총 비트 전송률","‎2071kbps",62.7506,"‎2071kbps",9.1045
321,"Audio tracks","",64.2929,"AAC 2.0",9.609
322,"Bit depth","",70.1327,"",9.4931
323,"Contains chapters","",65.6889,"",9.1074
324,"Content compression","",61.8522,"",9.3283
325,"Subtitles","",70.0341,"",9.3835
326,"Subtitle tracks","",68.8548,"",9.1669
,"","",20445.7826,"",3096.7007

FYI, MKV file is the exact copy of MP4 file with ".mkv" added in the file name. As you can see, an MP4 file takes much more time for the simple reason that its extension is MP4.

18 hours ago, Nine said:

1.5 sec is very long compare to what I observed

It may have something to do with the CPU clock speed. Mine is AMD Ryzen 5 3400G with Radeon Vega Graphics, 3.70 GHz.

Conclusion: As major chunk of time is spent to obtain empty or useless property values, I decided to query only about 25 items, thus shortening the time to about 250 ms (1.5 seconds even for a large MP4 file). I can live with that. One thing I feel uncomfortable is that the index numbers I use in Windows 10 and 11 may not work in older versions of Windows. For example, I use index number 27 to get media length, but I am not sure if 27 is valid under Windows Vista. At least I learned something valuable during the last couple of days. Thank you all for your inputs.

Edited by CYCho
Link to comment
Share on other sites

Take a look
https://github.com/microsoft/Windows-Dev-Performance/issues/20

reading your post, this morning I did something similar, here it is :)
 

Spoiler
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#include <Array.au3>
#include <FileConstants.au3>
#include <String.au3>
#include <File.au3>


;~ Global $aFileInfo = _PropertiesListToArray("D:\Music\Bob Marley", "*.mp3;*.wma", "20, 14, 26, 21, 16, 28", 1)
;~ _ArrayDisplay($aFileInfo, "$aFileInfo")

Global $aFileInfo = _PropertiesListToArray("F:\Movies\_New\_New films", "*.mp4;*.mkv;*.avi;*.flv", "1, 27, 196, 316, 314, 315, 320, 349, 355", 1)
_ArrayDisplay($aFileInfo, "$aFileInfo")


;~ Global $aFileInfo1 = _FileProperties("D:\Music\Bob Marley\A Rebel's Dream\01 Erykah Badu - No More Trouble.mp3")
;~ Global $aFileInfo1 = _FileProperties("E:\OBS_REC\2023-02-11 18-47-06.mkv")
;~ _ArrayDisplay($aFileInfo1)

; #FUNCTION# ----------------------------------------------------------------------------
; Name...........: _PropertiesListToArray()
; Description ...: Lists files from specified path with Ext properties
; Syntax.........: _PropertiesListToArray($sFolderPath [, $sMask = "*" [, $sGetDetailsOf = "1, 2, 3, 4, 6" [, $iRecur = 0]])
; Parameters ....: $sFolderPath   - Initial path used to generate filelist.
;                : $sMask         - [optional] Filter for result. Multiple filters must be separated by ";"
;                : $sGetDetailsOf - [optional] The Column of properties to return
;                : $iRecur        - [optional] 0=Do not search in subfolders ,1=Search in all subfolders
; Return value...: 2D Array
; Author ........: ioa747
; Notes .........:
;----------------------------------------------------------------------------------------
Func _PropertiesListToArray($sFolderPath, $sMask = "*", $sGetDetailsOf = "1, 2, 3, 4, 6", $iRecur = 0)
    Local $hTimer = TimerInit()
    Local $oShell = ObjCreate("Shell.Application")
    Local $oDir = $oShell.Namespace($sFolderPath)
    Local $aFiles = _FileListToArrayRec($sFolderPath, $sMask, $FLTAR_FILES, $iRecur, $FLTAR_FASTSORT, $FLTAR_FULLPATH)
    If @error Then
        Local $sError = "Path not found or invalid;Invalid Include parameter;Invalid Exclude parameter;"
        $sError &= "Invalid Exclude_Folders parameter;Invalid $iReturn parameter;Invalid $iRecur parameter;"
        $sError &= "Invalid $iSort parameter;Invalid $iReturnPath parameter;No files/folders found"
        Local $aErr = StringSplit($sError, ";", 2)
        ToolTip($aErr[@extended] & @CRLF & " ", @DesktopWidth / 4, @DesktopHeight / 2, "Error:", 2)
        Sleep(4000)
        ToolTip("")
        Return SetError(1, @extended, "")
    EndIf
    Local $aColumns = StringSplit($sGetDetailsOf, ", ", 1)
    Local $aData[$aFiles[0] + 1][1]

    For $i = 1 To $aColumns[0]
        _ArrayColInsert($aData, $i)
        $aData[0][$i] = $oDir.GetDetailsOf($oDir.Items, $aColumns[$i])
    Next

    $aData[0][0] = UBound($aData) - 1

    Local $sDir, $sFileName, $oFile, $sStr

    For $i = 1 To $aFiles[0]
        $sDir = StringLeft($aFiles[$i], StringInStr($aFiles[$i], "\", 0, -1))
        $sFileName = StringMid($aFiles[$i], StringInStr($aFiles[$i], "\", 0, -1) + 1)
        $aData[$i][0] = $aFiles[$i]
        $oDir = $oShell.NameSpace($sDir)
        $oFile = $oDir.Parsename($sFileName)
        For $c = 1 To $aColumns[0]
            $aData[$i][$c] = $oDir.GetDetailsOf($oFile, $aColumns[$c])
        Next
        ToolTip($sStr & @CRLF & " ", @DesktopWidth / 4, @DesktopHeight / 2, "Progress:")
;~      ToolTip($sStr & @CRLF & _StringRepeat(" ", 100 ), @DesktopWidth / 4, @DesktopHeight / 2, "Progress: " & $sFileName)
        $sStr &= "|"
    Next

    ConsoleWrite($aFiles[0] & " files processed in: " & Round(TimerDiff($hTimer) / 1000, 3) & " seconds " & @LF)
    ToolTip("")
    Return $aData

EndFunc   ;==>_PropertiesListToArray
;----------------------------------------------------------------------------------------

; #FUNCTION# ----------------------------------------------------------------------------
; Name...........: _FileProperties()
; Description ...: Lists files Ext properties from file
; Syntax.........: _FileProperties($sPath)
; Parameters ....: $sPath   - The path of source file
; Return value...: 2D Array with Ext properties
; Author ........: CYCho
; Notes .........:
;----------------------------------------------------------------------------------------
Func _FileProperties($sPath)
    Local $hTimer = TimerInit()
    Local $aFileInfo = ""
    Local $oShellApp = ObjCreate("shell.application")
    Local $sFileName, $sDir, $oDir, $oFile, $sPropertyName, $sPropertyValue
    $sFileName = StringMid($sPath, StringInStr($sPath, "\", 0, -1) + 1)
    $sDir = StringLeft($sPath, StringInStr($sPath, "\", 0, -1))
    $oDir = $oShellApp.NameSpace($sDir)
    $oFile = $oDir.Parsename($sFileName)
    Dim $aFileInfo[1][3]
    $aFileInfo[0][0] = "ID"
    $aFileInfo[0][1] = $oDir.GetDetailsOf("", 0)
    $aFileInfo[0][2] = $oDir.GetDetailsOf($oFile, 0)
    For $i = 1 To 400
        $sPropertyName = $oDir.GetDetailsOf("", $i)
        If $sPropertyName <> "" Then
            ;ConsoleWrite("[" & $i & "] = " & $sPropertyName & @CRLF)
            $sPropertyValue = $oDir.GetDetailsOf($oFile, $i)
            If $sPropertyValue <> "" Then
                _ArrayAdd($aFileInfo, $i & "|" & $sPropertyName & "|" & $sPropertyValue)
            EndIf
        EndIf
    Next
    ConsoleWrite("processed in: " & Round(TimerDiff($hTimer) / 1000, 3) & " seconds " & @LF)
    Return $aFileInfo
EndFunc   ;==>_FileProperties
;----------------------------------------------------------------------------------------

#cs iColumn
    [0] = Name
    [1] = Size
    [2] = Item type
    [3] = Date modified
    [4] = Date created
    [5] = Date accessed
    [6] = Attributes
    [7] = Offline status
    [8] = Availability
    [9] = Perceived type
    [10] = Owner
    [11] = Kind
    [12] = Date taken
    [13] = Contributing artists
    [14] = Album
    [15] = Year
    [16] = Genre
    [17] = Conductors
    [18] = Tags
    [19] = Rating
    [20] = Authors
    [21] = Title
    [22] = Subject
    [23] = Categories
    [24] = Comments
    [25] = Copyright
    [26] = #
    [27] = Length
    [28] = Bit rate
    [29] = Protected
    [30] = Camera model
    [31] = Dimensions
    [32] = Camera maker
    [33] = Company
    [34] = File description
    [35] = Masters keywords
    [36] = Masters keywords
    [42] = Program name
    [43] = Duration
    [44] = Is online
    [45] = Is recurring
    [46] = Location
    [47] = Optional attendee addresses
    [48] = Optional attendees
    [49] = Organizer address
    [50] = Organizer name
    [51] = Reminder time
    [52] = Required attendee addresses
    [53] = Required attendees
    [54] = Resources
    [55] = Meeting status
    [56] = Free/busy status
    [57] = Total size
    [58] = Account name
    [60] = Task status
    [61] = Computer
    [62] = Anniversary
    [63] = Assistant's name
    [64] = Assistant's phone
    [65] = Birthday
    [66] = Business address
    [67] = Business city
    [68] = Business country/region
    [69] = Business P.O. box
    [70] = Business postal code
    [71] = Business state or province
    [72] = Business street
    [73] = Business fax
    [74] = Business home page
    [75] = Business phone
    [76] = Callback number
    [77] = Car phone
    [78] = Children
    [79] = Company main phone
    [80] = Department
    [81] = E-mail address
    [82] = E-mail2
    [83] = E-mail3
    [84] = E-mail list
    [85] = E-mail display name
    [86] = File as
    [87] = First name
    [88] = Full name
    [89] = Gender
    [90] = Given name
    [91] = Hobbies
    [92] = Home address
    [93] = Home city
    [94] = Home country/region
    [95] = Home P.O. box
    [96] = Home postal code
    [97] = Home state or province
    [98] = Home street
    [99] = Home fax
    [100] = Home phone
    [101] = IM addresses
    [102] = Initials
    [103] = Job title
    [104] = Label
    [105] = Last name
    [106] = Mailing address
    [107] = Middle name
    [108] = Cell phone
    [109] = Nickname
    [110] = Office location
    [111] = Other address
    [112] = Other city
    [113] = Other country/region
    [114] = Other P.O. box
    [115] = Other postal code
    [116] = Other state or province
    [117] = Other street
    [118] = Pager
    [119] = Personal title
    [120] = City
    [121] = Country/region
    [122] = P.O. box
    [123] = Postal code
    [124] = State or province
    [125] = Street
    [126] = Primary e-mail
    [127] = Primary phone
    [128] = Profession
    [129] = Spouse/Partner
    [130] = Suffix
    [131] = TTY/TTD phone
    [132] = Telex
    [133] = Webpage
    [134] = Content status
    [135] = Content type
    [136] = Date acquired
    [137] = Date archived
    [138] = Date completed
    [139] = Device category
    [140] = Connected
    [141] = Discovery method
    [142] = Friendly name
    [143] = Local computer
    [144] = Manufacturer
    [145] = Model
    [146] = Paired
    [147] = Classification
    [148] = Status
    [149] = Status
    [150] = Client ID
    [151] = Contributors
    [152] = Content created
    [153] = Last printed
    [154] = Date last saved
    [155] = Division
    [156] = Document ID
    [157] = Pages
    [158] = Slides
    [159] = Total editing time
    [160] = Word count
    [161] = Due date
    [162] = End date
    [163] = File count
    [164] = File extension
    [165] = Filename
    [166] = File version
    [167] = Flag color
    [168] = Flag status
    [169] = Space free
    [172] = Group
    [173] = Sharing type
    [174] = Bit depth
    [175] = Horizontal resolution
    [176] = Width
    [177] = Vertical resolution
    [178] = Height
    [179] = Importance
    [180] = Is attachment
    [181] = Is deleted
    [182] = Encryption status
    [183] = Has flag
    [184] = Is completed
    [185] = Incomplete
    [186] = Read status
    [187] = Shared
    [188] = Creators
    [189] = Date
    [190] = Folder name
    [191] = Folder path
    [192] = Folder
    [193] = Participants
    [194] = Path
    [195] = By location
    [196] = Type
    [197] = Contact names
    [198] = Entry type
    [199] = Language
    [200] = Date visited
    [201] = Description
    [202] = Link status
    [203] = Link target
    [204] = URL
    [208] = Media created
    [209] = Date released
    [210] = Encoded by
    [211] = Episode number
    [212] = Producers
    [213] = Publisher
    [214] = Season number
    [215] = Subtitle
    [216] = User web URL
    [217] = Writers
    [219] = Attachments
    [220] = Bcc addresses
    [221] = Bcc
    [222] = Cc addresses
    [223] = Cc
    [224] = Conversation ID
    [225] = Date received
    [226] = Date sent
    [227] = From addresses
    [228] = From
    [229] = Has attachments
    [230] = Sender address
    [231] = Sender name
    [232] = Store
    [233] = To addresses
    [234] = To do title
    [235] = To
    [236] = Mileage
    [237] = Album artist
    [238] = Sort album artist
    [239] = Album ID
    [240] = Sort album
    [241] = Sort contributing artists
    [242] = Beats-per-minute
    [243] = Composers
    [244] = Sort composer
    [245] = Disc
    [246] = Initial key
    [247] = Part of a compilation
    [248] = Mood
    [249] = Part of set
    [250] = Period
    [251] = Color
    [252] = Parental rating
    [253] = Parental rating reason
    [254] = Space used
    [255] = EXIF version
    [256] = Event
    [257] = Exposure bias
    [258] = Exposure program
    [259] = Exposure time
    [260] = F-stop
    [261] = Flash mode
    [262] = Focal length
    [263] = 35mm focal length
    [264] = ISO speed
    [265] = Lens maker
    [266] = Lens model
    [267] = Light source
    [268] = Max aperture
    [269] = Metering mode
    [270] = Orientation
    [271] = People
    [272] = Program mode
    [273] = Saturation
    [274] = Subject distance
    [275] = White balance
    [276] = Priority
    [277] = Project
    [278] = Channel number
    [279] = Episode name
    [280] = Closed captioning
    [281] = Rerun
    [282] = SAP
    [283] = Broadcast date
    [284] = Program description
    [285] = Recording time
    [286] = Station call sign
    [287] = Station name
    [288] = Summary
    [289] = Snippets
    [290] = Auto summary
    [291] = Relevance
    [292] = File ownership
    [293] = Sensitivity
    [294] = Shared with
    [295] = Sharing status
    [297] = Product name
    [298] = Product version
    [299] = Support link
    [300] = Source
    [301] = Start date
    [302] = Sharing
    [303] = Availability status
    [304] = Status
    [305] = Billing information
    [306] = Complete
    [307] = Task owner
    [308] = Sort title
    [309] = Total file size
    [310] = Legal trademarks
    [311] = Video compression
    [312] = Directors
    [313] = Data rate
    [314] = Frame height
    [315] = Frame rate
    [316] = Frame width
    [317] = Spherical
    [318] = Stereo
    [319] = Video orientation
    [320] = Total bitrate
    [321] = CMYK Profile
    [322] = Primary color mode
    [323] = Colors
    [324] = Effects
    [325] = External bitmaps
    [326] = Fills
    [327] = Fonts used
    [328] = Fonts embedded
    [329] = Grayscale Profile
    [330] = Languages
    [331] = Layer names
    [332] = Object count
    [333] = Object names
    [334] = Objects
    [335] = Outlines
    [336] = Page names
    [337] = Paper orientation
    [338] = Paper size
    [339] = Color palettes
    [340] = Rendering intent
    [341] = RGB Profile
    [342] = Spot colors
    [343] = Styles
    [344] = Bitmap compression
    [345] = Compression ratio
    [346] = Graphic compression
    [347] = Color mode
    [348] = Color Profile
    [349] = Audio tracks
    [350] = Bit depth
    [351] = Contains chapters
    [352] = Content compression
    [353] = Subtitles
    [354] = Subtitle tracks
    [355] = Video tracks
#CE iColumn

 

Edit:
Windows 10 Pro  22H2

Edited by ioa747

I know that I know nothing

Link to comment
Share on other sites

  • 2 weeks later...

How can I turn a video image created by winmm.dll to fullscreen? The answer could be simple: resize it to fullscreen. Yes I thought that way too. But there was a problem when I wanted to make it a fullscreen while the video was in paused mode. Normaly it worked, but , once in while, the image would not stretch to fullscreen even though the window size was stretched to fullscreen. There was no problem while the video was playing. So I thought that the problem would be solved if the video was resumed just before the resize process and paused again after the resize. But, no, it did not solve the problem.

Then I noticed that a stretch to 'maximized' window never failed. So I changed the fullscreen process to 2 steps of resizing. First maximize it and then stretch it to fullscreen. Bingo! The problem was solved. A small find, but big satisfation. The latest version of zPlayer adopted this solution.

Edited by CYCho
Link to comment
Share on other sites

  • 4 weeks later...

I implemented play back of audio CD in zPlayer. The tracks in CD are similar to digital audio files in some aspects, but they are quite different in terms of player implementaion. The fundamental difference is that, in CD, the whole CD is one file and the player is in 'playing' mode while it moves from one track to the next. In digital files, on the other hand, the player goes through a 'stopped' mode between the files. The biggest drawback of CD is the lack of file metadata in .cda tracks. zPlayer now shows track titles as Track01.cda, Track02.cda, etc.., instead of Beethoven - Moonlight Sonata. I understand that advanced media players like WMP and VLC fetch the album information from music databases through internet, but that is beyond my capability at the moment. I will be grateful if someone could guide me to that direction. Other than that, most of the features implemented on digital audio files have been implented for audio CD, including A-B repeat, multiple-track repeat and shuffling the playlist functions. As a playlist file cannot be saved in the CD, 'Resume playback' function could not be implemented for CD. Please see how zPlayer handles a CD playback and any comment or suggestion for improvement would be greatly appreciated.

Edited by CYCho
Link to comment
Share on other sites

  • 4 weeks later...
Posted (edited)

How should I save the playlist of an audio CD and resume playback of the track last played in the next session around?

In zPlayer I have an ini file in the script directory and playlist files in media file folders. When zPlayer.exe is executed, the player reads zPlayer.ini file  to determine which folder to play, and picks up the playlist from that folder. As long as the ini file and playlist files are intact, all you have to do is just execute zPlayer.exe. It will resume previous playing environment and keep on playing.

But how can I deal with a CD where I cannot write a playlist. So I decided to keep the playlist for CD in the ini file. This decision was in line with my intention to keep the program simple, and it was possible because the number of tracks in the CD is reasonably small not to innundate the ini file.

[Audio CD]
CDID=12|3278547|8|319734
Play Mode=Shuffled|157
Playlist=Track01.cda|Track03.cda|Track05.cda|Track02.cda|Track07.cda|Track10.cda|Track12.cda|Track08.cda|Track09.cda|Track11.cda|Track04.cda|Track06.cda

CDID key consists of following information:
Total number of tracks | Total length of CD | Track number last played | Length of that trac

I thought that there can't be 2 CDs with the following identical features:
1. Number of tracks are same: 12 tracks
2. Total length of CD in milliseconds are same: 3278547 milliseconds
3. Length of a given track in milliseconds are same: Length of Track 8 is 319734 milliseconds

The Play Mode key shows that the playlist was in shuffled order and the playback stopped 157 seconds into the 8th track. zPlayer will resume playback from 157 seconds of 8th track the next time around when the player comes back to the CD, if and only if the currently mounted CD has the featuresas  stored in CDID key.

I have implemented this feature and am doing tests now. I hope I can release an update at an early date.
Edit: A beta version was uploaded on Feb. 5, 2024 in file download section of the forum.

Edited by CYCho
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...