FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ffmpeg-python/ffmpeg/_ffmpeg.py at extra-examples2 · GamemakerY/ffmpeg-python · GitHub
GamemakerY
/
ffmpeg-python
Public
forked from
kkroening/ffmpeg-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ffmpeg-python
/
ffmpeg
/
_ffmpeg.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
64 lines (49 loc) · 1.61 KB
Breadcrumbs
ffmpeg-python
/
ffmpeg
/
_ffmpeg.py
Copy path
File metadata and controls
64 lines (49 loc) · 1.61 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
from
__future__
import
unicode_literals
from
.
nodes
import
(
filter_operator
,
GlobalNode
,
InputNode
,
MergeOutputsNode
,
OutputNode
,
output_operator
,
)
def
input
(
filename
,
**
kwargs
):
"""Input file URL (ffmpeg ``-i`` option)
Official documentation: `Main options <https://ffmpeg.org/ffmpeg.html#Main-options>`__
"""
kwargs
[
'filename'
]
=
filename
fmt
=
kwargs
.
pop
(
'f'
,
None
)
if
fmt
:
if
'format'
in
kwargs
:
raise
ValueError
(
"Can't specify both `format` and `f` kwargs"
)
kwargs
[
'format'
]
=
fmt
return
InputNode
(
input
.
__name__
,
kwargs
=
kwargs
).
stream
()
@
output_operator
()
def
overwrite_output
(
stream
):
"""Overwrite output files without asking (ffmpeg ``-y`` option)
Official documentation: `Main options <https://ffmpeg.org/ffmpeg.html#Main-options>`__
"""
return
GlobalNode
(
stream
,
overwrite_output
.
__name__
).
stream
()
@
output_operator
()
def
merge_outputs
(
*
streams
):
"""Include all given outputs in one ffmpeg command line
"""
return
MergeOutputsNode
(
streams
,
merge_outputs
.
__name__
).
stream
()
@
filter_operator
()
def
output
(
stream
,
filename
,
**
kwargs
):
"""Output file URL
Official documentation: `Synopsis <https://ffmpeg.org/ffmpeg.html#Synopsis>`__
"""
kwargs
[
'filename'
]
=
filename
fmt
=
kwargs
.
pop
(
'f'
,
None
)
if
fmt
:
if
'format'
in
kwargs
:
raise
ValueError
(
"Can't specify both `format` and `f` kwargs"
)
kwargs
[
'format'
]
=
fmt
return
OutputNode
(
stream
,
output
.
__name__
,
kwargs
=
kwargs
).
stream
()
__all__
=
[
'input'
,
'merge_outputs'
,
'output'
,
'overwrite_output'
,
]
Back
|
FazBrowse Home
|
New Git URL