summaryrefslogtreecommitdiff
path: root/fftools
Commit message (Collapse)AuthorAge
...
* ffprobe: stop printing deprecated fieldsAnton Khirnov2021-02-22
| | | | | | | | | | | The FF_API macros are private and must not be used by external callers. As the fields in question are to be removed without replacement, just drop them. The fields are: AVPacket.convergence_duration AVCodecContext.time_base AVCodecContext.timecode_frame_start AV_PIX_FMT_FLAG_PSEUDOPAL pixel descriptor flag
* ffprobe: drop code accessing deprecated AVStream.codecAnton Khirnov2021-02-22
|
* ffprobe: do not use deprecated AVStream.codec for max bitrateAnton Khirnov2021-02-22
| | | | Use the decoder context instead.
* ffprobe: remove an unnecessary deprecation guardAnton Khirnov2021-02-22
| | | | | | The code it is guarding is not accessing anything deprecated (disregarding the fact that a library caller must not use FF_API deprecation guards).
* fftools/ffplay: reindent and some minor cosmeticsMarton Balint2021-02-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: use av_packet_alloc() to allocate packetsMarton Balint2021-02-19
| | | | | | Heavily based on a patch by James Almer. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: use context AVPacket in decoder_decode_frame()Marton Balint2021-02-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: get rid of flush_pktMarton Balint2021-02-19
| | | | | | The packet serial can be used instead to detect when a flush is needed. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: add -fpsmax to clamp output framerateGyan Doshi2021-02-05
| | | | Useful when encoding in batch or with aberrant inputs.
* avformat/mxfenc: prefer to use the configured metadataLimin Wang2021-02-05
| | | | | | | | | | | | | | | | The metadata company_name, product_name, product_version from input file will be deleted to avoid overwriting information Please to test with below commands: ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf and ./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy \ -metadata company_name="xxx" \ -metadata product_name="xxx" \ -metadata product_version="xxx" \ out.mxf Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* fftools/ffmpeg_filter: Make functions only used locally staticAndreas Rheinhardt2021-02-02
| | | | | | Also remove some declarations of inexistent functions while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffmpeg_filter: Remove ist_in_filtergraphAndreas Rheinhardt2021-02-02
| | | | | | Unused since af1761f7b5b1b72197dc40934953b775c2d951cc. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffmpeg_filter: Remove choose_sample_fmtAndreas Rheinhardt2021-02-02
| | | | | | Unused since 6b35a83214f1bc3fb38c9ea9c2cd3676f28709fa. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ffmpeg: remove dead code for -volGyan Doshi2021-01-31
| | | | It is applied via configure_input_audio_filter()
* avcodec: remove long dead debug_mv codeJames Almer2021-01-25
| | | | | | FF_API_DEBUG_MV has been zero since ffmpeg 4.0 Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg_opts: remove lowres checkJames Almer2021-01-21
| | | | | | | | | The st->codec values are updated based on the lowres factor by avformat_find_stream_info() when it runs an instance of the decoder internally, and the same thing happens in ffmpeg.c when we open ist->dec_ctx with avcodec_open2(), so these assignments are redundant. Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: use sigaction() instead of signal() on linuxAndriy Gelman2021-01-16
| | | | | | | | As per signal() help (man 2 signal) the semantics of using signal may vary across platforms. It is suggested to use sigaction() instead. Reviewed-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* doc/ffmpeg: document max_error_rateGyan Doshi2021-01-10
|
* Mark some pointers as constAndreas Rheinhardt2021-01-01
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ffmpeg: delay first statsGyan Doshi2020-12-24
| | | | | | Wait for all output files to be initialized before printing first stats. Avoids breaking output file dump report.
* ffmpeg: don't delay printing initial statsGyan Doshi2020-12-23
| | | | | | | The first stats is printed after the initial stats_period has elapsed. With a large period, it may appear that ffmpeg has frozen at startup. The initial stats is now printed after the first transcode_step.
* ffmpeg: add option stats_periodGyan Doshi2020-12-23
| | | | | | | | | At present, progress stats are updated at a hardcoded interval of half a second. For long processes, this can lead to bloated logs and progress reports. Users can now set a custom period using option -stats_period Default is kept at 0.5 seconds.
* ffmpeg: stop accessing deprecated stream-embedded codec contextAnton Khirnov2020-12-10
|
* fftools/ffprobe: add support for HDR10+ metadataMohammad Izadi2020-12-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/cmdutils: also print warnings when using -sinks and -sourcesMarton Balint2020-12-03
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: deprecate thread_safe_callbacksAnton Khirnov2020-11-27
| | | | | | | | | They add considerable complexity to frame-threading implementation, which includes an unavoidably leaking error path, while the advantages of this option to the users are highly dubious. It should be always possible and desirable for the callers to make their get_buffer2() implementation thread-safe, so deprecate this option.
* fftools/ffmpeg: fix the wrong bitrate and speed statsLimin Wang2020-10-31
| | | | | | | | | | | | | | | | The bitrate and speed stats are wrong if the copyts is enabled. Please test with below command: wget http://samples.mplayerhq.hu/MPEG2/foxksaz.ts ./ffmpeg -y -copyts -i ./foxksaz.ts -c:v libx264 -x264opts \ nal-hrd=cbr:force-cfr=1 -b:v 3500k -minrate 3500k -maxrate 3500k -bufsize \ 1000k -c:a mp2 -muxrate 4500k -vframes 1000 test.ts before: frame= 1000 fps=112 q=-1.0 Lsize= 9063kB time=09:10:12.41 bitrate= 2.2kbits/s speed=3.7e+03x after: frame= 1000 fps=112 q=-1.0 Lsize= 9062kB time=00:00:15.78 bitrate=4703.4kbits/s speed=1.77x Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* ffmpeg: move field order decision making to encoder initializationJan Ekström2020-10-29
| | | | | | | | | | | We now have the possibility of getting AVFrames here, and we should not touch the muxer's codecpar after writing the header. Results of FATE tests change as the MXF and Matroska muxers actually write down the field/frame coding type of a stream in their respective headers. Before this change, these values in codecpar would only be set after the muxer was initialized. Now, the information is also available for encoder and muxer initialization.
* ffmpeg: pass decoded or filtered AVFrame to output stream initializationJan Ekström2020-10-29
| | | | | | | | | | Additionally, reap the first rewards by being able to set the color related encoding values based on the passed AVFrame. The only tests that seem to have changed their results with this change seem to be the MXF tests. There, the muxer writes the limited/full range flag to the output container if the encoder is not set to "unspecified".
* ffmpeg: move A/V non-streamcopy initialization to a later pointJan Ekström2020-10-29
| | | | | | | | | | | | | | | | - For video, this means a single initialization point in do_video_out. - For audio we unfortunately need to do it in two places just before the buffer sink is utilized (if av_buffersink_get_samples would still work according to its specification after a call to avfilter_graph_request_oldest was made, we could at least remove the one in transcode_step). Other adjustments to make things work: - As the AVFrame PTS adjustment to encoder time base needs the encoder to be initialized, so it is now moved to do_{video,audio}_out, right after the encoder has been initialized. Due to this, the additional parameter in do_video_out is removed as it is no longer necessary.
* ffmpeg: move AVFrame time base adjustment into a functionJan Ekström2020-10-29
| | | | This will have to be called later for video down the line.
* ffmpeg: add a data size threshold for muxing queue sizeJan Ekström2020-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | This way the old max queue size limit based behavior for streams where each individual packet is large is kept, while for smaller streams more packets can be buffered (current default is at 50 megabytes per stream). For some explanation, by default ffmpeg copies packets from before the appointed seek point/start time and puts them into the local muxing queue. Before, it getting utilized was much less likely since as soon as the filter chain was initialized, the encoder (and thus output stream) was also initialized. Now, since we will be pushing the encoder initialization to when the first AVFrame is decoded and filtered - which only happens after the exact seek point is hit as packets are ignored until then - this queue will be seeing much more usage. In more layman's terms, this attempts to fix cases such as where: - seek point ends up being 5 seconds before requested time. - audio is set to copy, and thus immediately begins filling the muxing queue. - video is being encoded, and thus all received packets are skipped until the requested time is hit.
* ffmpeg.c: stop accessing private AVStream.codec_info_nb_framesAnton Khirnov2020-10-28
| | | | | Use AVSTREAM_EVENT_FLAG_NEW_PACKETS instead, which should provide the same information in this case.
* ffmpeg.c: rename 'area' to 'score'Anton Khirnov2020-10-28
| | | | | Other factors besides area are used to pick the best video stream, so the name 'area' is misleading.
* ffmpeg: deduplicate init_output_stream usage logicJan Ekström2020-10-17
| | | | | Adds a wrapper function, which handles any errors depending on how fatal a failure would be.
* fftools/ffprobe: use av_timecode_make_smpte_tc_string2Marton Balint2020-09-13
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools, libavcodec, libavfilter: Add const to some AVCodec *Andreas Rheinhardt2020-09-11
| | | | | | | | The user has no business modifying the underlying AVCodec. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ffplay: fix autoexit doesn't work in the case of pb->errorZhao Zhili2020-09-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: add auto_conversion_filters option.Nicolas George2020-09-08
|
* fftools/ffmpeg: Fix leak of AVFilterInOut in case of errorAndreas Rheinhardt2020-08-23
| | | | | | | | | | | | The AVFilterInOuts normally get freed in init_output_filter() when the corresponding streams get created; yet if an error happens before one reaches said point, they leak. Therefore this commit makes ffmpeg_cleanup free them, too. Fixes ticket #8267. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ffplay: do not set redundant channel count on abuffersink.Nicolas George2020-08-20
|
* fftools/ffmpeg: make specifying thread_queue_size turn on threaded inputMarton Balint2020-07-29
| | | | | | | | 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>
* ffprobe: Allow unknown format private AVOptionsDerek Buitenhuis2020-07-02
| | | | | | | | | | | | | | | | This useful, because by ffprobe's very nature, you use it to probe a file and find out what it is. Requiring every format private option to be known to the demuxer forces one to run ffprobe twice, if one wants to use ffprobe in a generic way. For example, say one wants to probe all user-uploaded files, while also ignoring edit lists for any MP4s that are uploaded. Currently, you'd have to run ffprobe twice: once to identify the format, and once again to actually probe the metadata you want. After this patch, you could set -ignore_editlist 1 on every call and only probe once. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* fftools/ffmpeg_filter: add -autoscale to disable/enable the default scaleLinjie Fu2020-06-18
| | | | | | | | | | | | | | | | | | | | | 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>
* fftools: switch to the new child class iteration APIAnton Khirnov2020-06-10
|
* fftools/ffmpeg: update text requesting samplesAndriy Gelman2020-06-01
| | | | | Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com> Reviewed-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg: add new abort_on flag which aborts if there is a stream ↵Marton Balint2020-05-26
| | | | | | which received no packets Signed-off-by: Marton Balint <cus@passwd.hu>
* Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov2020-05-22
| | | | Use 0, which selects the alignment automatically.
* cmdutils: drop libavformat/network.h includeAnton Khirnov2020-05-22
| | | | | It is not a public header and has not been used since 10173c0e58e557582dbd659f42c6aa164a8682db
* fftools/cmdutils: remove lossless and intra only capability entries from ↵James Almer2020-05-21
| | | | | | | | print_codec() They are codec properties, not encoder capabilities. Signed-off-by: James Almer <jamrial@gmail.com>