X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=doc%2Fffmpeg.texi;h=4616a4239e71cafd969269e735242c0516113869;hb=b8b84f9af55dede0df943083bc2dae38e4c06508;hp=e72da8c4735d11cda8fd6a4aea143e137311d104;hpb=ed1fe7b2feeb914750ffca2ed030738b3cdc4858;p=ffmpeg diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index e72da8c4735..4616a4239e7 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -715,6 +715,67 @@ would be more efficient. When doing stream copy, copy also non-key frames found at the beginning. +@item -init_hw_device @var{type}[=@var{name}][:@var{device}[,@var{key=value}...]] +Initialise a new hardware device of type @var{type} called @var{name}, using the +given device parameters. +If no name is specified it will receive a default name of the form "@var{type}%d". + +The meaning of @var{device} and the following arguments depends on the +device type: +@table @option + +@item cuda +@var{device} is the number of the CUDA device. + +@item dxva2 +@var{device} is the number of the Direct3D 9 display adapter. + +@item vaapi +@var{device} is either an X11 display name or a DRM render node. +If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY}) +and then the first DRM render node (@emph{/dev/dri/renderD128}). + +@item vdpau +@var{device} is an X11 display name. +If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY}). + +@item qsv +@var{device} selects a value in @samp{MFX_IMPL_*}. Allowed values are: +@table @option +@item auto +@item sw +@item hw +@item auto_any +@item hw_any +@item hw2 +@item hw3 +@item hw4 +@end table +If not specified, @samp{auto_any} is used. +(Note that it may be easier to achieve the desired result for QSV by creating the +platform-appropriate subdevice (@samp{dxva2} or @samp{vaapi}) and then deriving a +QSV device from that.) + +@end table + +@item -init_hw_device @var{type}[=@var{name}]@@@var{source} +Initialise a new hardware device of type @var{type} called @var{name}, +deriving it from the existing device with the name @var{source}. + +@item -init_hw_device list +List all hardware device types supported in this build of ffmpeg. + +@item -filter_hw_device @var{name} +Pass the hardware device called @var{name} to all filters in any filter graph. +This can be used to set the device to upload to with the @code{hwupload} filter, +or the device to map to with the @code{hwmap} filter. Other filters may also +make use of this parameter when they require a hardware device. Note that this +is typically only required when the input is not already in hardware frames - +when it is, filters will derive the device they require from the context of the +frames they receive as input. + +This is a global setting, so all filters will receive the same device. + @item -hwaccel[:@var{stream_specifier}] @var{hwaccel} (@emph{input,per-stream}) Use hardware acceleration to decode the matching stream(s). The allowed values of @var{hwaccel} are: @@ -734,6 +795,9 @@ Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration. @item dxva2 Use DXVA2 (DirectX Video Acceleration) hardware acceleration. +@item vaapi +Use VAAPI (Video Acceleration API) hardware acceleration. + @item qsv Use the Intel QuickSync Video acceleration for video transcoding. @@ -757,33 +821,11 @@ useful for testing. @item -hwaccel_device[:@var{stream_specifier}] @var{hwaccel_device} (@emph{input,per-stream}) Select a device to use for hardware acceleration. -This option only makes sense when the @option{-hwaccel} option is also -specified. Its exact meaning depends on the specific hardware acceleration -method chosen. - -@table @option -@item vdpau -For VDPAU, this option specifies the X11 display/screen to use. If this option -is not specified, the value of the @var{DISPLAY} environment variable is used - -@item dxva2 -For DXVA2, this option should contain the number of the display adapter to use. -If this option is not specified, the default adapter is used. - -@item qsv -For QSV, this option corresponds to the values of MFX_IMPL_* . Allowed values -are: -@table @option -@item auto -@item sw -@item hw -@item auto_any -@item hw_any -@item hw2 -@item hw3 -@item hw4 -@end table -@end table +This option only makes sense when the @option{-hwaccel} option is also specified. +It can either refer to an existing device created with @option{-init_hw_device} +by name, or it can create a new device as if +@samp{-init_hw_device} @var{type}:@var{hwaccel_device} +were called immediately before. @item -hwaccels List all hardware acceleration methods supported in this build of ffmpeg. @@ -1176,6 +1218,30 @@ Try to make the choice automatically, in order to generate a sane output. Default value is -1. +@item -enc_time_base[:@var{stream_specifier}] @var{timebase} (@emph{output,per-stream}) +Set the encoder timebase. @var{timebase} is a floating point number, +and can assume one of the following values: + +@table @option +@item 0 +Assign a default value according to the media type. + +For video - use 1/framerate, for audio - use 1/samplerate. + +@item -1 +Use the input stream timebase when possible. + +If an input stream is not available, the default timebase will be used. + +@item >0 +Use the provided number as the timebase. + +This field can be provided as a ratio of two integers (e.g. 1:24, 1:48000) +or as a floating point number (e.g. 0.04166, 2.0833e-5) +@end table + +Default value is 0. + @item -shortest (@emph{output}) Finish encoding when the shortest input stream ends. @item -dts_delta_threshold