_input
¶
Input node.
Functions:
Name | Description |
---|---|
input |
Input file URL (ffmpeg |
input
¶
input(
filename: str | Path,
*,
f: String = None,
c: String = None,
codec: String = None,
t: Time = None,
to: Time = None,
ss: Time = None,
sseof: Time = None,
seek_timestamp: Int = None,
accurate_seek: Boolean = None,
isync: Int = None,
itsoffset: Time = None,
itsscale: Double = None,
re: Boolean = None,
readrate: Float = None,
readrate_initial_burst: Double = None,
bitexact: Boolean = None,
tag: String = None,
reinit_filter: Int = None,
dump_attachment: String = None,
stream_loop: Int = None,
discard: String = None,
thread_queue_size: Int = None,
find_stream_info: Boolean = None,
r: String = None,
s: String = None,
pix_fmt: String = None,
display_rotation: Double = None,
display_hflip: Boolean = None,
display_vflip: Boolean = None,
vn: Boolean = None,
vcodec: String = None,
vtag: String = None,
hwaccel: String = None,
hwaccel_device: String = None,
hwaccel_output_format: String = None,
autorotate: Boolean = None,
ar: Int = None,
ac: Int = None,
an: Boolean = None,
acodec: String = None,
sample_fmt: String = None,
channel_layout: String = None,
ch_layout: String = None,
guess_layout_max: Int = None,
sn: Boolean = None,
scodec: String = None,
fix_sub_duration: Boolean = None,
canvas_size: String = None,
bsf: String = None,
dcodec: String = None,
dn: Boolean = None,
top: Int = None,
decoder_options: FFMpegDecoderOption | None = None,
demuxer_options: FFMpegDemuxerOption | None = None,
format_options: (
FFMpegAVFormatContextDecoderOption | None
) = None,
codec_options: (
FFMpegAVCodecContextDecoderOption | None
) = None,
extra_options: dict[str, Any] | None = None
) -> AVStream
Input file URL (ffmpeg -i
option).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
str | Path
|
Input file URL |
required |
f
|
String
|
force container format (auto-detected otherwise) |
None
|
c
|
String
|
select encoder/decoder ('copy' to copy stream without reencoding) |
None
|
codec
|
String
|
alias for -c (select encoder/decoder) |
None
|
t
|
Time
|
stop transcoding after specified duration |
None
|
to
|
Time
|
stop transcoding after specified time is reached |
None
|
ss
|
Time
|
start transcoding at specified time |
None
|
sseof
|
Time
|
set the start time offset relative to EOF |
None
|
seek_timestamp
|
Int
|
enable/disable seeking by timestamp with -ss |
None
|
accurate_seek
|
Boolean
|
enable/disable accurate seeking with -ss |
None
|
isync
|
Int
|
Indicate the input index for sync reference |
None
|
itsoffset
|
Time
|
set the input ts offset |
None
|
itsscale
|
Double
|
set the input ts scale |
None
|
re
|
Boolean
|
read input at native frame rate; equivalent to -readrate 1 |
None
|
readrate
|
Float
|
read input at specified rate |
None
|
readrate_initial_burst
|
Double
|
The initial amount of input to burst read before imposing any readrate |
None
|
bitexact
|
Boolean
|
bitexact mode |
None
|
tag
|
String
|
force codec tag/fourcc |
None
|
reinit_filter
|
Int
|
reinit filtergraph on input parameter changes |
None
|
dump_attachment
|
String
|
extract an attachment into a file |
None
|
stream_loop
|
Int
|
set number of times input stream shall be looped |
None
|
discard
|
String
|
discard |
None
|
thread_queue_size
|
Int
|
set the maximum number of queued packets from the demuxer |
None
|
find_stream_info
|
Boolean
|
read and decode the streams to fill missing information with heuristics |
None
|
r
|
String
|
override input framerate/convert to given output framerate (Hz value, fraction or abbreviation) |
None
|
s
|
String
|
set frame size (WxH or abbreviation) |
None
|
pix_fmt
|
String
|
set pixel format |
None
|
display_rotation
|
Double
|
set pure counter-clockwise rotation in degrees for stream(s) |
None
|
display_hflip
|
Boolean
|
set display horizontal flip for stream(s) (overrides any display rotation if it is not set) |
None
|
display_vflip
|
Boolean
|
set display vertical flip for stream(s) (overrides any display rotation if it is not set) |
None
|
vn
|
Boolean
|
disable video |
None
|
vcodec
|
String
|
alias for -c:v (select encoder/decoder for video streams) |
None
|
vtag
|
String
|
force video tag/fourcc |
None
|
hwaccel
|
String
|
use HW accelerated decoding |
None
|
hwaccel_device
|
String
|
select a device for HW acceleration |
None
|
hwaccel_output_format
|
String
|
select output format used with HW accelerated decoding |
None
|
autorotate
|
Boolean
|
automatically insert correct rotate filters |
None
|
ar
|
Int
|
set audio sampling rate (in Hz) |
None
|
ac
|
Int
|
set number of audio channels |
None
|
an
|
Boolean
|
disable audio |
None
|
acodec
|
String
|
alias for -c:a (select encoder/decoder for audio streams) |
None
|
sample_fmt
|
String
|
set sample format |
None
|
channel_layout
|
String
|
set channel layout |
None
|
ch_layout
|
String
|
set channel layout |
None
|
guess_layout_max
|
Int
|
set the maximum number of channels to try to guess the channel layout |
None
|
sn
|
Boolean
|
disable subtitle |
None
|
scodec
|
String
|
alias for -c:s (select encoder/decoder for subtitle streams) |
None
|
fix_sub_duration
|
Boolean
|
fix subtitles duration |
None
|
canvas_size
|
String
|
set canvas size (WxH or abbreviation) |
None
|
bsf
|
String
|
A comma-separated list of bitstream filters |
None
|
dcodec
|
String
|
alias for -c:d (select encoder/decoder for data streams) |
None
|
dn
|
Boolean
|
disable data |
None
|
top
|
Int
|
deprecated, use the setfield video filter |
None
|
decoder_options
|
FFMpegDecoderOption | None
|
ffmpeg's decoder options |
None
|
demuxer_options
|
FFMpegDemuxerOption | None
|
ffmpeg's demuxer options |
None
|
format_options
|
FFMpegAVFormatContextDecoderOption | None
|
ffmpeg's AVFormatContext options |
None
|
codec_options
|
FFMpegAVCodecContextDecoderOption | None
|
ffmpeg's AVCodecContext options |
None
|
extra_options
|
dict[str, Any] | None
|
ffmpeg's input file options |
None
|
Returns:
Type | Description |
---|---|
AVStream
|
Input stream |
Examples:
>>> input('input.mp4')
<AVStream:input.mp4:0>