ffmpeg-for-python 0.3.5__tar.gz → 0.3.6__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.
Files changed (19) hide show
  1. {ffmpeg_for_python-0.3.5/ffmpeg_for_python.egg-info → ffmpeg_for_python-0.3.6}/PKG-INFO +14 -4
  2. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/README.md +2 -2
  3. ffmpeg_for_python-0.3.6/ffmpeg_for_python/__utils.py +94 -0
  4. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python/__version__.py +1 -1
  5. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6/ffmpeg_for_python.egg-info}/PKG-INFO +14 -4
  6. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python.egg-info/SOURCES.txt +0 -1
  7. ffmpeg_for_python-0.3.5/assets/ffmpeg-for-python-logo.png +0 -0
  8. ffmpeg_for_python-0.3.5/ffmpeg_for_python/__utils.py +0 -78
  9. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/MANIFEST.in +0 -0
  10. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python/__config__.py +0 -0
  11. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python/__init__.py +0 -0
  12. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python/exeptions.py +0 -0
  13. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python/ffmpeg-bin/readme.md +0 -0
  14. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python/ffmpeg.py +0 -0
  15. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python.egg-info/dependency_links.txt +0 -0
  16. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python.egg-info/not-zip-safe +0 -0
  17. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/ffmpeg_for_python.egg-info/top_level.txt +0 -0
  18. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/setup.cfg +0 -0
  19. {ffmpeg_for_python-0.3.5 → ffmpeg_for_python-0.3.6}/setup.py +0 -0
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ffmpeg-for-python
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Wrapper para o binário FFmpeg
5
5
  Author: PauloCesar-dev404
6
6
  Author-email: paulocesar0073dev404@gmail.com
7
7
  License: MIT
8
- Project-URL: Código Fonte, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.5.tar.gz
9
- Project-URL: lib, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.5-py3-none-any.whl
8
+ Project-URL: Código Fonte, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.6.tar.gz
9
+ Project-URL: lib, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.6-py3-none-any.whl
10
10
  Project-URL: GitHub, https://github.com/PauloCesar-dev404/ffmpeg-for-python
11
11
  Project-URL: Bugs/Melhorias, https://github.com/PauloCesar-dev404/ffmpeg-for-python/issues
12
12
  Project-URL: Documentação, https://github.com/PauloCesar-dev404/ffmpeg-for-python/wiki
@@ -14,6 +14,16 @@ Keywords: ffmpeg
14
14
  Platform: any
15
15
  Requires: requests
16
16
  Description-Content-Type: text/markdown
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: keywords
22
+ Dynamic: license
23
+ Dynamic: platform
24
+ Dynamic: project-url
25
+ Dynamic: requires
26
+ Dynamic: summary
17
27
 
18
28
  # ffmpeg-for-python
19
29
 
@@ -4,9 +4,9 @@
4
4
 
5
5
 
6
6
 
7
- ![Versão](https://img.shields.io/badge/version-0.3.5-orange)
7
+ ![Versão](https://img.shields.io/badge/version-0.3.6-orange)
8
8
  ![Licença](https://img.shields.io/badge/license-MIT-orange)
9
- [![Sponsor](https://img.shields.io/badge/💲Donate-yellow)](https://apoia.se/paulocesar-dev404)
9
+ [![Sponsor](https://img.shields.io/badge/💲Donate-yellow)](https://paulocesar-dev404.github.io/me-apoiando-online/)
10
10
 
11
11
  </div>
12
12
 
@@ -0,0 +1,94 @@
1
+ import platform
2
+ import os
3
+
4
+ URL_PLATAFOMR = ''
5
+
6
+
7
+ def get_processor_info():
8
+ system = platform.system()
9
+ architecture = platform.architecture()[0]
10
+ processor = ''
11
+ if system == "Windows":
12
+ processor = platform.processor()
13
+ elif system in ["Linux", "Darwin"]: # Darwin é o nome do sistema para macOS
14
+ try:
15
+ if system == "Linux":
16
+ # Verifica se estamos no Termux
17
+ if os.path.exists("/data/data/com.termux/files/usr/bin/termux"):
18
+ processor = "Termux"
19
+ else:
20
+ # Obtém informações detalhadas do processador no Linux
21
+ with open("/proc/cpuinfo") as f:
22
+ cpuinfo = f.read()
23
+ if "model name" in cpuinfo:
24
+ processor = cpuinfo.split("model name")[1].split(":")[1].split("\n")[0].strip()
25
+ else:
26
+ processor = "Unknown"
27
+ elif system == "Darwin":
28
+ # Obtém informações detalhadas do processador no macOS
29
+ processor = os.popen("sysctl -n machdep.cpu.brand_string").read().strip()
30
+ except FileNotFoundError:
31
+ processor = "Unknown"
32
+ d = (f"System: {system} "
33
+ f"Architecture: {architecture} "
34
+ f"Processor: {processor} ")
35
+ return d
36
+
37
+
38
+ # Processa a informação do processador e limpa a string
39
+ data = (
40
+ get_processor_info().replace('Architecture:', '').replace('System:', '').replace('Processor:', '').strip().split())
41
+
42
+ # Remove entradas vazias e limpa espaços em branco
43
+ cleaned_data = [item.strip() for item in data if item.strip()]
44
+
45
+ # Garantindo que há pelo menos três elementos
46
+ if len(cleaned_data) >= 2:
47
+ system = cleaned_data[0]
48
+ architecture = cleaned_data[1]
49
+ processor = ' '.join(cleaned_data[2:]) # Junta o restante como o processador
50
+
51
+ URL_BASE_REPO = "https://raw.githubusercontent.com/PauloCesar-dev404/binarios/main/"
52
+
53
+ # Mapeamento para Linux
54
+ linux_mapping = {
55
+ "x86_64": "amd64",
56
+ "i686": "i686",
57
+ "arm64": "arm64",
58
+ "armhf": "armhf",
59
+ "armel": "armel",
60
+ "aarch64": "arm64" # Termux aarch64
61
+ }
62
+
63
+ # Formata a URL com base no sistema e arquitetura
64
+ if system == "Linux":
65
+ if 'termux' in processor.lower():
66
+ # Suporte para Termux
67
+ if 'aarch64' in architecture.lower():
68
+ url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-termux-arm64.zip"
69
+ else:
70
+ url = f"Unsupported Termux architecture"
71
+ elif 'intel' in processor.lower() or 'amd' in processor.lower():
72
+ url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('x86_64')}.zip"
73
+ elif 'i686' in architecture.lower():
74
+ url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('i686')}.zip"
75
+ elif 'arm64' in architecture.lower():
76
+ url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('arm64')}.zip"
77
+ elif 'armhf' in architecture.lower():
78
+ url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('armhf')}.zip"
79
+ elif 'armel' in architecture.lower():
80
+ url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('armel')}.zip"
81
+ else:
82
+ url = f"Unsupported Linux architecture"
83
+ elif system == "Windows" and architecture == '64bit':
84
+ url = f"{URL_BASE_REPO}windows/win-ffmpeg-7.0.2-full-amd64-intel64.zip"
85
+ else:
86
+ url = f"Unsupported system or architecture"
87
+
88
+ URL_PLATAFOMR = url
89
+
90
+ else:
91
+ raise DeprecationWarning("Não foi possível obter seu sistema ....consulte o desenvolvedor!")
92
+
93
+ if __name__ == '__main__':
94
+ raise RuntimeError("Este é uma função interna!")
@@ -1,4 +1,4 @@
1
- __version__ = '0.3.5'
1
+ __version__ = '0.3.6'
2
2
  __lib_name__ = 'ffmpeg_for_python'
3
3
  __autor__ = 'PauloCesar-dev404'
4
4
  __repo__ = 'https://github.com/PauloCesar-dev404/ffmpeg-for-python'
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ffmpeg-for-python
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Wrapper para o binário FFmpeg
5
5
  Author: PauloCesar-dev404
6
6
  Author-email: paulocesar0073dev404@gmail.com
7
7
  License: MIT
8
- Project-URL: Código Fonte, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.5.tar.gz
9
- Project-URL: lib, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.5-py3-none-any.whl
8
+ Project-URL: Código Fonte, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.6.tar.gz
9
+ Project-URL: lib, https://raw.githubusercontent.com/PauloCesar-dev404/ffmpeg-for-python/main/ffmpeg_for_python-0.3.6-py3-none-any.whl
10
10
  Project-URL: GitHub, https://github.com/PauloCesar-dev404/ffmpeg-for-python
11
11
  Project-URL: Bugs/Melhorias, https://github.com/PauloCesar-dev404/ffmpeg-for-python/issues
12
12
  Project-URL: Documentação, https://github.com/PauloCesar-dev404/ffmpeg-for-python/wiki
@@ -14,6 +14,16 @@ Keywords: ffmpeg
14
14
  Platform: any
15
15
  Requires: requests
16
16
  Description-Content-Type: text/markdown
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: keywords
22
+ Dynamic: license
23
+ Dynamic: platform
24
+ Dynamic: project-url
25
+ Dynamic: requires
26
+ Dynamic: summary
17
27
 
18
28
  # ffmpeg-for-python
19
29
 
@@ -1,7 +1,6 @@
1
1
  MANIFEST.in
2
2
  README.md
3
3
  setup.py
4
- assets/ffmpeg-for-python-logo.png
5
4
  ffmpeg_for_python/__config__.py
6
5
  ffmpeg_for_python/__init__.py
7
6
  ffmpeg_for_python/__utils.py
@@ -1,78 +0,0 @@
1
- import platform
2
- import os
3
-
4
- URL_PLATAFOMR = ''
5
-
6
-
7
- def get_processor_info():
8
- system = platform.system()
9
- architecture = platform.architecture()[0]
10
- processor = ''
11
- if system == "Windows":
12
- processor = platform.processor()
13
- elif system in ["Linux", "Darwin"]: # Darwin é o nome do sistema para macOS
14
- try:
15
- if system == "Linux":
16
- # Obtém informações detalhadas do processador no Linux
17
- with open("/proc/cpuinfo") as f:
18
- cpuinfo = f.read()
19
- if "model name" in cpuinfo:
20
- processor = cpuinfo.split("model name")[1].split(":")[1].split("\n")[0].strip()
21
- else:
22
- processor = "Unknown"
23
- elif system == "Darwin":
24
- # Obtém informações detalhadas do processador no macOS
25
- processor = os.popen("sysctl -n machdep.cpu.brand_string").read().strip()
26
- except FileNotFoundError:
27
- processor = "Unknown"
28
- d = (f"System: {system} "
29
- f"Architecture: {architecture} "
30
- f"Processor: {processor} ")
31
- return d
32
-
33
-
34
- # Processa a informação do processador e limpa a string
35
- data = (get_processor_info().replace('Architecture:', '').replace('System:', '').
36
- replace('Processor:', '').strip().split())
37
-
38
- # Remove entradas vazias e limpa espaços em branco
39
- cleaned_data = [item.strip() for item in data if item.strip()]
40
-
41
- # Garantindo que há pelo menos três elementos
42
- if len(cleaned_data) >= 2:
43
- system = cleaned_data[0]
44
- architecture = cleaned_data[1]
45
- processor = ' '.join(cleaned_data[2:]) # Junta o restante como o processador
46
-
47
- URL_BASE_REPO = "https://raw.githubusercontent.com/PauloCesar-dev404/binarios/main/"
48
- # Mapeamento para Linux
49
- linux_mapping = {
50
- "x86_64": "amd64",
51
- "i686": "i686",
52
- "arm64": "arm64",
53
- "armhf": "armhf",
54
- "armel": "armel"
55
- }
56
- # Formata a URL com base no sistema e arquitetura
57
- if system == "Linux" and ('intel' in processor.lower() or 'amd' in processor.lower()):
58
- url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('x86_64')}.zip"
59
- elif system == "Linux" and 'i686' in architecture.lower():
60
- url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('i686')}.zip"
61
- elif system == "Linux" and 'arm64' in architecture.lower():
62
- url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('arm64')}.zip"
63
- elif system == "Linux" and 'armhf' in architecture.lower():
64
- url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('armhf')}.zip"
65
- elif system == "Linux" and 'armel' in architecture.lower():
66
- url = f"{URL_BASE_REPO}linux/ffmpeg-7.0.2-{linux_mapping.get('armel')}.zip"
67
- elif system == "Windows" and architecture == '64bit':
68
- url = f"{URL_BASE_REPO}windows/win-ffmpeg-7.0.2-full-amd64-intel64.zip"
69
- else:
70
- url = f"Unsupported system or architecture"
71
-
72
- URL_PLATAFOMR = url
73
-
74
- else:
75
- raise DeprecationWarning("Não foi possível obter seu sistema ....consulte o desenvolvedor!")
76
-
77
- if __name__ == '__main__':
78
- raise RuntimeError("este é uma função interna!")