summaryrefslogtreecommitdiff
path: root/fftools
Commit message (Collapse)AuthorAge
* ffplay: do not drain existing filters when seekingMarton Balint2018-09-01
| | | | | | | 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>
* ffmpeg: add correct field for raw pts in -progress reportGyan Doshi2018-08-28
| | | | | | | | | 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
* ffmpeg: simplify refcounting packets for the muxing queueJames Almer2018-08-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/qsv: add extra_hw_frames supportZhong Li2018-08-07
| | | | | | | | | | 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>
* cmdutils: print a more descriptive error message in show_help_bsf() when no ↵James Almer2018-07-28
| | | | | | | bsf is specified Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* ffplay: add support for various YUV conversion modesMarton Balint2018-07-13
| | | | | | | 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>
* ffmpeg: fix -stream_loop with multiple inputsMarton Balint2018-07-02
| | | | | | | | | | 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>
* ffmpeg: factorize input thread creation and destructionMarton Balint2018-07-02
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: make loglevel verbose for frame duration warningGyan Doshi2018-06-28
|
* fftools/ffmpeg: check sseof value and clash with ssGyan Doshi2018-06-26
| | | | Prioritize -ss
* ffmpeg: Treat subtitles like audio and video for non-monotonic dts.Hans Carlson2018-06-23
| | | | | | | Fixes ticket #4450. Fixes ticket #6248. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffplay: ignore keypress events before a window is createdMarton Balint2018-06-20
| | | | | | | | | | 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>
* fftools/cmdutils: Replace the number by macro for bprint initJun Zhao2018-06-17
| | | | | | Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/ffmpeg_filter: Replace the number by macro for bprint initJun Zhao2018-06-17
| | | | | | Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* fftools/ffmpeg: Replace the number by macro for bprint initJun Zhao2018-06-17
| | | | | | Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* ffmpeg: assert that audio packet duration in process_input_packet() is non ↵Michael Niedermayer2018-06-14
| | | | | | negative Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Fallback to duration if sample rate is unavailableMichael Niedermayer2018-06-14
| | | | | | | | | 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>
* ffmpeg: Fail if the user requested impossible subtitle encoding.Carl Eugen Hoyos2018-06-09
| | | | Fixes ticket #7239.
* ffmpeg: mark sseof as an input-only optionGyan Doshi2018-06-09
|
* fftools/ffmpeg: fix for all forced key frames when 'copyts' is enabledVishwanath Dixit2018-06-04
| | | | | | | | | | 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>
* ffplay: Print codec_name if decoder for codec_id could not be found.Carl Eugen Hoyos2018-05-30
| | | | Reviewed-by: Marton Balint
* cmdutils: dump supported hardware devices in print_codec()Jun Zhao2018-05-28
| | | | | | | dump the supported hardware devices for codec when use the command like ./ffmpeg -h decoder=h264. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* cmdutils: print missing caps in print_codec().Jun Zhao2018-05-28
| | | | | | print full caps type in print_codec(). Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* ffprobe: fix SEGV when new streams are addedAman Gupta2018-05-09
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* fftools/ffmpeg: properly initialize output stream field orderTobias Rapp2018-05-02
| | | | | | | 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>
* fftools/ffmpeg: fix mixed code and declarationsJames Almer2018-04-30
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was ↵Marton Balint2018-04-30
| | | | | | | | | | 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>
* fftools/ffmpeg: change fps progress log message to show two decimal digitsAndré Camargo2018-04-28
| | | | | | Useful when transcoding videos at 29.97 fps because delivers a more accurate result for monitoring. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Add system time and real time to benchmarking.Mark Wachsler2018-04-28
| | | | | | | 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>
* make swresample optional for ffmpegPaul B Mahol2018-04-25
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* ffplay: Fix realloc_texture when input texture is NULL.Matt Oliver2018-04-18
| | | | | | | | | 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>
* ffprobe: report unavailable SAR correctly in stream infoTimo Teräs2018-04-17
| | | | | | | | | 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>
* ffmpeg: allow setting attached_pic dispositionTimo Teräs2018-04-04
| | | | | | | | 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>
* avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPALwm42018-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fftools/cmdutils: add support for level flag in loglevel option parserTobias Rapp2018-04-03
| | | | | | | | | | Allows to manage the AV_LOG_PRINT_LEVEL flag as a prefix to the loglevel option value, similar to the existing AV_LOG_SKIP_REPEATE flag. Adds support for setting flags relative to the existing value by using a +/- prefix. Previous version reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack). Signed-off-by: Josh de Kock <josh@itanimul.li>
* cmdutils: fix new API break the "ffmpeg -muxers/demuxers"Jun Zhao2018-04-02
| | | | | | | fix commit 2238190 break the "ffmpeg -muxers/demuxers". Signed-off-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Josh de Kock <josh@itanimul.li>
* ffmpeg: prevent premature EOF in sub2video with nullptr AVSubtitlesJan Ekström2018-04-01
| | | | | | | | | | | | | | | | With certain types of input and the filter chain getting re-initialized or re-configured, multiple nullptr AVSubtitles can get pushed into sub2video_update() in a row from sub2video_heartbeat. This causes end_pts, and on the next round pts, to become INT64_MAX, latter of which signals EOF in framesync, leading to complete loss of subtitles from that point on. Thus, check that the sub2video.end_pts is smaller than INT64_MAX in a similar fashion to sub2video_flush before sending out the nullptr AVSubtitle. This keeps premature EOFs from happening in framesync and the subtitle overlay is kept past the filter chain re-initializations/configurations.
* cmdutils: use new APIsJosh de Kock2018-03-31
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* fftools/ffmpeg: Remove an unused variable.Carl Eugen Hoyos2018-03-30
| | | | | Fixes a warning: fftools/ffmpeg.c:2201:22: warning: unused variable 'fg'
* ffmpeg: do not finish output streams manually on eof even if no input is ↵Marton Balint2018-03-29
| | | | | | | | | | | | | provided The generic code should be able to finish the streams just fine initializing and flushing the filters and codecs properly. Fixes the following command: ffmpeg -f lavfi -i "testsrc=d=0.1[out0];aevalsrc=0:d=0[out1]" -af apad -shortest -f framecrc - Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: fallback to codecpar parameters on input filter eofMarton Balint2018-03-29
| | | | | | | | Fixes ticket #6854 and the following simpler case: ffmpeg -f lavfi -i testsrc=d=1 -f lavfi -i testsrc=d=0 -filter_complex overlay -f null none Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: pass reference counted packet on codec copy when possibleJames Almer2018-03-23
| | | | | | | | Should prevent unnecessary copy of data in cases where new references to the packet are created within the muxer or a bitstream filter. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: remove dead call to av_parser_change()James Almer2018-03-23
| | | | | | | | | | | It's been a noop for years, and it's been argued that in-band headers should not be forcedly removed without the user's explicit request. Also, as the FIXME line stated, this is a job for a bitstream filter like extract_extradata, remove_extradata, dump_extradata, and filter_units. Signed-off-by: James Almer <jamrial@gmail.com>
* cmdutils: print supported codecs in show_help_bsf()James Almer2018-03-22
| | | | | Tested-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg.c - drain all decoded frames during stream_loop flushGyan Doshi2018-03-20
| | | | | | | | | | | | | | When a decoded stream is being looped, after each post-EOF rewind, decoders are flushed in seek_to_start(). This only drains 1 frame, and thus the output has a few frames missing at the tail of each iteration except the last. With this patch, process_input is looped till process_input_packet reaches EOF. Fixes #7081 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: remove a superfluous line breakJames Almer2018-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: support dump bit stream filter options.Jun Zhao2018-03-16
| | | | | | | | 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>
* ffprobe: fix infinite loop in subtitle decodingMarton Balint2018-03-12
| | | | | | | | | Fixes a regression since 2a88ebd096f3c748a2d99ed1b60b22879b3c567c which caused an infinite loop in the subtitle decoding. Fixes ticket #6796. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg: update print_report to use AVBPrint APITobias Rapp2018-03-05
| | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>