1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

121 Commits

Author SHA1 Message Date
Jan Ekström
3a36b0c4b8 ffmpeg: improve the intra stream discontinuity message
Now it actually tells which stream from which input and of
which type had an absolute DTS discontinuity larger than
dts_delta_threshold.
2018-12-18 21:04:57 +02:00
Marton Balint
418c90faac ffplay: fix -x and -y options when only one of them is used
Previously if only -y was used then nothing happened, if only -x then zero
window height was set which is undefined in SDL and caused a black window.

From now on if only one dimension is set we calculate the other based on
size/aspect of the shown content.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-12-02 00:57:10 +01:00
Marton Balint
9a39c5449f ffplay: convert float math to int math in calculate_display_rect
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-12-02 00:57:09 +01:00
Carl Eugen Hoyos
698574ac5d ffmpeg: Avoid duplicating Closed Captions when increasing frame rate.
Fixes ticket #7506.
2018-11-27 18:38:09 +01:00
Jun Zhao
1ffac23885 fftools/ffmpeg: delete the unused code.
There are come from 2012 ago and have never been used from this
time.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-11-27 10:45:25 +08:00
Jun Zhao
7608809ae4 fftools/ffprobe: Indent the code.
commit 196765a7cc missed the reindet.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-11-27 10:45:25 +08:00
Michael Niedermayer
3504004879 fftools/ffmpeg: Repair reinit_filter feature
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-16 10:13:42 +01:00
Jun Zhao
e24a754916 fftools/ffmpeg: Indent the code
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-11-11 09:12:50 +08:00
Jun Zhao
3eccf5be92 fftools/ffmpeg: Put the variable declaration at uppper for block.
move the variable declaration at start of upper for block and
remove the redundant brace.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-11-11 09:12:39 +08:00
Jun Zhao
81f2a9f136 fftools/ffmpeg: Remove the micor like "#if 1"
They are come from 2003 and delete them.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-11-11 09:12:26 +08:00
Marton Balint
f099946faf ffmpeg: log corrupted packets and frames
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-14 23:52:41 +02:00
Marton Balint
6e6ecdf44d ffmpeg: check return value of avcodec_parameters_from_context
Fixes Coverity CID 1427273.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-09 21:46:28 +02:00
Dave Rice
1431ff2d37 ffplay: add options to specify window position
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-07 20:44:22 +02: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
1a4a8df249 ffplay: add option to allow custom seek interval
At present, left and right keys are hardcoded to seek by 10 seconds.
2018-09-05 23:52:56 +05:30
Marton Balint
9fee22dbdd ffplay: do not drain existing filters when seeking
After a seek we drop all frames from the filter anyway. Audio filters already
had a similar approach.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-01 21:53:58 +02:00
Gyan Doshi
26dc763245 ffmpeg: add correct field for raw pts in -progress report
PTS is in microseconds, so correct field name is out_time_us.

Old field out_time_ms kept for now - will be removed after a suitable transition
period.

Fixes #7345
2018-08-28 10:11:01 +05:30
James Almer
b955a33314 ffmpeg: simplify refcounting packets for the muxing queue
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-07 18:42:35 -03:00
Zhong Li
6434b84460 fftools/qsv: add extra_hw_frames support
Currently extra_hw_frames can't be applied to qsv since it
doesn't call function avcodec_get_hw_frames_parameters().

Give an option to fix ticket #7261 though it is not a perfect soultion
(allocate the minimum pool size internally and automatically).

Signed-off-by: Zhong Li <zhong.li@intel.com>
2018-08-07 11:26:40 +08:00
James Almer
d228df6ff3 cmdutils: print a more descriptive error message in show_help_bsf() when no bsf is specified
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-07-28 11:14:45 -03:00
Marton Balint
85bfcc46d1 ffplay: add support for various YUV conversion modes
SDL from version 2.0.8 has support for full range YUV and specifying
BT601/BT709 color space for YUV->RGB conversion.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-13 22:24:33 +02:00
Marton Balint
da36bcbeb7 ffmpeg: fix -stream_loop with multiple inputs
The input thread needs to be properly cleaned up and re-initalized before we
can start reading again in threaded mode. (Threaded input reading is used when
there is mode than one input file).

Fixes ticket #6121 and #7043.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-02 11:58:08 +02:00
Marton Balint
b181cd359b ffmpeg: factorize input thread creation and destruction
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-02 11:58:08 +02:00
Gyan Doshi
07987404a8 ffmpeg: make loglevel verbose for frame duration warning 2018-06-28 14:08:51 +05:30
Gyan Doshi
4ac88ba548 fftools/ffmpeg: check sseof value and clash with ss
Prioritize -ss
2018-06-26 09:47:32 +05:30
Hans Carlson
a790813739 ffmpeg: Treat subtitles like audio and video for non-monotonic dts.
Fixes ticket #4450.
Fixes ticket #6248.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-23 01:06:29 +02:00
Marton Balint
e8050aa791 ffplay: ignore keypress events before a window is created
Current ffplay code assumes that the read thread is in its main loop before any
key events are captured, but apparently on IOS even keypresses without a window
are forwared.

Fixes ticket #7252.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-20 22:26:41 +02:00
Jun Zhao
bd47cca6a7 fftools/cmdutils: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 10:00:23 +08:00
Jun Zhao
df9fe79b3c fftools/ffmpeg_filter: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Jun Zhao
24be912827 fftools/ffmpeg: Replace the number by macro for bprint init
Replace the number by macro for bprint init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-06-17 09:59:33 +08:00
Michael Niedermayer
28d33c252e ffmpeg: assert that audio packet duration in process_input_packet() is non negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-14 18:55:45 +02:00
Michael Niedermayer
16d8b13b3b fftools/ffmpeg: Fallback to duration if sample rate is unavailable
Regression since: af1761f7
Fixes: Division by 0
Fixes: ffmpeg_crash_1

Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-14 18:55:45 +02:00
Carl Eugen Hoyos
5686c4489a ffmpeg: Fail if the user requested impossible subtitle encoding.
Fixes ticket #7239.
2018-06-09 21:34:27 +02:00
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
Carl Eugen Hoyos
53d6d4f266 ffplay: Print codec_name if decoder for codec_id could not be found.
Reviewed-by: Marton Balint
2018-05-30 01:09:49 +02:00
Jun Zhao
81b77e7bf1 cmdutils: dump supported hardware devices in print_codec()
dump the supported hardware devices for codec when use the command
like ./ffmpeg -h decoder=h264.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-28 18:21:48 +08:00
Jun Zhao
90acf168a6 cmdutils: print missing caps in print_codec().
print full caps type in print_codec().

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-28 18:21:35 +08:00
Aman Gupta
12ceaf0fba ffprobe: fix SEGV when new streams are added
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-09 12:30:17 -07:00
Tobias Rapp
a150b2e3a0 fftools/ffmpeg: properly initialize output stream field order
Fixes stream field order written by avformat_write_header when "top"
option is specified on the command-line.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-05-02 08:35:08 +02:00
James Almer
e3866ea20d fftools/ffmpeg: fix mixed code and declarations
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-30 18:22:51 -03:00
Marton Balint
7033654f7f Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was used
Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and
avfiltergraph.c pick_format() until a paletted pixel format without alpha is
introduced.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:51:31 +02:00
André Camargo
1322b00060 fftools/ffmpeg: change fps progress log message to show two decimal digits
Useful when transcoding videos at 29.97 fps because delivers a more accurate result for monitoring.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-28 18:08:52 +02:00
Mark Wachsler
9d75354963 fftools/ffmpeg: Add system time and real time to benchmarking.
The -benchmark and -benchmark_all options now show user, system, and real time,
instead of just user time.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-28 18:08:52 +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
Matt Oliver
6be690685a ffplay: Fix realloc_texture when input texture is NULL.
SDL_QueryTexture and SDL_DestroyTexture require that the input texture
pointer be non-null. Debug builds of SDL will correctly check for this
and break program execution. This patch fixes this by checking the
status of the texture pointer.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2018-04-18 18:57:07 +10:00
Timo Teräs
c663dce031 ffprobe: report unavailable SAR correctly in stream info
av_guess_sample_aspect_ratio() will return undefined or missing
value as {0,1}. This fixes show_stream() to check numerator to
display 'N/A' when appropriate. show_frame() does this already
correctly.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2018-04-17 20:11:31 +01:00
Timo Teräs
94d831f388 ffmpeg: allow setting attached_pic disposition
This is used to signal that image should be stored in metadata
as cover image.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-04 19:09:28 +02:00
wm4
d6fc031caf avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL
PSEUDOPAL pixel formats are not paletted, but carried a palette with the
intention of allowing code to treat unpaletted formats as paletted. The
palette simply mapped the byte values to the resulting RGB values,
making it some sort of LUT for RGB conversion.

It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8,
GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap
formats. The last one, GRAY8, is more common, but its treatment is
grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming
from typical Y video planes was not mapped to the correct RGB values.
This cannot be fixed, because AVFrame.color_range can be freely changed
at runtime, and there is nothing to ensure the pseudo palette is
updated.

Also, nothing actually used the PSEUDOPAL palette data, except xwdenc
(trivially changed in the previous commit). All other code had to treat
it as a special case, just to ignore or to propagate palette data.

In conclusion, this was just a very strange old mechnaism that has no
real justification to exist anymore (although it may have been nice and
useful in the past). Now it's an artifact that makes the API harder to
use: API users who allocate their own pixel data have to be aware that
they need to allocate the palette, or FFmpeg will crash on them in
_some_ situations. On top of this, there was no API to allocate the
pseuo palette outside of av_frame_get_buffer().

This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes
the pseudo palette optional. Nothing accesses it anymore, though if it's
set, it's propagated. It's still allocated and initialized for
compatibility with API users that rely on this feature. But new API
users do not need to allocate it. This was an explicit goal of this
patch.

Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I
first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL
macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0.

Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition,
FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation
functions manually changed to not allocating a palette.
2018-04-03 17:53:00 +02:00