Commit Graph

7846 Commits

Author SHA1 Message Date
exwm 32d6fe23b6 avfilter/zoompan: add in_time variable
Currently, the zoompan filter exposes a 'time' variable (missing from docs) for use in
the 'zoom', 'x', and 'y' expressions. This variable is perhaps better named
'out_time' as it represents the timestamp in seconds of each output frame
produced by zoompan. This patch adds aliases 'out_time' and 'ot' for 'time'.

This patch also adds an 'in_time' (alias 'it') variable that provides access
to the timestamp in seconds of each input frame to the zoompan filter.
This helps to design zoompan filters that depend on the input video timestamps.
For example, it makes it easy to zoom in instantly for only some portion of a video.
Both the 'out_time' and 'in_time' variables have been added in the documentation
for zoompan.

Example usage of 'in_time' in the zoompan filter to zoom in 2x for the
first second of the input video and 1x for the rest:
    zoompan=z='if(between(in_time,0,1),2,1):d=1'

V2: Fix zoompan filter documentation stating that the time variable
would be NAN if the input timestamp is unknown.

V3: Add 'it' alias for 'in_time. Add 'out_time' and 'ot' aliases for 'time'.
Minor corrections to zoompan docs.

Signed-off-by: exwm <thighsman@protonmail.com>
2020-06-25 10:27:07 +02:00
Levis Florian bd6ae462f8 avformat/libamqp: add option delivery_mode
Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Levis Florian <levis.florian@gmail.com>
2020-06-24 23:15:52 -04:00
Paul B Mahol f719cacbd9 doc/general: mention BT20 decoder 2020-06-23 16:04:31 +02:00
Paul B Mahol c949de2449 doc/general: merge dupe ProRes entries
While here add missing fourcc.
2020-06-23 16:00:02 +02:00
Paul B Mahol eef0765236 doc/general: mention NotchLC 2020-06-23 16:00:02 +02:00
Paul B Mahol 00a5df71ad avfilter/vf_v360: add orthographic projection support 2020-06-23 16:00:02 +02:00
Paul B Mahol 44ce333f03 avfilters/vf_v360: add equisolid projection support 2020-06-22 14:41:36 +02:00
Paul B Mahol 683a1599d4 avfilter/af_ladspa: add latency compensation 2020-06-21 21:35:40 +02:00
Limin Wang 251434cb97 doc/encoders: fix the misleading usage of profile
users are getting mislead by the integer, although profile
can support both const string and integer.
http://ffmpeg.org/pipermail/ffmpeg-user/2020-June/049025.html

Also fix the order of high and main, it's not my intention.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-20 09:03:59 +08:00
Limin Wang dacae40a4b avfilter/vf_overlay: add yuv420p10 and yuv422p10 10bit format support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-19 07:14:46 +08:00
Linjie Fu 0b511bd9a5 fftools/ffmpeg_filter: add -autoscale to disable/enable the default scale
Currently, ffmpeg inserts scale filter by default in the filter graph
to force the whole decoded stream to scale into the same size with the
first frame. It's not quite make sense in resolution changing cases if
user wants the rawvideo without any scale.

Using autoscale/noautoscale as an output option to indicate whether auto
inserting the scale filter in the filter graph:
    -noautoscale or -autoscale 0:
    disable the default auto scale filter inserting.

ffmpeg -y -i input.mp4 out1.yuv -noautoscale out2.yuv -autoscale 0 out3.yuv

Update docs.

Suggested-by:  Mark Thompson <sw@jkqxz.net>
Reviewed-by:   Nicolas George <george@nsup.org>
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
2020-06-18 16:31:09 +08:00
Thilo Borgmann b737575c76 lavdevice: Add AudioToolbox output device. 2020-06-15 15:09:33 +02:00
Przemysław Sobala 9d80f3ec4b avformat/dashenc: Add hls_master_name option 2020-06-15 12:31:57 +05:30
Marton Balint 16d29c1be8 avcodec/libzvbi-teletextdec: fix txt_default_region limits
Max region ID is 87. Also the region affects not only the G0 charset but G2 and
the national subset as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-06-14 20:00:02 +02:00
Lynne fd54add89c
doc/APIchanges: add new AV_PIX_FMT_X2RGB10 2020-06-12 17:57:08 +01:00
Limin Wang bc8ab084fb avutil: add AV_FRAME_DATA_SEI_UNREGISTERED side data type
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-11 13:06:31 +08:00
Anton Khirnov 1b4a98b029 lavu/opt: add a more general child class iteration API
Use opaque iteration state instead of the previous child class. This
mirrors similar changes done in lavf/lavc.

Deprecate the av_opt_child_class_next() API.
2020-06-10 12:36:42 +02:00
Moritz Barsnick 7ab375f574 doc/utils: document the "s", "ms" and "us" suffixes for durations
These suffixes were introduced in 61c972384d
and completed in 8218249f1f.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-06-09 17:55:52 +05:30
Moritz Barsnick aab0885c19 doc/ffmpeg: remove reference to deprecated option
The "-deinterlace" was deprecated since d7edd35, over eight years
ago.

Refer to deinterlacing filters instead.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-06-09 17:53:41 +05:30
Marton Balint 81975cd24b avformat/fifo: add timeshift option to delay output
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-06-09 00:57:30 +02:00
Michael Niedermayer fe65923ad1 doc/APIchanges: Fill in missing values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:40:48 +02:00
Paul B Mahol bd6336b970 avfilter/vf_vaguedenoiser: add new type of threshold 2020-06-07 15:20:25 +02:00
James Almer ec39c2276a avutil/buffer: use the default allocator if none is provided to av_buffer_pool_init2()
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-05 10:07:04 -03:00
Andriy Gelman 6cd198860d fftools/ffmpeg: update text requesting samples
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
2020-06-01 14:39:52 -04:00
Limin Wang dd76226842 avcodec/mpeg12enc: support mpeg2 encoder const profile
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-01 07:05:32 +08:00
Paul B Mahol 726dbc57f8 avfilter: add dblur video filter 2020-05-30 18:04:14 +02:00
Paul B Mahol e2e8121eaa avfilter/af_aiir: add S-plane support 2020-05-30 10:05:19 +02:00
Paul B Mahol 327b52412d avfilter/af_aiir: make it clear that transfer function is digital one 2020-05-30 10:05:19 +02:00
Paul B Mahol 1206a10d9c avfilter/af_biquads: implement 1st order allpass 2020-05-30 09:57:04 +02:00
Limin Wang 3c346298f9 doc: add dia_size option documentation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-28 12:42:41 +08:00
Zane van Iperen b1189c1571 avcodec: add adpcm_ima_ssi encoder
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-27 22:13:39 +02:00
Anton Khirnov ba6cada92e avcodec.h: split AVCodec API into its own header 2020-05-27 10:22:17 +02:00
Anton Khirnov 383c03ee0f doc/APIchanges: fix typo in version number 2020-05-27 10:22:17 +02:00
Marton Balint efe7a59364 fftools/ffmpeg: add new abort_on flag which aborts if there is a stream which received no packets
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-26 21:50:50 +02:00
Anton Khirnov 064b875e89 h264dec: support exporting QP tables through the AVVideoEncParams API 2020-05-25 11:59:42 +02:00
Lynne 2e08b39444
hwcontext: add av_hwdevice_ctx_create_derived_opts
This allows for users who derive devices to set options for the
new device context they derive.
The main use case of this is to allow users to enable extensions
(such as surface drawing extensions) in Vulkan while deriving from
the device their frames are on. That way, users don't need to write
any initialization code themselves, since the Vulkan spec invalidates
mixing instances, physical devices and active devices.
Apart from Vulkan, other hwcontexts ignore the opts argument since they
don't support options at all (or in VAAPI and OpenCL's case, options are
currently only used for device selection, which device_derive overrides).
2020-05-23 19:07:26 +01:00
Nicolas George 88567a2e52 lavfi: add untile filter. 2020-05-23 15:52:27 +02:00
Nicolas George 6b65c4ec54 lavu: add av_gcd_q(). 2020-05-23 15:51:44 +02:00
Marton Balint 82f9eb6f6c avcodec: move mpeg4 profiles to profiles.h
Also bump micro version after the recent option changes.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-22 22:23:18 +02:00
Marton Balint d55f1cc58b avcodec/options_table: remove dts profiles
Our encoder (dcaenc) does not use any of these.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-22 22:22:46 +02:00
Marton Balint aee036cdd0 avcodec: move aacenc profiles to profiles.h
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-22 22:16:53 +02:00
Marton Balint 337fe4bcc2 avcodec/options_table: make AVCodecContext->profile search for child constants
This change makes it possible for child encoders to define custom profile
option names which can be used for setting the AVCodecContext->profile.

Also rename unit name to something rather unique, so it won't be used elsewhere.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-22 22:16:53 +02:00
Marton Balint af9e622776 avutil/opt: add AV_OPT_FLAG_CHILD_CONSTS
This will be used for AVCodecContext->profile. By specifying constants in the
encoders we won't have to use the common AVCodecContext options table and
different encoders can use the same profile name even with different values.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-22 22:16:52 +02:00
Anton Khirnov bdd6aa25c1 avcodec.h: split bitstream filters API into its own header 2020-05-22 14:38:57 +02:00
Anton Khirnov 9d443c3e68 avcodec.h: split AVCodecParameters API into its own header 2020-05-22 14:38:57 +02:00
Anton Khirnov f30a41a608 Stop hardcoding align=32 in av_frame_get_buffer() calls.
Use 0, which selects the alignment automatically.
2020-05-22 14:38:57 +02:00
Paul B Mahol 07a9e5ec5e avfilter/af_aiir: add more descriptive options aliases 2020-05-22 12:37:17 +02:00
Paul B Mahol ffda57b800 avfilter/af_aiir: export normalize option
And enable it in all modes by default.
2020-05-22 12:30:59 +02:00
James Almer 13b1bbff0b avcodec: deprecate Lossless and Intra Only encoder capabilites
Both are codec properties and not encoder capabilities. The relevant
AVCodecDescriptor.props flags exist for this purpose.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-21 12:32:15 -03:00
wm4 050b72ab5e avcodec: Add MediaFoundation encoder wrapper
This contains encoder wrappers for H264, HEVC, AAC, AC3 and MP3.

This is based on top of an original patch by wm4
<nfxjfg@googlemail.com>. The original patch supported both encoding
and decoding, but this patch only includes encoding.

The patch contains further changes by Paweł Wegner
<pawel.wegner95@gmail.com> (primarily for splitting out the encoding
parts of the original patch) and further cleanup, build compatibility
fixes and tweaks for use with Qualcomm encoders by Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-19 21:34:04 +03:00
Paul B Mahol f63939dedb avfilter: add gradients source video filter 2020-05-19 20:10:34 +02:00
Andreas Rheinhardt 9a8b984efa doc/muxers: Document title tag for attachments
The Matroska muxer has always mapped the title tag to the FileDescription
element for attachments streams since support for writing attachments
was added in commit c7a63a521b. This
commit merely documents this fact.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-19 05:17:26 +02:00
James Almer 84af196c65 avutil: bump version after addition of av_sat_add64 and av_sat_sub64
Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-17 16:05:15 -03:00
Limin Wang 815a3b393c avfilter/vf_minterpolate: change the default threshold to get better scene change detect result
./ffmpeg -loglevel debug -i ../fate-suite/svq3/Vertical400kbit.sorenson3.mov -vf
 minterpolate=fps=60:mi_mode=blend -an -f null -
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 1600
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 4120
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 5780
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 6700
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 8140
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 9740
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 14060
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 15680
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 18480
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 20020
 [Parsed_minterpolate_0 @ 0x7fe7f3e193c0] scene changed, input pts 21740

 The results are consistent with tests/ref/fate/filter-metadata-scenedetect

 For the master, it'll detect more than 20 scene change for the same source.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:07 +08:00
Limin Wang d62d4e05e8 avfilter/vf_scdet: add filter to detect scene change
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:06 +08:00
Anton Khirnov c584409643 lavc: add a flag for exporting AVVideoEncParams from decoders 2020-05-12 09:37:47 +02:00
Juan De León 991d417692 libavutil: add API for exporting video frame quantizers
This is intended to replace the deprecated the AV_FRAME_DATA_QP_TABLE*
API and extend it to a wider range of codecs.

In the future, it may also be extended to support other encoding
parameters such as motion vectors.

Additional changes by Anton Khirnov <anton@khirnov.net> with suggestions
by Lynne <dev@lynne.ee>.

Signed-off-by: Juan De León <juandl@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-05-12 09:37:47 +02:00
Anton Khirnov d8de9d46f2 doc/examples/muxing: convert to new encoding API 2020-05-12 09:37:47 +02:00
Anton Khirnov 3bfe20389d doc/examples/demuxing_decoding: convert to new decoding API 2020-05-12 09:37:47 +02:00
Anton Khirnov e4edf220e5 doc/examples/demuxing_decoding: drop -refcount
Non-refcounted frames are deprecated and there is no good reason to use
them.
2020-05-12 09:37:47 +02:00
Lynne dccd07f66d
hwcontext_vulkan: expose enabled device and instance extensions
This solves a huge oversight - it lets users reliably use their own
AVVulkanDeviceContext. Otherwise, the extensions supplied and enabled
are not discoverable by anything outside of hwcontext_vulkan.
Also clarifies that any user-supplied VkInstance must be at least 1.1.
2020-05-10 23:20:48 +01:00
Lynne 3c5e5a5095
hwcontext_vulkan: let users enable device and instance extensions using options
Also documents all options supported by the hwdevice.
This lets users enable all extensions they need without writing their own
instance initialization code.
2020-05-10 23:20:47 +01:00
Lou Logan d163e0ecbc doc/encoders: remove unsubstantiated ffaacenc > fdk-aac claim
After this claim was made in e34e361 kamedo2 did an in-depth ABX
test comparing these encoders:

https://hydrogenaud.io/index.php?topic=111085.0

Result: FFmpeg AAC wasn't as good as libfdk_aac on average.

I know some things have changed since then such as, "use the fast
coder as the default" (fcb681ac) for example, so maybe the situation
is different now.

However, I am unaware of any recent comparison. So without any
substantiation we shouldn't make such a blantant claim.

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2020-05-08 11:10:01 -08:00
Michael Niedermayer e38adc197e Revert "doc/mailing-list-faq: Mention current problem with GMX"
mails to GMX seem working again

This reverts commit cd11fbcfb0.
2020-05-08 13:29:43 +02:00
Marton Balint 2035620b7c avcodec/pcm_rechunk_bsf: add bitstream filter to rechunk pcm audio
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-07 23:12:24 +02:00
Steven Liu 0b0a36b4f1 doc/muxers: remove hls_fmp4_init_resend parameter
the parameter should boolean
2020-05-04 13:39:44 +08:00
Limin Wang d8bc4d23e3 avcodec/prores_metadata_bsf: add arib-std-b67 format support
It's based on the following specs:
RDD 45:2017 - SMPTE Registered Disclosure Doc - Interoperable Master Format - Application ProRes

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-03 05:28:33 +08:00
Limin Wang 2d17f43fe1 avcodec/prores_metadata_bsf: add smpte2084 format support
It's based on the following specs:
RDD 36:2015 - SMPTE Registered Disclosure Doc - Apple ProRes Bitstream Syntax and Decoding Process

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-03 05:28:33 +08:00
Limin Wang 83ed11b12e doc/protocols: clarify timeout and latency unit of measurement for SRT
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-03 05:28:32 +08:00
vectronic a75924ec88 fftools/ffprobe: show closed caption info in the stream dump
Signed-off-by: vectronic <hello.vectronic@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-02 19:14:08 +02:00
Michael Niedermayer cd11fbcfb0 doc/mailing-list-faq: Mention current problem with GMX
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-02 14:27:27 +02:00
Marton Balint d695762949 avformat/hlsenc: add support for microseconds since epoch based sequence number
Sequence numbers of segments should be unique, if an encoder is using shorter
than 1 second segments and it is restarted, then future segments will be using
already used sequence numbers if initial sequence number is based on the number
of seconds since epoch and not microseconds.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-01 17:22:58 +02:00
Limin Wang e7626e4e79 doc/utils: add more examples for valid time duration
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-01 22:57:29 +08:00
Paul B Mahol 0a181c2cb1 avfilter/af_crossfeed: make options runtime configurable 2020-04-30 12:18:36 +02:00
Paul B Mahol 35d6001815 avfilter/af_crossfeed: make slope configurable 2020-04-30 12:18:36 +02:00
Paul B Mahol c7d8082357 avfilter: add asubboost filter 2020-04-30 12:18:36 +02:00
Paul B Mahol 2970846fc1 avfilter/vf_v360: make FOV adjusted for dual fisheye too
Remove any usage of padding for this format.
2020-04-29 19:18:25 +02:00
Paul B Mahol d8147c4e2d avfilter/af_amix: make weights option runtime configured 2020-04-29 19:18:25 +02:00
Steven Liu d813e43b3d avfilter/vf_v360: adjustment out_pad and in_pad maximum value to 1/10
Because not every user know about in_pad and out_pad reasonable value range
so maybe try to set 1.0, but setting 1.0 is so hugh to get an fatal error.

Suggested-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-04-29 13:48:02 +01:00
Paul B Mahol b29b934e4f avfilter/f_interleave: add duration option 2020-04-25 12:35:22 +02:00
Jun Zhao 5a2a199031 lavu/version: bump minor version for DOVI sidedata
bump minor version for DOVI sidedata, because added the dovi_meta.h
as lavu API part. Also update APIchanges.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-04-25 09:40:52 +08:00
Zane van Iperen 3e22e738c0 avcodec: add support for Cunning Developments' ADPCM
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-24 19:43:04 +02:00
Jun Zhao 54f100272a doc/APIChanges: add AV_PKT_DATA_DOVI_CONF entry
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-04-23 08:06:42 +08:00
Marton Balint 422f0a6136 avformat/mpegtsenc: use standard pids for m2ts
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-04-21 21:28:29 +02:00
Andreas Rheinhardt e3c54b549a avformat/matroskaenc: Redo handling of FlagDefault
Up until now, the Matroska muxer would mark a track as default if it had
the disposition AV_DISPOSITION_DEFAULT or if there was no track with
AV_DISPOSITION_DEFAULT set; in the latter case even more than one track
of a kind (audio, video, subtitles) was marked as default which is not
sensible.

This commit changes the logic used to mark tracks as default. There are
now three modes for this:
a) In the "infer" mode the first track of every type (audio, video,
subtitles) with default disposition set will be marked as default; if
there is no such track (for a given type), then the first track of this
type (if existing) will be marked as default. This behaviour is inspired
by mkvmerge. It ensures that the default flags will be set in a sensible
way even if the input comes from containers that lack the concept of
default flags. This mode is the default mode.
b) The "infer_no_subs" mode is similar to the "infer" mode; the
difference is that if no subtitle track with default disposition exists,
no subtitle track will be marked as default at all.
c) The "passthrough" mode: Here the track will be marked as default if
and only the corresponding input stream had disposition default.

This fixes ticket #8173 (the passthrough mode is ideal for this) as
well as ticket #8416 (the "infer_no_subs" mode leads to the desired
output).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-21 08:36:20 +02:00
James Almer ff327a58f1 avformat/dashenc: add a PlaybackRate element
Signed-off-by: James Almer <jamrial@gmail.com>
2020-04-20 13:49:15 -03:00
James Almer fd0f110a37 doc/muxers: fix some dashenc option names
Signed-off-by: James Almer <jamrial@gmail.com>
2020-04-20 13:49:15 -03:00
Paul B Mahol 4457f75c65 avfilter: add maskedthreshold filter 2020-04-18 12:34:49 +02:00
Paul B Mahol 9987f6d01e avfilter: add tmedian filter 2020-04-18 12:34:49 +02:00
Paul B Mahol 24db9372eb avfilter/af_astats: add noise floor count stat 2020-04-17 13:28:01 +02:00
Paul B Mahol 87b4fb65a8 avfilter/af_astats: measure noise floor 2020-04-17 13:26:30 +02:00
Philip Langdale 22b25b3ea5 avcodec: Add explicit capability flag for encoder flushing
Previously, there was no way to flush an encoder such that after
draining, the encoder could be used again. We generally suggested
that clients teardown and replace the encoder instance in these
situations. However, for at least some hardware encoders, the cost of
this tear down/replace cycle is very high, which can get in the way of
some use-cases - for example: segmented encoding with nvenc.

To help address that use case, we added support for calling
avcodec_flush_buffers() to nvenc and things worked in practice,
although it was not clearly documented as to whether this should work
or not. There was only one previous example of an encoder implementing
the flush callback (audiotoolboxenc) and it's unclear if that was
intentional or not. However, it was clear that calling
avocdec_flush_buffers() on any other encoder would leave the encoder in
an undefined state, and that's not great.

As part of cleaning this up, this change introduces a formal capability
flag for encoders that support flushing and ensures a flush call is a
no-op for any other encoder. This allows client code to check if it is
meaningful to call flush on an encoder before actually doing it.

I have not attempted to separate the steps taken inside
avcodec_flush_buffers() because it's not doing anything that's wrong
for an encoder. But I did add a sanity check to reject attempts to
flush a frame threaded encoder because I couldn't wrap my head around
whether that code path was actually safe or not. As this combination
doesn't exist today, we'll deal with it if it ever comes up.
2020-04-15 14:54:42 -07:00
Steven Liu 152f61e29b avformat/hlsenc: add hls_fmp4_init_resend option
add option for resend init file after m3u8 refresh everytime.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-04-15 12:45:16 +08:00
Gyan Doshi 2e2fa2d6e6 doc/filters: clarify metadata and logging for blackdetect 2020-04-13 11:23:24 +05:30
Wang Cao bd3389e9f4 avcodec/libaomenc.c: Add a libaom command-line option 'tune'
Signed-off-by: Wang Cao <wangcao@google.com>
Signed-off-by: James Zern <jzern@google.com>
2020-04-11 15:12:34 -07:00
Anton Khirnov 1f4cf92cfb pthread_frame: merge the functionality for normal decoder init and init_thread_copy
The current design, where
- proper init is called for the first per-thread context
- first thread's private data is copied into private data for all the
  other threads
- a "fixup" function is called for all the other threads to e.g.
  allocate dynamically allocated data
is very fragile and hard to follow, so it is abandoned. Instead, the
same init function is used to init each per-thread context. Where
necessary, AVCodecInternal.is_copy can be used to differentiate between
the first thread and the other ones (e.g. for decoding the extradata
just once).
2020-04-10 15:24:54 +02:00
Anton Khirnov 665e5b0fba lavc: replace AVCodecInternal.allocate_progress with an internal cap
This is a constant codec property, so a capability flag is more appropriate.
2020-04-10 14:16:39 +02:00
Anton Khirnov 672946c7fe avcodec.h: split AVCodecDescriptor API into its own header 2020-04-10 14:15:14 +02:00
Anton Khirnov c6978418b8 avcodec.h: split codec IDs into their own header 2020-04-10 13:57:21 +02:00
Anton Khirnov 9875fd24ce avcodec.h: split AVPacket API into its own header 2020-04-10 13:54:03 +02:00
Limin Wang cd8c5e89ba avformat: add subtitle support in master playlist m3u8
Test with the following command for the webvtt subtitle:
$ ./ffmpeg -y -i input_with_subtitle.mkv \
 -b✌️0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \
 -b🅰️0 256k \
 -c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0🅰️0 -map 0:s:0 \
 -f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle" \
 -master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \
 10 -master_pl_publish_rate 10  -hls_flags \
 delete_segments+discont_start+split_by_time ./tmp/video.m3u8

Check the master m3u8:
$ cat tmp/master.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitle",NAME="subtitle_0",DEFAULT=YES,URI="video_vtt.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=6056600,RESOLUTION=1280x720,CODECS="avc1.4d4829,mp4a.40.33",SUBTITLES="subtitle"
video.m3u8

Check the result by convert to mkv:
$ ./ffmpeg -strict experimental -i ./tmp/master.m3u8 -c:v copy -c:a mp2 -c:s srt ./test.mkv

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-04-08 23:02:41 +08:00
Paul B Mahol 3f9fd9dcfd avfilter/vf_xfade: add slice transitions 2020-04-07 13:51:25 +02:00
Guo, Yejun 7e4527e8fa avfilter/vf_derain.c: put all the calculation in model file.
currently, the model outputs the rain, and so need a subtraction
in filter c code to get the final derain result.

I've sent a PR to update the model file and accepted, see at
https://github.com/XueweiMeng/derain_filter/pull/3

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-04-07 11:04:47 +08:00
Stephen Hutchinson 7b0f7a7f3b doc/general: update avisynth docs with a way to install just the headers using CMake
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-04-05 11:51:08 +02:00
Stephen Hutchinson 6e959ad680 doc/general: AviSynth+ works on Linux now, AvxSynth is gone.
Related to this are the following changes:
* Mention the GNUmakefile that AviSynth+ provides for installing
  just the headers.
* Expand on users installing AviSynth on their system a little
  more.
2020-04-05 01:23:46 +02:00
Paul B Mahol ec7fb45240 avfilter/vf_v360: add pannini input support 2020-04-04 14:16:28 +02:00
Gyan Doshi 2d6a89872e ffplay: always show stats at all log levels if requested by user
Since 3b491c5a50, stats would be hidden if loglevel was lower than
info, even if -stats was set.

Fixes #6962
2020-04-04 15:17:24 +05:30
Andreas Rheinhardt 06f108907d avformat/matroskaenc: Don't fail if reserved Cues space doesn't suffice
When the user opted to write the Cues at the beginning, the Cues were
simply written without checking in advance whether enough space has been
reserved for them. If it wasn't enough, the data following the space
reserved for the Cues was simply overwritten, corrupting the file.

This commit changes this by checking whether enough space has been
reserved for the Cues before outputting anything. If it isn't enough,
no Cues will be output at all and the file will be finalized normally,
yet writing the trailer will nevertheless return an error to notify
the user that his wish of having Cues at the front of the file hasn't
been fulfilled.

This change opens new usecases for this option: It is now safe to use
this option to e.g. record live streams or to use it when muxing the
output of an expensive encoding, because when the reserved space turns
out to be insufficient, one ends up with a file that just lacks Cues
but is otherwise fine.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-02 19:22:51 +02:00
Paul B Mahol b00b935d99 avfilter/vf_v360: add lagrange9 interpolation 2020-04-02 12:25:37 +02:00
Andreas Rheinhardt 4cb0dda555 avformat/avformat: Update av_read_frame() documentation
This commit updates the documentation of av_read_frame() to match its
actual behaviour in several ways:

1. On success, av_read_frame() always returns refcounted packets.
2. It can handle uninitialized packets.
3. On error, it always returns blank packets.

This will allow callers to not initialize or unref unnecessarily.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-03-29 03:58:30 +02:00
Lou Logan 3cb099e9ab doc/filters: add tpad default values
Signed-off-by: Lou Logan <lou@lrcd.com>
2020-03-28 11:44:09 -08:00
Yaroslav Pogrebnyak 4976b102d8 avfilter: add vf_overlay_cuda
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-03-28 18:39:40 +01:00
Andreas Rheinhardt c52ec0367d avcodec/avcodec, avpacket: Return blank packet on av_packet_ref() failure
Up until now, it was completely unspecified what the content of the
destination packet dst was on error. Depending upon where the error
happened calling av_packet_unref() on dst might be dangerous.

This commit changes this by making sure that dst is blank on error, so
unreferencing it again is safe (and still pointless). This behaviour is
documented.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-03-28 03:59:15 +01:00
Andreas Rheinhardt ed18ec5577 doc/developer.texi: Add variadic macros to allowed C language features
They are used in several places like CBS.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-03-26 19:29:54 +01:00
Andriy Gelman 140ce8ada6 doc/general: Fix entry for AMQP
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-19 20:06:03 +01:00
Paul B Mahol 9a2d950f96 doc/general: remove dupe entry and fix section 2020-03-17 20:06:11 +01:00
Paul B Mahol 9f75d33ac3 doc/general: mention more DPCM codecs 2020-03-17 19:52:46 +01:00
Paul B Mahol a6fd2863ce doc/general: move apdcm zork to right place 2020-03-17 16:36:54 +01:00
Paul B Mahol 1bc8c38b53 doc/general: mention some added CRI stuff 2020-03-17 16:32:00 +01:00
Anton Khirnov 15546f772c examples/avio_dir_cmd: drop support for move/delete operations
They use non-public functions, which is unacceptable for a public API
example. Rename the example back to avio_list_dir.

This effectively reverts c84d208c27 and
767d780ec0.
2020-03-16 09:23:37 +01:00
Paul B Mahol 8f222573e9 avfilter/f_sendcmd: add more useful variables 2020-03-13 17:19:33 +01:00
Guo, Yejun e35f966853 avfilter/vf_dnn_processing.c: add frame size change support for planar yuv format
The Y channel is handled by dnn, and also resized by dnn. The UV channels
are resized with swscale.

The command to use espcn.pb (see vf_sr) looks like:
./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y -y tmp.espcn.jpg

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
2020-03-12 18:22:51 +08:00
Guo, Yejun bd50453894 avfilter/vf_dnn_processing.c: add planar yuv format support
Only the Y channel is handled by dnn, the UV channels are copied
without changes.

The command to use srcnn.pb (see vf_sr) looks like:
./ffmpeg -i 480p.jpg -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=tensorflow:model=srcnn.pb:input=x:output=y -y srcnn.jpg

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Reviewed-by: Pedro Arthur <bygrandao@gmail.com>
2020-03-12 18:22:39 +08:00
vectronic 05d27f342b API: add AV_PKT_DATA_ICC_PROFILE to AVPacketSideDataType
Signed-off-by: vectronic <hello.vectronic@gmail.com>
2020-03-10 15:10:06 +00:00
Andriy Gelman e6c5329a43 avformat/libzmq: Make default pkt_size value consistent with amqp
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-09 22:07:18 +01:00
Andriy Gelman 1676d0fb25 avformat: Add AMQP version 0-9-1 protocol support
Supports connecting to a RabbitMQ broker via AMQP version 0-9-1.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-09 22:07:17 +01:00
Zane van Iperen d90413e1e5 avcodec: add decoder for High Voltage Software's ALP ADPCM
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-03-09 01:43:51 +01:00
Gyan Doshi cfd9a65903 doc/demuxers: update mov section
Add details and all options for mov.c demuxer.
2020-03-06 11:05:30 +05:30
Jun Zhao 493f669efa doc/filters: add missed framesync part in filter docs
Add missed framesync part in filter docs.

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-03-05 14:09:10 +08:00
Paul B Mahol 70209000fd avfilter/f_sendcmd: implement expr flag
Make possible to parse expressions and store results as arguments
for target filters.
2020-03-03 20:38:56 +01:00
Paul B Mahol 580d68f90e avfilter/vf_v360: add half equirectangular input format 2020-03-03 12:21:16 +01:00
Paul B Mahol 6e1913a02e avfilter/vf_v360: add truncated square pyramid input format 2020-03-02 19:05:13 +01:00
Paul B Mahol 3dd81be866 avfilter/vf_v360: add truncated square pyramid output format 2020-03-02 17:43:25 +01:00
James Almer 3e9793cf38 doc/muxers: describe the default behavior of the write_prft dash muxer option
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-26 11:05:46 -03:00
Paul B Mahol b0a9960a77 avfilter/vf_v360: add barrel split format output support 2020-02-26 14:52:25 +01:00
Paul B Mahol ad65a15328 doc/filters: split tblend from blend 2020-02-25 13:23:14 +01:00
Paul B Mahol 2e6db121a8 doc/filters: mention commands for v360 filter 2020-02-25 13:17:32 +01:00
Paul B Mahol 72b6c8c99f avfilter: add Contrast Adaptive Sharpen video filter 2020-02-24 11:57:25 +01:00
Zane van Iperen c6cc9d9cd7 doc: add adpcm_ima_{ssi,apm}
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-02-24 11:15:43 +01:00
Kirill Savkov 4627a56d46 avcodec/libzvbi-teletextdec: add option to set default G0 character set
Signed-off-by: Kirill Savkov <k.savkov@inventos.ru>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-24 00:14:21 +01:00
Marton Balint 45085d8d3c doc/protocols: clarify SRT timeout options docs
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-24 00:14:21 +01:00
Marton Balint 006744bdbd avformat/libsrt: fix name of timeout option
rw_timeout is the generic URLcontext option, not the protocol specific timeout
option, also ?rw_timeout never worked because ?timeout was parsed instead.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-24 00:02:45 +01:00
James Almer d005a7cdfd avcodec: add an AVCodecContext flag to export PRFT side data on demand
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer c666689491 avcodec: add an AVCodecContext field to signal types of packet, frame, and coded stream side data to export
Add an initial mvs flag to is, analog to the export_mvs flags2 one.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
James Almer d2a33f665c avformat/dashenc: add Trick Mode support for AdaptationSets
Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-16 14:02:38 -03:00
Alyssa Milburn 732d77dc50 avcodec: add cdtoons decoder
This adds a decoder for Broderbund's sprite-based QuickTime CDToons
codec, based on the decoder I wrote for ScummVM.

Signed-off-by: Alyssa Milburn <amilburn@zall.org>
2020-02-15 10:55:33 +01:00
Paul B Mahol 5fe6c6b8f4 avfilter/vf_remap: add fill color option 2020-02-14 13:19:05 +01:00
Paul B Mahol 1c6a91990d avfilter: add pad opencl filter 2020-02-14 09:59:27 +01:00
Lynne e8f054b095 lavu/tx: implement 32 bit fixed point FFT and MDCT
Required minimal changes to the code so made sense to implement.
FFT and MDCT tested, the output of both was properly rounded.
Fun fact: the non-power-of-two fixed-point FFT and MDCT are the fastest ever
non-power-of-two fixed-point FFT and MDCT written.
This can replace the power of two integer MDCTs in aac and ac3 if the
MIPS optimizations are ported across.
Unfortunately the ac3 encoder uses a 16-bit fixed point forward transform,
unlike the encoder which uses a 32bit inverse transform, so some modifications
might be required there.

The 3-point FFT is somewhat less accurate than it otherwise could be,
having minor rounding errors with bigger transforms. However, this
could be improved later, and the way its currently written is the way one
would write assembly for it.
Similar rounding errors can also be found throughout the power of two FFTs
as well, though those are more difficult to correct.
Despite this, the integer transforms are more than accurate enough.
2020-02-13 17:10:34 +00:00
Paul B Mahol 47773f7979 avfilter/vf_xmedian: implement percentile option 2020-02-12 14:59:32 +01:00