clinton 0.0.3__tar.gz → 0.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  builded = "20.08.2024"
2
2
  appname = "clinton"
3
- version = "0.0.3"
3
+ version = "0.0.5"
4
4
 
5
5
 
6
6
  install = ["aiohttp",
@@ -44,13 +44,18 @@ class Media:
44
44
 
45
45
  #====================================================================================================
46
46
 
47
- async def screenshot(file, location, duration, extension=Scripted.DATA11):
47
+ async def screenshot(file, location, duration, logs=True, extension=Scripted.DATA11):
48
48
  try:
49
49
  output = location + str(round(time.time())) + extension
50
50
  ffmpeg.input(file, ss=duration).output(output, vframes=1).run(quiet=True)
51
51
  ouoing = output if os.path.lexists(output) else None
52
52
  return ouoing
53
- except Exception:
53
+ except ffmpeg.Error as errors:
54
+ moonus = str(errors.stderr.decode('utf-8'))
55
+ print(moonus) if logs else Scripted.DATA01
56
+ return None
57
+ except Exception as errors:
58
+ print(errors) if logs else Scripted.DATA01
54
59
  return None
55
60
 
56
61
  #====================================================================================================
@@ -59,10 +64,10 @@ class Media:
59
64
  imageess = images if images else []
60
65
  if duration < durations:
61
66
  return imageess
62
- interval = await Video.interval(durations, duration, numbers)
67
+ interval = await Media.interval(durations, duration, numbers)
63
68
  for looper in range(numbers):
64
69
  valuesom = interval[0]
65
- imagesve = await Video.screenshot(file, location, valuesom)
70
+ imagesve = await Media.screenshot(file, location, valuesom)
66
71
  if imagesve == None:
67
72
  continue
68
73
  imageess.append(imagesve)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: clinton
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: ㅤ
5
5
  Home-page: https://github.com/Clinton-Abraham
6
6
  Author: Clinton-Abraham
@@ -35,7 +35,7 @@ async def main():
35
35
  duration = 7000 # IN SECONDS
36
36
  save = "./Home/" # OUTPUT LOCATION
37
37
  file = "./Home/Video.mp4" # FILE LOCATION
38
- result = await Media.screenshot(file, location, duration)
38
+ result = await Media.screenshot(file, save, duration)
39
39
  print(result)
40
40
 
41
41
  asyncio.run(main())
@@ -10,7 +10,7 @@ async def main():
10
10
  duration = 7000 # IN SECONDS
11
11
  save = "./Home/" # OUTPUT LOCATION
12
12
  file = "./Home/Video.mp4" # FILE LOCATION
13
- result = await Media.screenshot(file, location, duration)
13
+ result = await Media.screenshot(file, save, duration)
14
14
  print(result)
15
15
 
16
16
  asyncio.run(main())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: clinton
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: ㅤ
5
5
  Home-page: https://github.com/Clinton-Abraham
6
6
  Author: Clinton-Abraham
@@ -35,7 +35,7 @@ async def main():
35
35
  duration = 7000 # IN SECONDS
36
36
  save = "./Home/" # OUTPUT LOCATION
37
37
  file = "./Home/Video.mp4" # FILE LOCATION
38
- result = await Media.screenshot(file, location, duration)
38
+ result = await Media.screenshot(file, save, duration)
39
39
  print(result)
40
40
 
41
41
  asyncio.run(main())
File without changes
File without changes
File without changes