Commit Graph

58 Commits

Author SHA1 Message Date
70a6c9f3b1
add create folder question 2020-10-13 14:17:47 +02:00
693be22a67
Merge branch 'master' of https://git.ffmpeg.org/ffmpeg 2020-10-09 17:50:24 +02:00
Nicolas George
697fb09e3d ffmpeg: add auto_conversion_filters option. 2020-09-08 14:16:08 +02:00
Marton Balint
53a4620fba fftools/ffmpeg: make specifying thread_queue_size turn on threaded input
Threaded input can increase smoothness of e.g. x11grab significantly. Before
this patch, in order to activate threaded input the user had to specify a
"dummy" additional input, with this change it is no longer required.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-07-29 23:10:12 +02: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
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
Marton Balint
f821ae8591 fftools/ffmpeg: use a bsf list instead of individual bsfs
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-02 19:14:08 +02:00
Mark Thompson
79c173cc19 ffmpeg: Remove the hw_device_ctx global
The ad-hoc libmfx setup code is the only place its still used, so move it
into that file.
2020-04-26 18:38:25 +01:00
Andreas Rheinhardt
889ad93c88 fftools/ffmpeg_opt: Check attachment filesize
The data of an attachment file is put into an AVCodecParameter's
extradata. The corresponding size field has type int, yet there was no
check for the size to fit into an int. As a consequence, it was possible
to create extradata with negative size (by using a big enough max_alloc).

Other errors were also possible: If SIZE_MAX < INT64_MAX (e.g. on 32bit
systems) then the file size might be truncated before the allocation;
and avio_read() takes an int, too, so one would not have read as much
as one desired.

Furthermore, the extradata is now padded as is required.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-17 01:34:07 +02:00
Jun Zhao
5633f9a8a2 fftools: fix hwaccels option dump redundancy
When QSV is enabled in FFmpeg, the command "ffmpeg -hwaccels" shows a
duplicate entry in acceleration methods for QSV:

Hardware acceleration methods:
vaapi
qsv
drm
opencl
qsv

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-04-14 11:42:29 +08:00
d31d27dd34
Merge branch 'master' of ssh://git.mrbesen.de:2222/MrBesen/ffmpeg 2020-03-29 14:56:24 +02:00
705bb1a7b9
Merge branch 'master' of https://git.ffmpeg.org/ffmpeg 2020-03-29 14:55:45 +02:00
Andreas Rheinhardt
d9f38b99dd fftools/ffmpeg_opt: Fix [u]int64_t specifier string
PRId64 and PRIu64 already expand to the complete specifier; adding
another 'd' at the end is wrong and just leads to warnings that say
that only an option like '-frames:v 2d' will be used, although said
option won't be accepted at all ('Expected int64 for frames:v but found
2d').

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-19 20:06:12 +01:00
1db161ec93
print (en/de)coders 2020-03-16 13:43:22 +01:00
Marton Balint
60e2634662 fftools/ffmpeg_opt: remove bogus warning of multiple -af and -vf usage
This is redundant after the last patch and also fixes ticket #7712.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-08 18:38:31 +01:00
Marton Balint
5d7788f9e8 fftools/ffmpeg_opt: warn about overwritten parsed options
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-08 18:38:31 +01:00
Timo Rothenpieler
cb3c77cfee ffmpeg: default hwaccel_output_format to cuda when hwaccel is cuvid
This ensures old commandlines using -hwaccel cuvid don't break due to
the recent removal of the the cuvid-specific hwaccel bringup.
2020-03-07 13:13:55 +01:00
James Almer
60b1f85b67 ffmpeg: remove superfluous custom cuvid hwaccel
It's a duplicate of the properly implemented nvdec libavcodec hwaccel

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-03-03 18:11:28 -03:00
Andreas Rheinhardt
21265f42ec fftools/ffmpeg_opt: Fix leak of options when parsing options fails
Fixes #8094.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-29 22:31:01 +01:00
Steven Liu
6087692a60 cmdutils: add show_help_protocol for get protocol options
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-01-30 17:10:21 +08:00
a1b65bf80a
Merge branch 'master' of https://git.ffmpeg.org/ffmpeg 2020-01-16 13:11:09 +01:00
Carl Eugen Hoyos
2e700ec3a7 fftools/ffmpeg_opt: Add a missing closing brackets.
Fixes ticket #8447.
2019-12-28 20:11:01 +01:00
4eb5c276cc
Merge branch 'master' of https://git.ffmpeg.org/ffmpeg 2019-11-13 16:30:42 +01:00
Andreas Rheinhardt
fc7b6d5574 fftools/ffmpeg_opt: Fix mixed declarations and code
Introduced in ed3c317d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-06 20:38:03 +01:00
Jun Zhao
ed3c317dea fftools/ffmpeg_opt: add error handle if av_asprintf return null
add error handle if av_asprintf return null.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-10-18 09:56:51 +08:00
88bd36b16b
ETA, hidebanner, max_muxing_queue_size 2019-10-08 11:22:52 +02:00
Lou Logan
04858650b1 ffmpeg_opt: remove errant space
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-09-27 15:17:15 -08:00
Lou Logan
419e5e7942 doc/ffmpeg: -timelimit is in user time
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-27 12:11:39 -08:00
Andreas Rheinhardt
2b1fcba8dd fftools/ffmpeg_opt: Fix signed integer overflow
Fixes ticket #8154.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-17 14:41:07 +02:00
Jun Zhao
11d3b03fcb ffmpeg_opt: Respect default disposition when select audio/video
Respect default disposition when select audio/video

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-07-03 10:33:44 +08:00
Carl Eugen Hoyos
301cee61fa ffmpeg_opt: Print a warning if more than one -vf/-af option was specified.
Fixes ticket #4184.
2019-01-15 00:27:05 +01:00
Gyan Doshi
3ba5eef2c7 ffmpeg: allow disabling streams by type for inputs
-vn/-an/-sn/-dn now works for input. Streams are still registered in
input_streams but they can't be automatically selected or mapped or
filtered.
2019-01-03 16:13:51 +05:30
Gyan Doshi
54109b1d14 ffmpeg: skip disabled streams
Fully discarded streams can't be selected for output or mapped or filtered.
Previously, a few packets from such streams, probably buffered for
stream probing, would get smuggled into output files.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-02 22:29:11 +01:00
xiaofeng
e78016b04a ffmpeg: break loop when dts_heuristic check done
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-30 22:23:02 +02:00
Gyan Doshi
acc9684dcd ffmpeg: block output == input for files
Fixes #4655
2018-09-17 13:48:28 +05:30
Gyan Doshi
4ac88ba548 fftools/ffmpeg: check sseof value and clash with ss
Prioritize -ss
2018-06-26 09:47:32 +05:30
Gyan Doshi
9c12938ec5 ffmpeg: mark sseof as an input-only option 2018-06-09 00:37:03 +05:30
Vishwanath Dixit
146cdf7e4b fftools/ffmpeg: fix for all forced key frames when 'copyts' is enabled
Forced key frames generation functionality was assuming the first PTS
value as zero, but, when 'copyts' is enabled, the first PTS can be any
big number. This was eventually forcing all the frames as key frames.
To resolve this issue, update has been made to use first input pts as
reference pts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-04 22:26:55 +02:00
Paul B Mahol
0b360cae1c make swresample optional for ffmpeg
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 12:38:03 +02:00
Jun Zhao
a675eed175 ffmpeg: support dump bit stream filter options.
Support dump bit stream filter option in ffmpeg -h full and
ffmpeg -h bsf=FooBar.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-16 02:09:59 +01:00
Jun Zhao
74afa54528 ffmpeg_opt: fix max_error_rate help info display issue.
ffmpeg -h display "max_error_rate" option help information have
been cut off, the root cause is used a wrong initial order.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-24 04:50:55 +01:00
Marton Balint
25a2d269bd fftools, tools, examples: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Carl Eugen Hoyos
6874945fbf fftools/ffmpeg_opt: Remove a write-only variable.
Fixes a warning:
fftools/ffmpeg_opt.c:2057:21: warning: variable 'file_oformat' set but not used
2018-01-08 00:17:00 +01:00
Rostislav Pehlivanov
6b35a83214 Remove the ffserver program
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-01-06 18:31:37 +00:00
James Almer
414a49d671 ffmpeg: use thread wrappers for the thread message functionality
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-04 15:22:09 -03:00
Carl Eugen Hoyos
ed4a0c7923 ffmpeg_opt: Constify hwaccel pointer.
Fixes a warning:
fftools/ffmpeg_opt.c:804:29: warning: assignment discards ‘const’ qualifier from pointer target type
2017-11-29 00:15:10 +01:00
Pan Bian
2ba6d7cb82 ffmpeg: Check read_ffserver_streams() return value
The function avformat_alloc_context() will return a NULL pointer on
failure. However, in function read_ffserver_streams(), its return value
is not validated and the subsequent dereference may result in a bad
memory access bug. Check its return value against NULL and avoid
potential NULL dereference.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 01:18:22 +01:00
Mark Thompson
b0cd14fb1d ffmpeg: Use codec hardware config to configure hwaccels
Removes specific support for all hwaccels supported by the generic code
(DXVA2, D3D11VA, NVDEC, VAAPI and VDPAU).
2017-11-26 21:41:19 +00:00
Vitaly _Vi Shukela
80ef3c8360 ffmpeg: Allow "-to" on input files in addition to "-t"
For some strange reason "-t" option was only implemented
for input files while both "-t" and "-to" were available
for use for output files. This made extracting a range from
input file inconvenient.

This patch enables -to option for input so one can do

    ffmpeg -ss 1:23:20 -to 1:27:22.3 -i myinput.mkv ...

Signed-off-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-19 04:38:29 +01:00
James Almer
e9025beacb ffmpeg: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00