ffmpeg.c File Reference

#include "config.h"
#include <ctype.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <limits.h>
#include "avformat.h"
#include "avdevice.h"
#include "swscale.h"
#include "framehook.h"
#include "opt.h"
#include "fifo.h"
#include "avstring.h"
#include "os_support.h"
#include <time.h>
#include "version.h"
#include "cmdutils.h"
#include <assert.h>

Go to the source code of this file.

Data Structures

struct  AVStreamMap
struct  AVMetaDataMap
 select an input file for an output file More...
struct  AVOutputStream
struct  AVInputStream
struct  AVInputFile

Defines

#define MAX_FILES   20
#define QSCALE_NONE   -99999
#define DEFAULT_PASS_LOGFILENAME   "ffmpeg2pass"
#define MAX_AUDIO_PACKET_SIZE   (128 * 1024)
#define AV_DELAY_MAX   0.100
#define SCALEBITS   10
#define ONE_HALF   (1 << (SCALEBITS - 1))
#define FIX(x)   ((int) ((x) * (1<<SCALEBITS) + 0.5))
#define RGB_TO_Y(r, g, b)
#define RGB_TO_U(r1, g1, b1, shift)
#define RGB_TO_V(r1, g1, b1, shift)

Functions

static void term_exit (void)
static void sigterm_handler (int sig)
static void term_init (void)
static int read_key (void)
static int decode_interrupt_cb (void)
static int read_ffserver_streams (AVFormatContext *s, const char *filename)
static double get_sync_ipts (const AVOutputStream *ost)
static void write_frame (AVFormatContext *s, AVPacket *pkt, AVCodecContext *avctx, AVBitStreamFilterContext *bsfc)
static void do_audio_out (AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, unsigned char *buf, int size)
static void pre_process_video_frame (AVInputStream *ist, AVPicture *picture, void **bufp)
static void do_subtitle_out (AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVSubtitle *sub, int64_t pts)
static void do_video_out (AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVFrame *in_picture, int *frame_size)
static double psnr (double d)
static void do_video_stats (AVFormatContext *os, AVOutputStream *ost, int frame_size)
static void print_report (AVFormatContext **output_files, AVOutputStream **ost_table, int nb_ostreams, int is_last_report)
static int output_packet (AVInputStream *ist, int ist_index, AVOutputStream **ost_table, int nb_ostreams, const AVPacket *pkt)
static void print_sdp (AVFormatContext **avc, int n)
static int stream_index_from_inputs (AVFormatContext **input_files, int nb_input_files, AVInputFile *file_table, AVInputStream **ist_table, enum CodecType type, int programid)
static int av_encode (AVFormatContext **output_files, int nb_output_files, AVFormatContext **input_files, int nb_input_files, AVStreamMap *stream_maps, int nb_stream_maps)
static void opt_format (const char *arg)
static int opt_default (const char *opt, const char *arg)
static void opt_video_rc_override_string (const char *arg)
static void opt_me_threshold (const char *arg)
static void opt_verbose (const char *arg)
static void opt_frame_rate (const char *arg)
static int opt_bitrate (const char *opt, const char *arg)
static void opt_frame_crop_top (const char *arg)
static void opt_frame_crop_bottom (const char *arg)
static void opt_frame_crop_left (const char *arg)
static void opt_frame_crop_right (const char *arg)
static void opt_frame_size (const char *arg)
static void opt_pad_color (const char *arg)
static void opt_frame_pad_top (const char *arg)
static void opt_frame_pad_bottom (const char *arg)
static void opt_frame_pad_left (const char *arg)
static void opt_frame_pad_right (const char *arg)
void list_pix_fmts (void)
static void opt_frame_pix_fmt (const char *arg)
static void opt_frame_aspect_ratio (const char *arg)
static void opt_qscale (const char *arg)
static void opt_qdiff (const char *arg)
static void opt_strict (const char *arg)
static void opt_top_field_first (const char *arg)
static void opt_thread_count (const char *arg)
static void opt_audio_rate (const char *arg)
static void opt_audio_channels (const char *arg)
static void opt_video_channel (const char *arg)
static void opt_video_standard (const char *arg)
static void opt_codec (int *pstream_copy, char **pcodec_name, int codec_type, const char *arg)
static void opt_audio_codec (const char *arg)
static void opt_audio_tag (const char *arg)
static void opt_video_tag (const char *arg)
static void opt_video_codec (const char *arg)
static void opt_subtitle_codec (const char *arg)
static void opt_map (const char *arg)
static void opt_map_meta_data (const char *arg)
static int64_t parse_time_or_die (const char *timestr, int is_duration)
static void opt_recording_time (const char *arg)
static void opt_start_time (const char *arg)
static void opt_rec_timestamp (const char *arg)
static void opt_input_ts_offset (const char *arg)
static enum CodecID find_codec_or_die (const char *name, int type, int encoder)
static void opt_input_file (const char *filename)
static void check_audio_video_sub_inputs (int *has_video_ptr, int *has_audio_ptr, int *has_subtitle_ptr)
static void new_video_stream (AVFormatContext *oc)
static void new_audio_stream (AVFormatContext *oc)
static void new_subtitle_stream (AVFormatContext *oc)
static void opt_new_audio_stream (void)
static void opt_new_video_stream (void)
static void opt_new_subtitle_stream (void)
static void opt_output_file (const char *filename)
static void opt_pass (const char *pass_str)
static int64_t getutime (void)
static void opt_show_formats (void)
static void parse_matrix_coeffs (uint16_t *dest, const char *str)
static void opt_inter_matrix (const char *arg)
static void opt_intra_matrix (const char *arg)
static void log_callback_help (void *ptr, int level, const char *fmt, va_list vl)
 Trivial log callback.
static void show_help (void)
static void opt_show_help (void)
static void opt_target (const char *arg)
static void opt_vstats_file (const char *arg)
static void opt_vstats (void)
static int opt_bsf (const char *opt, const char *arg)
static void opt_show_license (void)
static void opt_show_version (void)
static int av_exit ()
int main (int argc, char **argv)

Variables

static const char program_name [] = "FFmpeg"
static const int program_birth_year = 2000
const OptionDef options []
static AVFormatContextinput_files [MAX_FILES]
static int64_t input_files_ts_offset [MAX_FILES]
static int nb_input_files = 0
static AVFormatContextoutput_files [MAX_FILES]
static int nb_output_files = 0
static AVStreamMap stream_maps [MAX_FILES]
static int nb_stream_maps
static AVMetaDataMap meta_data_maps [MAX_FILES]
static int nb_meta_data_maps
static AVInputFormatfile_iformat
static AVOutputFormatfile_oformat
static int frame_width = 0
static int frame_height = 0
static float frame_aspect_ratio = 0
static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE
static int frame_padtop = 0
static int frame_padbottom = 0
static int frame_padleft = 0
static int frame_padright = 0
static int padcolor [3] = {16,128,128}
static int frame_topBand = 0
static int frame_bottomBand = 0
static int frame_leftBand = 0
static int frame_rightBand = 0
static int max_frames [4] = {INT_MAX, INT_MAX, INT_MAX, INT_MAX}
static AVRational frame_rate = (AVRational) {0,0}
static float video_qscale = 0
static int video_qdiff = 3
static uint16_t * intra_matrix = NULL
static uint16_t * inter_matrix = NULL
static const char * video_rc_override_string = NULL
static int video_disable = 0
static int video_discard = 0
static char * video_codec_name = NULL
static int video_codec_tag = 0
static int same_quality = 0
static int do_deinterlace = 0
static int strict = 0
static int top_field_first = -1
static int me_threshold = 0
static int intra_dc_precision = 8
static int loop_input = 0
static int loop_output = AVFMT_NOOUTPUTLOOP
static int qp_hist = 0
static int intra_only = 0
static int audio_sample_rate = 44100
static float audio_qscale = QSCALE_NONE
static int audio_disable = 0
static int audio_channels = 1
static char * audio_codec_name = NULL
static int audio_codec_tag = 0
static char * audio_language = NULL
static int subtitle_disable = 0
static char * subtitle_codec_name = NULL
static char * subtitle_language = NULL
static float mux_preload = 0.5
static float mux_max_delay = 0.7
static int64_t recording_time = 0
static int64_t start_time = 0
static int64_t rec_timestamp = 0
static int64_t input_ts_offset = 0
static int file_overwrite = 0
static char * str_title = NULL
static char * str_author = NULL
static char * str_copyright = NULL
static char * str_comment = NULL
static char * str_genre = NULL
static char * str_album = NULL
static int do_benchmark = 0
static int do_hex_dump = 0
static int do_pkt_dump = 0
static int do_psnr = 0
static int do_pass = 0
static char * pass_logfilename = NULL
static int audio_stream_copy = 0
static int video_stream_copy = 0
static int subtitle_stream_copy = 0
static int video_sync_method = 1
static int audio_sync_method = 0
static float audio_drift_threshold = 0.1
static int copy_ts = 0
static int opt_shortest = 0
static int video_global_header = 0
static char * vstats_filename
static FILE * vstats_file
static int opt_programid = 0
static int rate_emu = 0
static int video_channel = 0
static char * video_standard
static int audio_volume = 256
static int using_stdin = 0
static int using_vhook = 0
static int verbose = 1
static int thread_count = 1
static int q_pressed = 0
static int64_t video_size = 0
static int64_t audio_size = 0
static int64_t extra_size = 0
static int nb_frames_dup = 0
static int nb_frames_drop = 0
static int input_sync
static uint64_t limit_filesize = 0
static int pgmyuv_compatibility_hack = 0
static float dts_delta_threshold = 10
static int sws_flags = SWS_BICUBIC
static const char ** opt_names
static int opt_name_count
static AVCodecContextavctx_opts [CODEC_TYPE_NB]
static AVFormatContextavformat_opts
static struct SwsContextsws_opts
static int64_t timer_start
static AVBitStreamFilterContextvideo_bitstream_filters = NULL
static AVBitStreamFilterContextaudio_bitstream_filters = NULL
static AVBitStreamFilterContextsubtitle_bitstream_filters = NULL
static AVBitStreamFilterContextbitstream_filters [MAX_FILES][MAX_STREAMS]
static volatile sig_atomic_t received_sigterm = 0
static int bit_buffer_size = 1024*256
static uint8_tbit_buffer = NULL


Define Documentation

#define AV_DELAY_MAX   0.100

Definition at line 651 of file ffmpeg.c.

#define DEFAULT_PASS_LOGFILENAME   "ffmpeg2pass"

Definition at line 227 of file ffmpeg.c.

Referenced by av_encode().

#define FIX (  )     ((int) ((x) * (1<<SCALEBITS) + 0.5))

Definition at line 2291 of file ffmpeg.c.

Referenced by C_JPEG_TO_CCIR(), idct32(), and rgb24_to_yuv420p().

#define MAX_AUDIO_PACKET_SIZE   (128 * 1024)

Definition at line 440 of file ffmpeg.c.

Referenced by av_encode(), and do_audio_out().

#define MAX_FILES   20

Definition at line 87 of file ffmpeg.c.

#define ONE_HALF   (1 << (SCALEBITS - 1))

Definition at line 2290 of file ffmpeg.c.

Referenced by C_JPEG_TO_CCIR(), and rgb24_to_yuv420p().

#define QSCALE_NONE   -99999

Definition at line 145 of file ffmpeg.c.

Referenced by new_audio_stream().

#define RGB_TO_U ( r1,
g1,
b1,
shift   ) 

Value:

(((- FIX(0.16874) * r1 - FIX(0.33126) * g1 +         \
     FIX(0.50000) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)

Definition at line 2297 of file ffmpeg.c.

Referenced by opt_pad_color().

#define RGB_TO_V ( r1,
g1,
b1,
shift   ) 

Value:

(((FIX(0.50000) * r1 - FIX(0.41869) * g1 -           \
   FIX(0.08131) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128)

Definition at line 2301 of file ffmpeg.c.

Referenced by opt_pad_color().

#define RGB_TO_Y ( r,
g,
 ) 

Value:

((FIX(0.29900) * (r) + FIX(0.58700) * (g) + \
  FIX(0.11400) * (b) + ONE_HALF) >> SCALEBITS)

Definition at line 2293 of file ffmpeg.c.

Referenced by opt_pad_color().

#define SCALEBITS   10

Definition at line 2289 of file ffmpeg.c.

Referenced by C_JPEG_TO_CCIR(), and rgb24_to_yuv420p().


Function Documentation

static int av_encode ( AVFormatContext **  output_files,
int  nb_output_files,
AVFormatContext **  input_files,
int  nb_input_files,
AVStreamMap stream_maps,
int  nb_stream_maps 
) [static]

Definition at line 1408 of file ffmpeg.c.

Referenced by main().

static int av_exit (  )  [static]

Definition at line 3850 of file ffmpeg.c.

Referenced by main().

static void check_audio_video_sub_inputs ( int *  has_video_ptr,
int *  has_audio_ptr,
int *  has_subtitle_ptr 
) [static]

Definition at line 2807 of file ffmpeg.c.

Referenced by opt_output_file().

static int decode_interrupt_cb ( void   )  [static]

Definition at line 373 of file ffmpeg.c.

Referenced by av_encode(), and decode_thread().

static void do_audio_out ( AVFormatContext s,
AVOutputStream ost,
AVInputStream ist,
unsigned char *  buf,
int  size 
) [static]

Definition at line 442 of file ffmpeg.c.

Referenced by output_packet().

static void do_subtitle_out ( AVFormatContext s,
AVOutputStream ost,
AVInputStream ist,
AVSubtitle sub,
int64_t  pts 
) [static]

Definition at line 653 of file ffmpeg.c.

Referenced by output_packet().

static void do_video_out ( AVFormatContext s,
AVOutputStream ost,
AVInputStream ist,
AVFrame in_picture,
int *  frame_size 
) [static]

Definition at line 708 of file ffmpeg.c.

Referenced by output_packet().

static void do_video_stats ( AVFormatContext os,
AVOutputStream ost,
int  frame_size 
) [static]

Definition at line 877 of file ffmpeg.c.

Referenced by output_packet().

static enum CodecID find_codec_or_die ( const char *  name,
int  type,
int  encoder 
) [static]

Definition at line 2613 of file ffmpeg.c.

Referenced by new_audio_stream(), new_subtitle_stream(), new_video_stream(), and opt_input_file().

static double get_sync_ipts ( const AVOutputStream ost  )  [static]

Definition at line 404 of file ffmpeg.c.

Referenced by do_audio_out(), and do_video_out().

static int64_t getutime ( void   )  [static]

Definition at line 3310 of file ffmpeg.c.

Referenced by main().

void list_pix_fmts ( void   ) 

Definition at line 2374 of file ffmpeg.c.

Referenced by opt_frame_pix_fmt().

static void log_callback_help ( void *  ptr,
int  level,
const char *  fmt,
va_list  vl 
) [static]

Trivial log callback.

Only suitable for show_help and similar since it lacks prefix handling.

Definition at line 3484 of file ffmpeg.c.

Referenced by show_help().

int main ( int  argc,
char **  argv 
)

Definition at line 3903 of file ffmpeg.c.

Referenced by av_adler32_update().

static void new_audio_stream ( AVFormatContext oc  )  [static]

Definition at line 2999 of file ffmpeg.c.

Referenced by opt_new_audio_stream(), and opt_output_file().

static void new_subtitle_stream ( AVFormatContext oc  )  [static]

Definition at line 3068 of file ffmpeg.c.

Referenced by opt_new_subtitle_stream(), and opt_output_file().

static void new_video_stream ( AVFormatContext oc  )  [static]

Definition at line 2844 of file ffmpeg.c.

Referenced by opt_new_video_stream(), and opt_output_file().

static void opt_audio_channels ( const char *  arg  )  [static]

Definition at line 2462 of file ffmpeg.c.

static void opt_audio_codec ( const char *  arg  )  [static]

Definition at line 2488 of file ffmpeg.c.

Referenced by opt_target(), and parse_ffconfig().

static void opt_audio_rate ( const char *  arg  )  [static]

Definition at line 2457 of file ffmpeg.c.

static void opt_audio_tag ( const char *  arg  )  [static]

Definition at line 2493 of file ffmpeg.c.

static int opt_bitrate ( const char *  opt,
const char *  arg 
) [static]

Definition at line 2192 of file ffmpeg.c.

static int opt_bsf ( const char *  opt,
const char *  arg 
) [static]

Definition at line 3691 of file ffmpeg.c.

static void opt_codec ( int *  pstream_copy,
char **  pcodec_name,
int  codec_type,
const char *  arg 
) [static]

Definition at line 2477 of file ffmpeg.c.

Referenced by opt_audio_codec(), opt_subtitle_codec(), and opt_video_codec().

static int opt_default ( const char *  opt,
const char *  arg 
) [static]

Definition at line 2126 of file ffmpeg.c.

Referenced by opt_bitrate(), and opt_target().

static void opt_format ( const char *  arg  )  [static]

Definition at line 2104 of file ffmpeg.c.

Referenced by opt_target().

static void opt_frame_aspect_ratio ( const char *  arg  )  [static]

Definition at line 2394 of file ffmpeg.c.

static void opt_frame_crop_bottom ( const char *  arg  )  [static]

Definition at line 2222 of file ffmpeg.c.

static void opt_frame_crop_left ( const char *  arg  )  [static]

Definition at line 2240 of file ffmpeg.c.

static void opt_frame_crop_right ( const char *  arg  )  [static]

Definition at line 2258 of file ffmpeg.c.

static void opt_frame_crop_top ( const char *  arg  )  [static]

Definition at line 2204 of file ffmpeg.c.

static void opt_frame_pad_bottom ( const char *  arg  )  [static]

Definition at line 2333 of file ffmpeg.c.

static void opt_frame_pad_left ( const char *  arg  )  [static]

Definition at line 2347 of file ffmpeg.c.

static void opt_frame_pad_right ( const char *  arg  )  [static]

Definition at line 2361 of file ffmpeg.c.

static void opt_frame_pad_top ( const char *  arg  )  [static]

Definition at line 2320 of file ffmpeg.c.

static void opt_frame_pix_fmt ( const char *  arg  )  [static]

Definition at line 2384 of file ffmpeg.c.

Referenced by opt_target().

static void opt_frame_rate ( const char *  arg  )  [static]

Definition at line 2184 of file ffmpeg.c.

Referenced by opt_target().

static void opt_frame_size ( const char *  arg  )  [static]

Definition at line 2276 of file ffmpeg.c.

Referenced by opt_target().

static void opt_input_file ( const char *  filename  )  [static]

Definition at line 2634 of file ffmpeg.c.

Referenced by main().

static void opt_input_ts_offset ( const char *  arg  )  [static]

Definition at line 2608 of file ffmpeg.c.

static void opt_inter_matrix ( const char *  arg  )  [static]

Definition at line 3468 of file ffmpeg.c.

static void opt_intra_matrix ( const char *  arg  )  [static]

Definition at line 3474 of file ffmpeg.c.

static void opt_map ( const char *  arg  )  [static]

Definition at line 2544 of file ffmpeg.c.

static void opt_map_meta_data ( const char *  arg  )  [static]

Definition at line 2568 of file ffmpeg.c.

static void opt_me_threshold ( const char *  arg  )  [static]

Definition at line 2173 of file ffmpeg.c.

static void opt_new_audio_stream ( void   )  [static]

Definition at line 3110 of file ffmpeg.c.

static void opt_new_subtitle_stream ( void   )  [static]

Definition at line 3132 of file ffmpeg.c.

static void opt_new_video_stream ( void   )  [static]

Definition at line 3121 of file ffmpeg.c.

static void opt_output_file ( const char *  filename  )  [static]

Definition at line 3143 of file ffmpeg.c.

Referenced by main().

static void opt_pad_color ( const char *  arg  )  [static]

Definition at line 2305 of file ffmpeg.c.

static void opt_pass ( const char *  pass_str  )  [static]

Definition at line 3299 of file ffmpeg.c.

static void opt_qdiff ( const char *  arg  )  [static]

Definition at line 2428 of file ffmpeg.c.

static void opt_qscale ( const char *  arg  )  [static]

Definition at line 2418 of file ffmpeg.c.

static void opt_rec_timestamp ( const char *  arg  )  [static]

Definition at line 2603 of file ffmpeg.c.

static void opt_recording_time ( const char *  arg  )  [static]

Definition at line 2593 of file ffmpeg.c.

static void opt_show_formats ( void   )  [static]

Definition at line 3328 of file ffmpeg.c.

static void opt_show_help ( void   )  [static]

Definition at line 3523 of file ffmpeg.c.

static void opt_show_license ( void   )  [static]

Definition at line 3712 of file ffmpeg.c.

static void opt_show_version ( void   )  [static]

Definition at line 3718 of file ffmpeg.c.

static void opt_start_time ( const char *  arg  )  [static]

Definition at line 2598 of file ffmpeg.c.

static void opt_strict ( const char *  arg  )  [static]

Definition at line 2438 of file ffmpeg.c.

static void opt_subtitle_codec ( const char *  arg  )  [static]

Definition at line 2539 of file ffmpeg.c.

static void opt_target ( const char *  arg  )  [static]

Definition at line 3529 of file ffmpeg.c.

static void opt_thread_count ( const char *  arg  )  [static]

Definition at line 2448 of file ffmpeg.c.

static void opt_top_field_first ( const char *  arg  )  [static]

Definition at line 2443 of file ffmpeg.c.

static void opt_verbose ( const char *  arg  )  [static]

Definition at line 2178 of file ffmpeg.c.

static void opt_video_channel ( const char *  arg  )  [static]

Definition at line 2467 of file ffmpeg.c.

static void opt_video_codec ( const char *  arg  )  [static]

Definition at line 2534 of file ffmpeg.c.

Referenced by opt_target(), and parse_ffconfig().

static void opt_video_rc_override_string ( const char *  arg  )  [static]

Definition at line 2168 of file ffmpeg.c.

static void opt_video_standard ( const char *  arg  )  [static]

Definition at line 2472 of file ffmpeg.c.

static void opt_video_tag ( const char *  arg  )  [static]

Definition at line 2502 of file ffmpeg.c.

static void opt_vstats ( void   )  [static]

Definition at line 3680 of file ffmpeg.c.

static void opt_vstats_file ( const char *  arg  )  [static]

Definition at line 3674 of file ffmpeg.c.

Referenced by opt_vstats().

static int output_packet ( AVInputStream ist,
int  ist_index,
AVOutputStream **  ost_table,
int  nb_ostreams,
const AVPacket pkt 
) [static]

Definition at line 1039 of file ffmpeg.c.

Referenced by av_encode(), mpeg_mux_end(), and mpeg_mux_write_packet().

static void parse_matrix_coeffs ( uint16_t *  dest,
const char *  str 
) [static]

Definition at line 3451 of file ffmpeg.c.

Referenced by opt_inter_matrix(), and opt_intra_matrix().

static int64_t parse_time_or_die ( const char *  timestr,
int  is_duration 
) [static]

static void pre_process_video_frame ( AVInputStream ist,
AVPicture picture,
void **  bufp 
) [static]

Definition at line 604 of file ffmpeg.c.

Referenced by output_packet().

static void print_report ( AVFormatContext **  output_files,
AVOutputStream **  ost_table,
int  nb_ostreams,
int  is_last_report 
) [static]

Definition at line 914 of file ffmpeg.c.

Referenced by av_encode().

static void print_sdp ( AVFormatContext **  avc,
int  n 
) [static]

Definition at line 1371 of file ffmpeg.c.

Referenced by av_encode().

static double psnr ( double  d  )  [static]

Definition at line 872 of file ffmpeg.c.

Referenced by do_video_stats(), main(), and print_report().

static int read_ffserver_streams ( AVFormatContext s,
const char *  filename 
) [static]

Definition at line 378 of file ffmpeg.c.

Referenced by opt_output_file().

static int read_key ( void   )  [static]

Definition at line 344 of file ffmpeg.c.

Referenced by av_encode(), and decode_interrupt_cb().

static void show_help ( void   )  [static]

Definition at line 3489 of file ffmpeg.c.

Referenced by main(), opt_show_help(), and opt_sync().

static void sigterm_handler ( int  sig  )  [static]

Definition at line 305 of file ffmpeg.c.

Referenced by term_init().

static int stream_index_from_inputs ( AVFormatContext **  input_files,
int  nb_input_files,
AVInputFile file_table,
AVInputStream **  ist_table,
enum CodecType  type,
int  programid 
) [static]

Definition at line 1379 of file ffmpeg.c.

Referenced by av_encode().

static void term_exit ( void   )  [static]

Definition at line 295 of file ffmpeg.c.

Referenced by av_encode(), sigterm_handler(), and term_init().

static void term_init ( void   )  [static]

Definition at line 311 of file ffmpeg.c.

Referenced by av_encode().

static void write_frame ( AVFormatContext s,
AVPacket pkt,
AVCodecContext avctx,
AVBitStreamFilterContext bsfc 
) [static]

Definition at line 410 of file ffmpeg.c.

Referenced by do_audio_out(), do_subtitle_out(), do_video_out(), and output_packet().


Variable Documentation

Definition at line 223 of file ffmpeg.c.

int audio_channels = 1 [static]

char* audio_codec_name = NULL [static]

int audio_codec_tag = 0 [static]

Definition at line 150 of file ffmpeg.c.

Referenced by new_audio_stream(), and opt_audio_tag().

int audio_disable = 0 [static]

Definition at line 147 of file ffmpeg.c.

Referenced by new_audio_stream(), opt_input_file(), and opt_output_file().

float audio_drift_threshold = 0.1 [static]

Definition at line 182 of file ffmpeg.c.

Referenced by do_audio_out().

char* audio_language = NULL [static]

Definition at line 151 of file ffmpeg.c.

Referenced by new_audio_stream().

float audio_qscale = QSCALE_NONE [static]

Definition at line 146 of file ffmpeg.c.

Referenced by new_audio_stream().

int audio_sample_rate = 44100 [static]

Definition at line 144 of file ffmpeg.c.

Referenced by new_audio_stream(), opt_audio_rate(), opt_input_file(), and opt_target().

int64_t audio_size = 0 [static]

Definition at line 203 of file ffmpeg.c.

Referenced by do_audio_out(), output_packet(), print_report(), and sdl_audio_callback().

int audio_stream_copy = 0 [static]

Definition at line 177 of file ffmpeg.c.

Referenced by new_audio_stream(), opt_audio_codec(), and opt_output_file().

int audio_sync_method = 0 [static]

Definition at line 181 of file ffmpeg.c.

Referenced by av_encode(), and do_audio_out().

int audio_volume = 256 [static]

Definition at line 195 of file ffmpeg.c.

Referenced by output_packet().

AVCodecContext* avctx_opts[CODEC_TYPE_NB] [static]

Definition at line 217 of file ffmpeg.c.

Definition at line 218 of file ffmpeg.c.

uint8_t* bit_buffer = NULL [static]

Definition at line 706 of file ffmpeg.c.

Referenced by av_encode(), do_video_out(), and output_packet().

int bit_buffer_size = 1024*256 [static]

Definition at line 705 of file ffmpeg.c.

Referenced by av_encode(), do_video_out(), and output_packet().

AVBitStreamFilterContext* bitstream_filters[MAX_FILES][MAX_STREAMS] [static]

Definition at line 225 of file ffmpeg.c.

int copy_ts = 0 [static]

Definition at line 183 of file ffmpeg.c.

Referenced by av_encode(), and opt_input_file().

int do_benchmark = 0 [static]

Definition at line 171 of file ffmpeg.c.

Referenced by main().

int do_deinterlace = 0 [static]

Definition at line 134 of file ffmpeg.c.

Referenced by pre_process_video_frame().

int do_hex_dump = 0 [static]

Definition at line 172 of file ffmpeg.c.

Referenced by av_encode().

int do_pass = 0 [static]

Definition at line 175 of file ffmpeg.c.

Referenced by new_video_stream(), and opt_pass().

int do_pkt_dump = 0 [static]

Definition at line 173 of file ffmpeg.c.

Referenced by av_encode().

int do_psnr = 0 [static]

Definition at line 174 of file ffmpeg.c.

Referenced by new_video_stream().

float dts_delta_threshold = 10 [static]

Definition at line 211 of file ffmpeg.c.

Referenced by av_encode().

int64_t extra_size = 0 [static]

Definition at line 204 of file ffmpeg.c.

Referenced by ape_read_packet(), asf_write_header1(), av_encode(), and print_report().

Definition at line 102 of file ffmpeg.c.

Definition at line 103 of file ffmpeg.c.

int file_overwrite = 0 [static]

Definition at line 164 of file ffmpeg.c.

Referenced by opt_output_file().

float frame_aspect_ratio = 0 [static]

Definition at line 106 of file ffmpeg.c.

Referenced by new_video_stream(), opt_frame_aspect_ratio(), and opt_input_file().

int frame_bottomBand = 0 [static]

Definition at line 114 of file ffmpeg.c.

Referenced by av_encode(), and opt_frame_crop_bottom().

int frame_height = 0 [static]

int frame_leftBand = 0 [static]

Definition at line 115 of file ffmpeg.c.

Referenced by av_encode(), and opt_frame_crop_left().

int frame_padbottom = 0 [static]

Definition at line 109 of file ffmpeg.c.

Referenced by av_encode(), new_video_stream(), opt_frame_pad_bottom(), and opt_input_file().

int frame_padleft = 0 [static]

Definition at line 110 of file ffmpeg.c.

Referenced by av_encode(), new_video_stream(), opt_frame_pad_left(), and opt_input_file().

int frame_padright = 0 [static]

Definition at line 111 of file ffmpeg.c.

Referenced by av_encode(), new_video_stream(), opt_frame_pad_right(), and opt_input_file().

int frame_padtop = 0 [static]

Definition at line 108 of file ffmpeg.c.

Referenced by av_encode(), new_video_stream(), opt_frame_pad_top(), and opt_input_file().

enum PixelFormat frame_pix_fmt = PIX_FMT_NONE [static]

Definition at line 107 of file ffmpeg.c.

Referenced by new_video_stream(), opt_frame_pix_fmt(), and opt_input_file().

AVRational frame_rate = (AVRational) {0,0} [static]

int frame_rightBand = 0 [static]

Definition at line 116 of file ffmpeg.c.

Referenced by av_encode(), and opt_frame_crop_right().

int frame_topBand = 0 [static]

Definition at line 113 of file ffmpeg.c.

Referenced by av_encode(), and opt_frame_crop_top().

int frame_width = 0 [static]

AVFormatContext* input_files[MAX_FILES] [static]

Definition at line 89 of file ffmpeg.c.

int64_t input_files_ts_offset[MAX_FILES] [static]

Definition at line 90 of file ffmpeg.c.

Referenced by av_encode(), and opt_input_file().

int input_sync [static]

Definition at line 207 of file ffmpeg.c.

Referenced by av_encode().

int64_t input_ts_offset = 0 [static]

Definition at line 163 of file ffmpeg.c.

Referenced by opt_input_file(), and opt_input_ts_offset().

uint16_t* inter_matrix = NULL [static]

Definition at line 122 of file ffmpeg.c.

Referenced by av_exit(), new_video_stream(), and opt_inter_matrix().

int intra_dc_precision = 8 [static]

Definition at line 138 of file ffmpeg.c.

Referenced by new_video_stream().

uint16_t* intra_matrix = NULL [static]

Definition at line 121 of file ffmpeg.c.

Referenced by av_exit(), new_video_stream(), and opt_intra_matrix().

int intra_only = 0 [static]

Definition at line 143 of file ffmpeg.c.

Referenced by build_frame_code(), and new_video_stream().

uint64_t limit_filesize = 0 [static]

Definition at line 208 of file ffmpeg.c.

Referenced by av_encode().

int loop_input = 0 [static]

Definition at line 139 of file ffmpeg.c.

Referenced by opt_input_file().

int loop_output = AVFMT_NOOUTPUTLOOP [static]

Definition at line 140 of file ffmpeg.c.

Referenced by opt_output_file().

int max_frames[4] = {INT_MAX, INT_MAX, INT_MAX, INT_MAX} [static]

Definition at line 117 of file ffmpeg.c.

Referenced by ac3_probe(), av_encode(), do_video_out(), and mp3_read_probe().

int me_threshold = 0 [static]

Definition at line 137 of file ffmpeg.c.

Referenced by do_video_out(), new_video_stream(), opt_input_file(), and opt_me_threshold().

AVMetaDataMap meta_data_maps[MAX_FILES] [static]

Definition at line 99 of file ffmpeg.c.

float mux_max_delay = 0.7 [static]

Definition at line 158 of file ffmpeg.c.

Referenced by opt_output_file().

float mux_preload = 0.5 [static]

Definition at line 157 of file ffmpeg.c.

Referenced by opt_output_file(), and opt_target().

int nb_frames_drop = 0 [static]

Definition at line 206 of file ffmpeg.c.

Referenced by do_video_out(), and print_report().

int nb_frames_dup = 0 [static]

Definition at line 205 of file ffmpeg.c.

Referenced by do_video_out(), and print_report().

int nb_input_files = 0 [static]

int nb_meta_data_maps [static]

Definition at line 100 of file ffmpeg.c.

Referenced by av_encode(), and opt_map_meta_data().

int nb_output_files = 0 [static]

int nb_stream_maps [static]

Definition at line 97 of file ffmpeg.c.

Referenced by main(), and opt_map().

int opt_name_count [static]

const char** opt_names [static]

int opt_programid = 0 [static]

Definition at line 188 of file ffmpeg.c.

Referenced by av_encode(), and opt_input_file().

int opt_shortest = 0 [static]

Definition at line 184 of file ffmpeg.c.

Referenced by av_encode().

Definition at line 3724 of file ffmpeg.c.

Referenced by pp_get_mode_by_name_and_quality().

AVFormatContext* output_files[MAX_FILES] [static]

Definition at line 93 of file ffmpeg.c.

int padcolor[3] = {16,128,128} [static]

Definition at line 112 of file ffmpeg.c.

Referenced by do_video_out(), and opt_pad_color().

char* pass_logfilename = NULL [static]

Definition at line 176 of file ffmpeg.c.

Referenced by av_encode().

int pgmyuv_compatibility_hack = 0 [static]

Definition at line 210 of file ffmpeg.c.

Referenced by opt_format(), and opt_input_file().

const int program_birth_year = 2000 [static]

Definition at line 69 of file ffmpeg.c.

Referenced by main().

const char program_name[] = "FFmpeg" [static]

Definition at line 68 of file ffmpeg.c.

Referenced by main(), and opt_show_version().

int q_pressed = 0 [static]

Definition at line 201 of file ffmpeg.c.

Referenced by av_encode(), and decode_interrupt_cb().

int qp_hist = 0 [static]

Definition at line 141 of file ffmpeg.c.

Referenced by print_report().

int rate_emu = 0 [static]

Definition at line 190 of file ffmpeg.c.

Referenced by opt_input_file().

int64_t rec_timestamp = 0 [static]

Definition at line 162 of file ffmpeg.c.

Referenced by opt_output_file(), and opt_rec_timestamp().

volatile sig_atomic_t received_sigterm = 0 [static]

Definition at line 302 of file ffmpeg.c.

Referenced by av_encode(), av_exit(), and sigterm_handler().

int64_t recording_time = 0 [static]

Definition at line 160 of file ffmpeg.c.

Referenced by av_encode(), and opt_recording_time().

int same_quality = 0 [static]

Definition at line 133 of file ffmpeg.c.

Referenced by do_video_out(), and new_video_stream().

int64_t start_time = 0 [static]

char* str_album = NULL [static]

Definition at line 170 of file ffmpeg.c.

Referenced by opt_output_file().

char* str_author = NULL [static]

Definition at line 166 of file ffmpeg.c.

Referenced by opt_output_file().

char* str_comment = NULL [static]

Definition at line 168 of file ffmpeg.c.

Referenced by opt_output_file().

char* str_copyright = NULL [static]

Definition at line 167 of file ffmpeg.c.

Referenced by opt_output_file().

char* str_genre = NULL [static]

Definition at line 169 of file ffmpeg.c.

Referenced by opt_output_file().

char* str_title = NULL [static]

Definition at line 165 of file ffmpeg.c.

Referenced by opt_output_file().

AVStreamMap stream_maps[MAX_FILES] [static]

Definition at line 96 of file ffmpeg.c.

int strict = 0 [static]

Definition at line 135 of file ffmpeg.c.

Referenced by new_audio_stream(), new_video_stream(), and opt_strict().

Definition at line 224 of file ffmpeg.c.

char* subtitle_codec_name = NULL [static]

int subtitle_disable = 0 [static]

Definition at line 153 of file ffmpeg.c.

Referenced by new_subtitle_stream(), opt_input_file(), and opt_output_file().

char* subtitle_language = NULL [static]

Definition at line 155 of file ffmpeg.c.

Referenced by new_subtitle_stream().

int subtitle_stream_copy = 0 [static]

Definition at line 179 of file ffmpeg.c.

Referenced by new_subtitle_stream(), opt_output_file(), and opt_subtitle_codec().

int sws_flags = SWS_BICUBIC [static]

struct SwsContext* sws_opts [static]

Definition at line 219 of file ffmpeg.c.

int thread_count = 1 [static]

int64_t timer_start [static]

Definition at line 220 of file ffmpeg.c.

Referenced by av_encode(), and print_report().

int top_field_first = -1 [static]

Definition at line 136 of file ffmpeg.c.

Referenced by do_video_out(), mpegvideo_extract_headers(), and opt_top_field_first().

int using_stdin = 0 [static]

Definition at line 197 of file ffmpeg.c.

Referenced by av_encode(), opt_input_file(), and opt_output_file().

int using_vhook = 0 [static]

Definition at line 198 of file ffmpeg.c.

Referenced by av_encode(), and pre_process_video_frame().

int verbose = 1 [static]

Definition at line 222 of file ffmpeg.c.

int video_channel = 0 [static]

Definition at line 192 of file ffmpeg.c.

Referenced by opt_input_file(), and opt_video_channel().

char* video_codec_name = NULL [static]

int video_codec_tag = 0 [static]

Definition at line 132 of file ffmpeg.c.

Referenced by new_video_stream(), and opt_video_tag().

int video_disable = 0 [static]

Definition at line 129 of file ffmpeg.c.

Referenced by new_video_stream(), opt_input_file(), and opt_output_file().

int video_discard = 0 [static]

Definition at line 130 of file ffmpeg.c.

Referenced by opt_input_file().

int video_global_header = 0 [static]

Definition at line 185 of file ffmpeg.c.

Referenced by new_video_stream().

int video_qdiff = 3 [static]

Definition at line 120 of file ffmpeg.c.

Referenced by new_video_stream(), and opt_qdiff().

float video_qscale = 0 [static]

Definition at line 119 of file ffmpeg.c.

Referenced by new_video_stream(), and opt_qscale().

const char* video_rc_override_string = NULL [static]

Definition at line 128 of file ffmpeg.c.

Referenced by new_video_stream(), and opt_video_rc_override_string().

int64_t video_size = 0 [static]

Definition at line 202 of file ffmpeg.c.

Referenced by do_video_stats(), output_packet(), and print_report().

char* video_standard [static]

Definition at line 193 of file ffmpeg.c.

Referenced by av_exit(), opt_input_file(), and opt_video_standard().

int video_stream_copy = 0 [static]

Definition at line 178 of file ffmpeg.c.

Referenced by new_video_stream(), opt_output_file(), and opt_video_codec().

int video_sync_method = 1 [static]

Definition at line 180 of file ffmpeg.c.

Referenced by do_video_out().

FILE* vstats_file [static]

Definition at line 187 of file ffmpeg.c.

Referenced by av_exit(), and do_video_stats().

char* vstats_filename [static]

Definition at line 186 of file ffmpeg.c.

Referenced by av_exit(), do_video_stats(), opt_vstats_file(), and output_packet().


Generated on Thu Apr 2 07:15:40 2009 for ffmpeg by  doxygen 1.5.6