FFmpeg
|
#include "config.h"
#include <stdint.h>
#include <stdio.h>
#include <signal.h>
#include "cmdutils.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bsf.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libavutil/dict.h"
#include "libavutil/eval.h"
#include "libavutil/fifo.h"
#include "libavutil/hwcontext.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "libavutil/thread.h"
#include "libavutil/threadmessage.h"
#include "libswresample/swresample.h"
Go to the source code of this file.
Data Structures | |
struct | HWDevice |
struct | StreamMap |
struct | AudioChannelMap |
struct | OptionsContext |
struct | InputFilter |
struct | OutputFilter |
struct | FilterGraph |
struct | InputStream |
struct | InputStream::sub2video |
struct | InputFile |
struct | OutputStream |
struct | OutputFile |
Macros | |
#define | MAX_STREAMS 1024 /* arbitrary sanity check value */ |
#define | DECODING_FOR_OST 1 |
#define | DECODING_FOR_FILTER 2 |
#define | ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0) |
#define | ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1) |
Enumerations | |
enum | VideoSyncMethod { VSYNC_AUTO = -1, VSYNC_PASSTHROUGH, VSYNC_CFR, VSYNC_VFR, VSYNC_VSCFR, VSYNC_DROP } |
enum | HWAccelID { HWACCEL_NONE = 0, HWACCEL_AUTO, HWACCEL_GENERIC } |
enum | forced_keyframes_const { FKF_N, FKF_N_FORCED, FKF_PREV_FORCED_N, FKF_PREV_FORCED_T, FKF_T, FKF_NB } |
enum | OSTFinished { ENCODER_FINISHED = 1, MUXER_FINISHED = 2 } |
enum VideoSyncMethod |
enum HWAccelID |
enum OSTFinished |
void term_init | ( | void | ) |
Definition at line 407 of file ffmpeg.c.
Referenced by assert_file_overwrite().
void term_exit | ( | void | ) |
Definition at line 336 of file ffmpeg.c.
Referenced by assert_file_overwrite(), ffmpeg_cleanup(), and transcode().
void show_usage | ( | void | ) |
Definition at line 3499 of file ffmpeg_opt.c.
Referenced by main(), and show_help_default().
void remove_avoptions | ( | AVDictionary ** | a, |
AVDictionary * | b | ||
) |
Definition at line 658 of file ffmpeg.c.
Referenced by open_input_file().
void assert_avoptions | ( | AVDictionary * | m | ) |
Definition at line 667 of file ffmpeg.c.
Referenced by init_input_stream(), init_output_stream(), and open_input_file().
int guess_input_channel_layout | ( | InputStream * | ist | ) |
Definition at line 1888 of file ffmpeg.c.
Referenced by add_input_streams().
int configure_filtergraph | ( | FilterGraph * | fg | ) |
Definition at line 993 of file ffmpeg_filter.c.
Referenced by flush_encoders(), ifilter_send_frame(), and transcode_step().
void check_filter_outputs | ( | void | ) |
Definition at line 645 of file ffmpeg_filter.c.
int filtergraph_is_simple | ( | FilterGraph * | fg | ) |
Definition at line 1201 of file ffmpeg_filter.c.
Referenced by configure_filtergraph(), and transcode_init().
int init_simple_filtergraph | ( | InputStream * | ist, |
OutputStream * | ost | ||
) |
Definition at line 176 of file ffmpeg_filter.c.
Referenced by open_output_file().
int init_complex_filtergraph | ( | FilterGraph * | fg | ) |
Definition at line 315 of file ffmpeg_filter.c.
Referenced by init_complex_filters().
void sub2video_update | ( | InputStream * | ist, |
int64_t | heartbeat_pts, | ||
AVSubtitle * | sub | ||
) |
Definition at line 240 of file ffmpeg.c.
Referenced by configure_filtergraph(), sub2video_flush(), sub2video_heartbeat(), and transcode_subtitles().
int ifilter_parameters_from_frame | ( | InputFilter * | ifilter, |
const AVFrame * | frame | ||
) |
Definition at line 1169 of file ffmpeg_filter.c.
Referenced by ifilter_send_frame().
int videotoolbox_init | ( | AVCodecContext * | s | ) |
int qsv_init | ( | AVCodecContext * | s | ) |
HWDevice* hw_device_get_by_name | ( | const char * | name | ) |
Definition at line 44 of file ffmpeg_hw.c.
Referenced by hw_device_default_name(), hw_device_init_from_string(), hw_device_setup_for_decode(), and opt_filter_hw_device().
Definition at line 94 of file ffmpeg_hw.c.
Referenced by opt_init_hw_device().
void hw_device_free_all | ( | void | ) |
Definition at line 288 of file ffmpeg_hw.c.
Referenced by transcode().
int hw_device_setup_for_decode | ( | InputStream * | ist | ) |
Definition at line 317 of file ffmpeg_hw.c.
Referenced by init_input_stream().
int hw_device_setup_for_encode | ( | OutputStream * | ost | ) |
Definition at line 445 of file ffmpeg_hw.c.
Referenced by init_output_stream().
int hw_device_setup_for_filter | ( | FilterGraph * | fg | ) |
Definition at line 551 of file ffmpeg_hw.c.
Referenced by configure_filtergraph().
int hwaccel_decode_init | ( | AVCodecContext * | avctx | ) |
Definition at line 542 of file ffmpeg_hw.c.
Referenced by get_format().
int of_check_init | ( | OutputFile * | of | ) |
Definition at line 230 of file ffmpeg_mux.c.
Referenced by init_output_stream(), and transcode_init().
int of_write_trailer | ( | OutputFile * | of | ) |
Definition at line 281 of file ffmpeg_mux.c.
Referenced by transcode().
void of_close | ( | OutputFile ** | pof | ) |
Definition at line 302 of file ffmpeg_mux.c.
Referenced by ffmpeg_cleanup().
void of_write_packet | ( | OutputFile * | of, |
AVPacket * | pkt, | ||
OutputStream * | ost, | ||
int | unqueue | ||
) |
Definition at line 44 of file ffmpeg_mux.c.
Referenced by of_check_init(), and output_packet().
const char* const forced_keyframes_const_names[] |
Definition at line 115 of file ffmpeg.c.
Referenced by init_output_stream_encode().
InputStream** input_streams |
Definition at line 147 of file ffmpeg.c.
Referenced by add_input_streams(), check_keyboard_interaction(), do_video_out(), ffmpeg_cleanup(), get_input_packet(), get_input_stream(), init_input_filter(), init_input_stream(), init_output_stream_encode(), new_audio_stream(), new_output_stream(), new_video_stream(), open_input_file(), open_output_file(), opt_map(), opt_map_channel(), print_final_stats(), process_input(), seek_to_start(), set_dispositions(), sub2video_heartbeat(), transcode(), transcode_init(), and transcode_step().
int nb_input_streams |
Definition at line 148 of file ffmpeg.c.
Referenced by add_input_streams(), check_keyboard_interaction(), ffmpeg_cleanup(), init_input_filter(), open_input_file(), open_output_file(), transcode(), and transcode_init().
InputFile** input_files |
Definition at line 149 of file ffmpeg.c.
Referenced by apply_sync_offsets(), assert_file_overwrite(), check_decode_result(), check_output_constraints(), configure_input_audio_filter(), configure_input_video_filter(), do_streamcopy(), ffmpeg_cleanup(), init_input_filter(), new_video_stream(), open_input_file(), open_output_file(), opt_map(), opt_map_channel(), opt_target(), print_final_stats(), process_input(), report_new_stream(), reset_eagain(), sub2video_heartbeat(), sub2video_prepare(), transcode(), transcode_from_filter(), transcode_init(), and transcode_step().
int nb_input_files |
Definition at line 150 of file ffmpeg.c.
Referenced by add_input_streams(), apply_sync_offsets(), assert_file_overwrite(), dump_attachment(), ffmpeg_cleanup(), init_input_filter(), main(), open_input_file(), open_output_file(), opt_map(), opt_map_channel(), opt_target(), print_final_stats(), reset_eagain(), and transcode_init().
OutputStream** output_streams |
Definition at line 152 of file ffmpeg.c.
Referenced by check_keyboard_interaction(), choose_output(), close_all_output_streams(), ffmpeg_cleanup(), flush_encoders(), got_eagain(), need_output(), new_output_stream(), of_check_init(), open_output_file(), print_final_stats(), print_report(), process_input(), process_input_packet(), reap_filters(), reset_eagain(), set_dispositions(), transcode(), transcode_init(), and transcode_subtitles().
int nb_output_streams |
Definition at line 153 of file ffmpeg.c.
Referenced by check_keyboard_interaction(), choose_output(), close_all_output_streams(), ffmpeg_cleanup(), flush_encoders(), got_eagain(), need_output(), new_output_stream(), new_video_stream(), open_output_file(), print_final_stats(), print_report(), process_input(), process_input_packet(), reap_filters(), reset_eagain(), transcode(), transcode_init(), and transcode_subtitles().
OutputFile** output_files |
Definition at line 154 of file ffmpeg.c.
Referenced by check_output_constraints(), check_recording_time(), close_output_stream(), configure_output_audio_filter(), configure_output_video_filter(), do_streamcopy(), do_subtitle_out(), ffmpeg_cleanup(), finish_output_stream(), flush_encoders(), init_encoder_time_base(), init_output_stream(), init_output_stream_encode(), init_output_stream_streamcopy(), main(), need_output(), open_output_file(), parse_forced_key_frames(), print_final_stats(), print_report(), print_sdp(), reap_filters(), transcode(), transcode_init(), and transcode_subtitles().
int nb_output_files |
Definition at line 155 of file ffmpeg.c.
Referenced by ffmpeg_cleanup(), get_ost_filters(), main(), new_output_stream(), open_output_file(), print_final_stats(), print_report(), print_sdp(), transcode(), and transcode_init().
FilterGraph** filtergraphs |
Definition at line 157 of file ffmpeg.c.
Referenced by check_filter_outputs(), check_keyboard_interaction(), do_video_out(), ffmpeg_cleanup(), init_complex_filters(), init_simple_filtergraph(), open_output_file(), opt_filter_complex(), opt_filter_complex_script(), and transcode_init().
int nb_filtergraphs |
Definition at line 158 of file ffmpeg.c.
Referenced by check_filter_outputs(), check_keyboard_interaction(), do_video_out(), ffmpeg_cleanup(), init_complex_filters(), init_simple_filtergraph(), open_output_file(), opt_filter_complex(), opt_filter_complex_script(), and transcode_init().
char* vstats_filename |
Definition at line 152 of file ffmpeg_opt.c.
Referenced by encode_frame(), ffmpeg_cleanup(), opt_vstats_file(), and update_video_stats().
char* sdp_filename |
Definition at line 153 of file ffmpeg_opt.c.
Referenced by of_check_init(), opt_sdp_file(), and print_sdp().
float audio_drift_threshold |
Definition at line 155 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter().
float dts_delta_threshold |
Definition at line 156 of file ffmpeg_opt.c.
Referenced by process_input().
float dts_error_threshold |
Definition at line 157 of file ffmpeg_opt.c.
Referenced by do_video_out(), and process_input().
int audio_volume |
Definition at line 159 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), and init_output_stream_streamcopy().
int audio_sync_method |
Definition at line 160 of file ffmpeg_opt.c.
Referenced by configure_input_audio_filter(), do_audio_out(), and of_write_packet().
enum VideoSyncMethod video_sync_method |
Definition at line 161 of file ffmpeg_opt.c.
Referenced by new_video_stream(), opt_vsync(), and parse_and_set_vsync().
float frame_drop_threshold |
Definition at line 162 of file ffmpeg_opt.c.
Referenced by do_video_out().
int do_benchmark |
Definition at line 163 of file ffmpeg_opt.c.
Referenced by ffmpeg_cleanup(), and main().
int do_benchmark_all |
Definition at line 164 of file ffmpeg_opt.c.
Referenced by update_benchmark().
int do_deinterlace |
int do_hex_dump |
Definition at line 165 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and process_input().
int do_pkt_dump |
Definition at line 166 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and process_input().
int copy_ts |
Definition at line 167 of file ffmpeg_opt.c.
Referenced by apply_sync_offsets(), configure_input_audio_filter(), configure_input_video_filter(), do_streamcopy(), get_input_packet(), new_video_stream(), open_input_file(), print_report(), and process_input().
int start_at_zero |
Definition at line 168 of file ffmpeg_opt.c.
Referenced by apply_sync_offsets(), configure_input_audio_filter(), configure_input_video_filter(), do_streamcopy(), get_input_packet(), and open_input_file().
int copy_tb |
Definition at line 169 of file ffmpeg_opt.c.
Referenced by avformat_transfer_internal_stream_timing_info(), and init_output_stream_streamcopy().
int debug_ts |
Definition at line 170 of file ffmpeg_opt.c.
Referenced by adjust_frame_pts_to_encoder_tb(), decode_video(), encode_frame(), of_write_packet(), and process_input().
int exit_on_error |
Definition at line 171 of file ffmpeg_opt.c.
Referenced by check_decode_result(), do_subtitle_out(), of_write_packet(), output_packet(), process_input(), process_input_packet(), and transcode().
int abort_on_flags |
Definition at line 172 of file ffmpeg_opt.c.
Referenced by opt_abort_on(), and transcode().
int print_stats |
Definition at line 173 of file ffmpeg_opt.c.
Referenced by print_report().
int64_t stats_period |
Definition at line 181 of file ffmpeg_opt.c.
Referenced by opt_stats_period(), and print_report().
int qp_hist |
Definition at line 174 of file ffmpeg_opt.c.
Referenced by check_keyboard_interaction(), and print_report().
int stdin_interaction |
Definition at line 175 of file ffmpeg_opt.c.
Referenced by assert_file_overwrite(), open_input_file(), term_init(), and transcode().
int frame_bits_per_raw_sample |
AVIOContext* progress_avio |
Definition at line 143 of file ffmpeg.c.
Referenced by print_report().
float max_error_rate |
Definition at line 176 of file ffmpeg_opt.c.
Referenced by main().
char* filter_nbthreads |
Definition at line 177 of file ffmpeg_opt.c.
Referenced by configure_filtergraph(), ffmpeg_cleanup(), and opt_filter_threads().
int filter_complex_nbthreads |
Definition at line 178 of file ffmpeg_opt.c.
Referenced by configure_filtergraph().
int vstats_version |
Definition at line 179 of file ffmpeg_opt.c.
Referenced by update_video_stats().
int auto_conversion_filters |
Definition at line 180 of file ffmpeg_opt.c.
Referenced by configure_filtergraph().
const AVIOInterruptCB int_cb |
Definition at line 512 of file ffmpeg.c.
Referenced by avio_open2(), dump_attachment(), ff_network_sleep_interruptible(), ff_network_wait_fd_timeout(), ffio_open_whitelist(), ffurl_alloc(), ffurl_open_whitelist(), get_preset_file_2(), libsrt_network_wait_fd_timeout(), open_input_file(), open_output_file(), print_sdp(), url_alloc_for_protocol(), and zmq_proto_wait_timeout().
const OptionDef options[] |
Referenced by av_bsf_list_append2(), av_hwdevice_ctx_create_derived_opts(), av_opt_set_dict(), av_opt_set_dict2(), avcodec_open2(), avfilter_init_dict(), avfilter_init_str(), avformat_find_stream_info(), avformat_init_output(), avformat_open_input(), avformat_write_header(), avio_open2(), bsf_list_append_internal(), ff_dnn_load_model_native(), ff_dnn_load_model_ov(), ff_dnn_load_model_tf(), ff_format_output_open(), ff_opus_psy_init(), ff_tee_parse_slave_options(), ff_tls_open_underlying(), ffio_open_whitelist(), hls_read_header(), hw_device_init_from_string(), init(), init_input(), init_muxer(), io_open_default(), list_devices_for_context(), locate_option(), main(), open_url_keepalive(), opt_audio_codec(), opt_audio_filters(), opt_audio_frames(), opt_audio_qscale(), opt_data_codec(), opt_data_frames(), opt_old2new(), opt_qscale(), opt_recording_timestamp(), opt_subtitle_codec(), opt_target(), opt_timecode(), opt_video_codec(), opt_video_filters(), opt_video_frames(), parse_loglevel(), parse_option(), parse_options(), pcm_read_header(), pp_get_mode_by_name_and_quality(), process_options(), set_string_dict(), show_banner(), show_help_default(), show_help_options(), split_commandline(), subfile_open(), tee_open(), try_decode_frame(), uninit_options(), wrap(), and write_packet().
HWDevice* filter_hw_device |
Definition at line 150 of file ffmpeg_opt.c.
Referenced by hw_device_setup_for_filter(), and opt_filter_hw_device().
int want_sdp |
Definition at line 140 of file ffmpeg.c.
Referenced by main(), and of_check_init().
unsigned nb_output_dumped |
Definition at line 138 of file ffmpeg.c.
Referenced by of_check_init(), and print_report().
int main_return_code |
Definition at line 346 of file ffmpeg.c.
Referenced by main(), and of_write_packet().