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 <unistd.h>
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavcodec/audioconvert.h"
#include "libavutil/audioconvert.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/colorspace.h"
#include "libavutil/fifo.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
#include "libavutil/libm.h"
#include "libavformat/os_support.h"
#include "libswresample/swresample.h"
#include "libavformat/ffm.h"
#include <time.h>
#include "cmdutils.h"
#include "libavutil/avassert.h"
#include "cmdutils_common_opts.h"

Go to the source code of this file.

Data Structures

struct  StreamMap
struct  AudioChannelMap
struct  MetadataMap
 select an input file for an output file More...
struct  InputStream
struct  InputFile
struct  OutputStream
struct  OutputFile
struct  OptionsContext

Defines

#define MAX_STREAMS   1024
#define DEFAULT_PASS_LOGFILENAME_PREFIX   "ffmpeg2pass"
#define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)
#define NEW_STREAM(type, index)
#define METADATA_CHECK_INDEX(index, nb_elems, desc)
#define OFFSET(x)   offsetof(OptionsContext, x)

Functions

static void reset_options (OptionsContext *o, int is_input)
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 *ctx)
void av_noreturn exit_program (int ret)
 Do all the necessary cleanup and abort.
static void assert_avoptions (AVDictionary *m)
static void assert_codec_experimental (AVCodecContext *c, int encoder)
static void choose_sample_fmt (AVStream *st, AVCodec *codec)
static void choose_sample_rate (AVStream *st, AVCodec *codec)
static void choose_pixel_fmt (AVStream *st, AVCodec *codec)
static double get_sync_ipts (const OutputStream *ost)
static void write_frame (AVFormatContext *s, AVPacket *pkt, AVCodecContext *avctx, AVBitStreamFilterContext *bsfc)
static void generate_silence (uint8_t *buf, enum AVSampleFormat sample_fmt, size_t size)
static void do_audio_out (AVFormatContext *s, OutputStream *ost, InputStream *ist, AVFrame *decoded_frame)
static void pre_process_video_frame (InputStream *ist, AVPicture *picture, void **bufp)
static void do_subtitle_out (AVFormatContext *s, OutputStream *ost, InputStream *ist, AVSubtitle *sub, int64_t pts)
static void do_video_resample (OutputStream *ost, InputStream *ist, AVFrame *in_picture, AVFrame **out_picture)
static void do_video_out (AVFormatContext *s, OutputStream *ost, InputStream *ist, AVFrame *in_picture, int *frame_size, float quality)
static double psnr (double d)
static void do_video_stats (AVFormatContext *os, OutputStream *ost, int frame_size)
static void print_report (OutputFile *output_files, OutputStream *ost_table, int nb_ostreams, int is_last_report, int64_t timer_start, int64_t cur_time)
static void flush_encoders (OutputStream *ost_table, int nb_ostreams)
static int check_output_constraints (InputStream *ist, OutputStream *ost)
static void do_streamcopy (InputStream *ist, OutputStream *ost, const AVPacket *pkt)
static void rate_emu_sleep (InputStream *ist)
static int transcode_audio (InputStream *ist, AVPacket *pkt, int *got_output)
static int transcode_video (InputStream *ist, AVPacket *pkt, int *got_output, int64_t *pkt_pts, int64_t *pkt_dts)
static int transcode_subtitles (InputStream *ist, AVPacket *pkt, int *got_output)
static int output_packet (InputStream *ist, OutputStream *ost_table, int nb_ostreams, const AVPacket *pkt)
static void print_sdp (OutputFile *output_files, int n)
static int init_input_stream (int ist_index, OutputStream *output_streams, int nb_output_streams, char *error, int error_len)
static int transcode_init (OutputFile *output_files, int nb_output_files, InputFile *input_files, int nb_input_files)
static int transcode (OutputFile *output_files, int nb_output_files, InputFile *input_files, int nb_input_files)
static int opt_frame_crop (const char *opt, const char *arg)
static int opt_pad (const char *opt, const char *arg)
static double parse_frame_aspect_ratio (const char *arg)
static int opt_video_channel (const char *opt, const char *arg)
static int opt_video_standard (const char *opt, const char *arg)
static int opt_audio_codec (OptionsContext *o, const char *opt, const char *arg)
static int opt_video_codec (OptionsContext *o, const char *opt, const char *arg)
static int opt_subtitle_codec (OptionsContext *o, const char *opt, const char *arg)
static int opt_data_codec (OptionsContext *o, const char *opt, const char *arg)
static int opt_map (OptionsContext *o, const char *opt, const char *arg)
static int opt_attach (OptionsContext *o, const char *opt, const char *arg)
static int opt_map_channel (OptionsContext *o, const char *opt, const char *arg)
static void parse_meta_type (char *arg, char *type, int *index)
static int opt_map_metadata (OptionsContext *o, const char *opt, const char *arg)
static int opt_map_meta_data (OptionsContext *o, const char *opt, const char *arg)
static int opt_recording_timestamp (OptionsContext *o, const char *opt, const char *arg)
static AVCodecfind_codec_or_die (const char *name, enum AVMediaType type, int encoder)
static AVCodecchoose_decoder (OptionsContext *o, AVFormatContext *s, AVStream *st)
static void add_input_streams (OptionsContext *o, AVFormatContext *ic)
 Add all the streams from the given input file to the global list of input streams.
static void assert_file_overwrite (const char *filename)
static void dump_attachment (AVStream *st, const char *filename)
static int opt_input_file (OptionsContext *o, const char *opt, const char *filename)
static void parse_forced_key_frames (char *kf, OutputStream *ost)
static uint8_t * get_line (AVIOContext *s)
static int get_preset_file_2 (const char *preset_name, const char *codec_name, AVIOContext **s)
static void choose_encoder (OptionsContext *o, AVFormatContext *s, OutputStream *ost)
static OutputStreamnew_output_stream (OptionsContext *o, AVFormatContext *oc, enum AVMediaType type)
static void parse_matrix_coeffs (uint16_t *dest, const char *str)
static OutputStreamnew_video_stream (OptionsContext *o, AVFormatContext *oc)
static OutputStreamnew_audio_stream (OptionsContext *o, AVFormatContext *oc)
static OutputStreamnew_data_stream (OptionsContext *o, AVFormatContext *oc)
static OutputStreamnew_attachment_stream (OptionsContext *o, AVFormatContext *oc)
static OutputStreamnew_subtitle_stream (OptionsContext *o, AVFormatContext *oc)
static int opt_streamid (OptionsContext *o, const char *opt, const char *arg)
static int copy_chapters (InputFile *ifile, OutputFile *ofile, int copy_metadata)
static int read_ffserver_streams (OptionsContext *o, AVFormatContext *s, const char *filename)
static void opt_output_file (void *optctx, const char *filename)
static int opt_pass (const char *opt, const char *arg)
static int64_t getutime (void)
static int64_t getmaxrss (void)
static int opt_audio_qscale (OptionsContext *o, const char *opt, const char *arg)
static void show_usage (void)
static int opt_help (const char *opt, const char *arg)
static int opt_target (OptionsContext *o, const char *opt, const char *arg)
static int opt_vstats_file (const char *opt, const char *arg)
static int opt_vstats (const char *opt, const char *arg)
static int opt_video_frames (OptionsContext *o, const char *opt, const char *arg)
static int opt_audio_frames (OptionsContext *o, const char *opt, const char *arg)
static int opt_data_frames (OptionsContext *o, const char *opt, const char *arg)
static int opt_preset (OptionsContext *o, const char *opt, const char *arg)
static void log_callback_null (void *ptr, int level, const char *fmt, va_list vl)
static int opt_passlogfile (const char *opt, const char *arg)
static int opt_old2new (OptionsContext *o, const char *opt, const char *arg)
static int opt_bitrate (OptionsContext *o, const char *opt, const char *arg)
static int opt_video_filters (OptionsContext *o, const char *opt, const char *arg)
int main (int argc, char **argv)

Variables

const char program_name [] = "ffmpeg"
 program name, defined by the program for show_version().
const int program_birth_year = 2000
 program birth year, defined by the program for show_banner()
static const OptionDef options []
static int frame_bits_per_raw_sample = 0
static int video_discard = 0
static int same_quant = 0
static int do_deinterlace = 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 const char * video_codec_name = NULL
static const char * audio_codec_name = NULL
static const char * subtitle_codec_name = NULL
static int file_overwrite = 0
static int no_file_overwrite = 0
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 const char * pass_logfilename_prefix
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 copy_tb = -1
static int opt_shortest = 0
static char * vstats_filename
static FILE * vstats_file
static int audio_volume = 256
static int exit_on_error = 0
static int using_stdin = 0
static int run_as_daemon = 0
static volatile int received_nb_signals = 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 float dts_delta_threshold = 10
static int print_stats = 1
static uint8_t * audio_buf
static uint8_t * audio_out
static unsigned int allocated_audio_out_size
static unsigned int allocated_audio_buf_size
static uint8_t * input_tmp = NULL
static InputStreaminput_streams = NULL
static int nb_input_streams = 0
static InputFileinput_files = NULL
static int nb_input_files = 0
static OutputStreamoutput_streams = NULL
static int nb_output_streams = 0
static OutputFileoutput_files = NULL
static int nb_output_files = 0
static volatile int received_sigterm = 0
static const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }
static int bit_buffer_size = 1024*256
static uint8_t * bit_buffer = NULL


Define Documentation

#define DEFAULT_PASS_LOGFILENAME_PREFIX   "ffmpeg2pass"

Definition at line 173 of file ffmpeg.c.

#define MATCH_PER_STREAM_OPT ( name,
type,
outvar,
fmtctx,
st   ) 

Value:

{\
    int i, ret;\
    for (i = 0; i < o->nb_ ## name; i++) {\
        char *spec = o->name[i].specifier;\
        if ((ret = check_stream_specifier(fmtctx, st, spec)) > 0)\
            outvar = o->name[i].u.type;\
        else if (ret < 0)\
            exit_program(1);\
    }\
}

Definition at line 389 of file ffmpeg.c.

#define MAX_STREAMS   1024

Definition at line 118 of file ffmpeg.c.

#define METADATA_CHECK_INDEX ( index,
nb_elems,
desc   ) 

Value:

if ((index) < 0 || (index) >= (nb_elems)) {\
            av_log(NULL, AV_LOG_FATAL, "Invalid %s index %d while processing metadata maps\n",\
                     (desc), (index));\
            exit_program(1);\
        }

#define NEW_STREAM ( type,
index   ) 

Value:

if (index >= 0) {\
            ost = new_ ## type ## _stream(o, oc);\
            ost->source_index = index;\
            ost->sync_ist     = &input_streams[index];\
            input_streams[index].discard = 0;\
        }

#define OFFSET (  )     offsetof(OptionsContext, x)

Definition at line 4669 of file ffmpeg.c.


Function Documentation

static void add_input_streams ( OptionsContext o,
AVFormatContext ic 
) [static]

Add all the streams from the given input file to the global list of input streams.

Definition at line 3218 of file ffmpeg.c.

static void assert_avoptions ( AVDictionary m  )  [static]

Definition at line 700 of file ffmpeg.c.

static void assert_codec_experimental ( AVCodecContext c,
int  encoder 
) [static]

Definition at line 709 of file ffmpeg.c.

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

Definition at line 3295 of file ffmpeg.c.

static int check_output_constraints ( InputStream ist,
OutputStream ost 
) [static]

Definition at line 1646 of file ffmpeg.c.

static AVCodec* choose_decoder ( OptionsContext o,
AVFormatContext s,
AVStream st 
) [static]

Definition at line 3201 of file ffmpeg.c.

static void choose_encoder ( OptionsContext o,
AVFormatContext s,
OutputStream ost 
) [static]

Definition at line 3551 of file ffmpeg.c.

static void choose_pixel_fmt ( AVStream st,
AVCodec codec 
) [static]

Definition at line 768 of file ffmpeg.c.

static void choose_sample_fmt ( AVStream st,
AVCodec codec 
) [static]

Definition at line 726 of file ffmpeg.c.

static void choose_sample_rate ( AVStream st,
AVCodec codec 
) [static]

Definition at line 748 of file ffmpeg.c.

static int copy_chapters ( InputFile ifile,
OutputFile ofile,
int  copy_metadata 
) [static]

Definition at line 3915 of file ffmpeg.c.

static int decode_interrupt_cb ( void *  ctx  )  [static]

Definition at line 642 of file ffmpeg.c.

static void do_audio_out ( AVFormatContext s,
OutputStream ost,
InputStream ist,
AVFrame decoded_frame 
) [static]

Definition at line 846 of file ffmpeg.c.

static void do_streamcopy ( InputStream ist,
OutputStream ost,
const AVPacket pkt 
) [static]

Definition at line 1667 of file ffmpeg.c.

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

Definition at line 1113 of file ffmpeg.c.

static void do_video_out ( AVFormatContext s,
OutputStream ost,
InputStream ist,
AVFrame in_picture,
int *  frame_size,
float  quality 
) [static]

Definition at line 1238 of file ffmpeg.c.

static void do_video_resample ( OutputStream ost,
InputStream ist,
AVFrame in_picture,
AVFrame **  out_picture 
) [static]

Definition at line 1179 of file ffmpeg.c.

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

Definition at line 1387 of file ffmpeg.c.

static void dump_attachment ( AVStream st,
const char *  filename 
) [static]

Definition at line 3320 of file ffmpeg.c.

void av_noreturn exit_program ( int  ret  ) 

Do all the necessary cleanup and abort.

This function is implemented in the avtools, not cmdutils.

Definition at line 649 of file ffmpeg.c.

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

Definition at line 3182 of file ffmpeg.c.

static void flush_encoders ( OutputStream ost_table,
int  nb_ostreams 
) [static]

Definition at line 1558 of file ffmpeg.c.

static void generate_silence ( uint8_t *  buf,
enum AVSampleFormat  sample_fmt,
size_t  size 
) [static]

Definition at line 838 of file ffmpeg.c.

static uint8_t* get_line ( AVIOContext s  )  [static]

Definition at line 3506 of file ffmpeg.c.

static int get_preset_file_2 ( const char *  preset_name,
const char *  codec_name,
AVIOContext **  s 
) [static]

Definition at line 3525 of file ffmpeg.c.

static double get_sync_ipts ( const OutputStream ost  )  [static]

Definition at line 798 of file ffmpeg.c.

static int64_t getmaxrss ( void   )  [static]

Definition at line 4353 of file ffmpeg.c.

static int64_t getutime ( void   )  [static]

Definition at line 4335 of file ffmpeg.c.

static int init_input_stream ( int  ist_index,
OutputStream output_streams,
int  nb_output_streams,
char *  error,
int  error_len 
) [static]

Definition at line 2121 of file ffmpeg.c.

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

Definition at line 4634 of file ffmpeg.c.

int main ( int  argc,
char **  argv 
)

Definition at line 4813 of file ffmpeg.c.

static OutputStream* new_attachment_stream ( OptionsContext o,
AVFormatContext oc 
) [static]

Definition at line 3871 of file ffmpeg.c.

static OutputStream* new_audio_stream ( OptionsContext o,
AVFormatContext oc 
) [static]

Definition at line 3809 of file ffmpeg.c.

static OutputStream* new_data_stream ( OptionsContext o,
AVFormatContext oc 
) [static]

Definition at line 3858 of file ffmpeg.c.

static OutputStream* new_output_stream ( OptionsContext o,
AVFormatContext oc,
enum AVMediaType  type 
) [static]

Definition at line 3568 of file ffmpeg.c.

static OutputStream* new_subtitle_stream ( OptionsContext o,
AVFormatContext oc 
) [static]

Definition at line 3878 of file ffmpeg.c.

static OutputStream* new_video_stream ( OptionsContext o,
AVFormatContext oc 
) [static]

Definition at line 3685 of file ffmpeg.c.

static int opt_attach ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 3045 of file ffmpeg.c.

static int opt_audio_codec ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 2939 of file ffmpeg.c.

static int opt_audio_frames ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4580 of file ffmpeg.c.

static int opt_audio_qscale ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4371 of file ffmpeg.c.

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

Definition at line 4655 of file ffmpeg.c.

static int opt_data_codec ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 2957 of file ffmpeg.c.

static int opt_data_frames ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4585 of file ffmpeg.c.

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

Definition at line 2891 of file ffmpeg.c.

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

Definition at line 4383 of file ffmpeg.c.

static int opt_input_file ( OptionsContext o,
const char *  opt,
const char *  filename 
) [static]

Definition at line 3352 of file ffmpeg.c.

static int opt_map ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 2962 of file ffmpeg.c.

static int opt_map_channel ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 3053 of file ffmpeg.c.

static int opt_map_meta_data ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 3162 of file ffmpeg.c.

static int opt_map_metadata ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 3134 of file ffmpeg.c.

static int opt_old2new ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4648 of file ffmpeg.c.

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

Definition at line 3994 of file ffmpeg.c.

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

Definition at line 2897 of file ffmpeg.c.

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

Definition at line 4329 of file ffmpeg.c.

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

Definition at line 4638 of file ffmpeg.c.

static int opt_preset ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4590 of file ffmpeg.c.

static int opt_recording_timestamp ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 3169 of file ffmpeg.c.

static int opt_streamid ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 3894 of file ffmpeg.c.

static int opt_subtitle_codec ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 2951 of file ffmpeg.c.

static int opt_target ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4419 of file ffmpeg.c.

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

Definition at line 2927 of file ffmpeg.c.

static int opt_video_codec ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 2945 of file ffmpeg.c.

static int opt_video_filters ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4664 of file ffmpeg.c.

static int opt_video_frames ( OptionsContext o,
const char *  opt,
const char *  arg 
) [static]

Definition at line 4575 of file ffmpeg.c.

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

Definition at line 2933 of file ffmpeg.c.

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

Definition at line 4564 of file ffmpeg.c.

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

Definition at line 4557 of file ffmpeg.c.

static int output_packet ( InputStream ist,
OutputStream ost_table,
int  nb_ostreams,
const AVPacket pkt 
) [static]

Definition at line 1995 of file ffmpeg.c.

static void parse_forced_key_frames ( char *  kf,
OutputStream ost 
) [static]

Definition at line 3486 of file ffmpeg.c.

static double parse_frame_aspect_ratio ( const char *  arg  )  [static]

Definition at line 2903 of file ffmpeg.c.

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

Definition at line 3668 of file ffmpeg.c.

static void parse_meta_type ( char *  arg,
char *  type,
int *  index 
) [static]

Definition at line 3113 of file ffmpeg.c.

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

Definition at line 1074 of file ffmpeg.c.

static void print_report ( OutputFile output_files,
OutputStream ost_table,
int  nb_ostreams,
int  is_last_report,
int64_t  timer_start,
int64_t  cur_time 
) [static]

Definition at line 1424 of file ffmpeg.c.

static void print_sdp ( OutputFile output_files,
int  n 
) [static]

Definition at line 2104 of file ffmpeg.c.

static double psnr ( double  d  )  [static]

Definition at line 1382 of file ffmpeg.c.

static void rate_emu_sleep ( InputStream ist  )  [static]

Definition at line 1728 of file ffmpeg.c.

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

Definition at line 3955 of file ffmpeg.c.

Referenced by opt_output_file().

static int read_key ( void   )  [static]

Definition at line 589 of file ffmpeg.c.

static void reset_options ( OptionsContext o,
int  is_input 
) [static]

Definition at line 401 of file ffmpeg.c.

static void show_usage ( void   )  [static]

Definition at line 4376 of file ffmpeg.c.

static void sigterm_handler ( int  sig  )  [static]

Definition at line 547 of file ffmpeg.c.

static void term_exit ( void   )  [static]

Definition at line 536 of file ffmpeg.c.

static void term_init ( void   )  [static]

Definition at line 556 of file ffmpeg.c.

static int transcode ( OutputFile output_files,
int  nb_output_files,
InputFile input_files,
int  nb_input_files 
) [static]

Definition at line 2570 of file ffmpeg.c.

static int transcode_audio ( InputStream ist,
AVPacket pkt,
int *  got_output 
) [static]

Definition at line 1738 of file ffmpeg.c.

static int transcode_init ( OutputFile output_files,
int  nb_output_files,
InputFile input_files,
int  nb_input_files 
) [static]

Definition at line 2148 of file ffmpeg.c.

static int transcode_subtitles ( InputStream ist,
AVPacket pkt,
int *  got_output 
) [static]

Definition at line 1969 of file ffmpeg.c.

static int transcode_video ( InputStream ist,
AVPacket pkt,
int *  got_output,
int64_t *  pkt_pts,
int64_t *  pkt_dts 
) [static]

Definition at line 1842 of file ffmpeg.c.

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

Definition at line 805 of file ffmpeg.c.


Variable Documentation

unsigned int allocated_audio_buf_size [static]

Definition at line 169 of file ffmpeg.c.

unsigned int allocated_audio_out_size [static]

Definition at line 169 of file ffmpeg.c.

uint8_t* audio_buf [static]

Definition at line 167 of file ffmpeg.c.

const char* audio_codec_name = NULL [static]

float audio_drift_threshold = 0.1 [static]

Definition at line 143 of file ffmpeg.c.

uint8_t* audio_out [static]

Definition at line 168 of file ffmpeg.c.

int64_t audio_size = 0 [static]

Definition at line 157 of file ffmpeg.c.

int audio_sync_method = 0 [static]

Definition at line 142 of file ffmpeg.c.

int audio_volume = 256 [static]

Definition at line 150 of file ffmpeg.c.

uint8_t* bit_buffer = NULL [static]

Definition at line 1177 of file ffmpeg.c.

int bit_buffer_size = 1024*256 [static]

Definition at line 1176 of file ffmpeg.c.

int copy_tb = -1 [static]

Definition at line 145 of file ffmpeg.c.

int copy_ts = 0 [static]

Definition at line 144 of file ffmpeg.c.

int do_benchmark = 0 [static]

Definition at line 135 of file ffmpeg.c.

int do_deinterlace = 0 [static]

Definition at line 123 of file ffmpeg.c.

int do_hex_dump = 0 [static]

Definition at line 136 of file ffmpeg.c.

int do_pass = 0 [static]

Definition at line 139 of file ffmpeg.c.

int do_pkt_dump = 0 [static]

Definition at line 137 of file ffmpeg.c.

int do_psnr = 0 [static]

Definition at line 138 of file ffmpeg.c.

Referenced by new_video_stream().

float dts_delta_threshold = 10 [static]

Definition at line 163 of file ffmpeg.c.

int exit_on_error = 0 [static]

Definition at line 152 of file ffmpeg.c.

int64_t extra_size = 0 [static]

Definition at line 158 of file ffmpeg.c.

int file_overwrite = 0 [static]

Definition at line 133 of file ffmpeg.c.

int frame_bits_per_raw_sample = 0 [static]

Definition at line 120 of file ffmpeg.c.

InputFile* input_files = NULL [static]

Definition at line 286 of file ffmpeg.c.

Definition at line 284 of file ffmpeg.c.

int input_sync [static]

Definition at line 161 of file ffmpeg.c.

uint8_t* input_tmp = NULL [static]

Definition at line 171 of file ffmpeg.c.

Referenced by do_audio_out(), and exit_program().

const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL } [static]

Definition at line 647 of file ffmpeg.c.

int intra_dc_precision = 8 [static]

Definition at line 124 of file ffmpeg.c.

int intra_only = 0 [static]

Definition at line 128 of file ffmpeg.c.

Referenced by build_frame_code(), and new_video_stream().

int loop_input = 0 [static]

Definition at line 125 of file ffmpeg.c.

Referenced by opt_input_file().

int loop_output = AVFMT_NOOUTPUTLOOP [static]

Definition at line 126 of file ffmpeg.c.

Referenced by opt_output_file().

int nb_frames_drop = 0 [static]

Definition at line 160 of file ffmpeg.c.

int nb_frames_dup = 0 [static]

Definition at line 159 of file ffmpeg.c.

int nb_input_files = 0 [static]

Definition at line 287 of file ffmpeg.c.

int nb_input_streams = 0 [static]

Definition at line 285 of file ffmpeg.c.

int nb_output_files = 0 [static]

Definition at line 292 of file ffmpeg.c.

int nb_output_streams = 0 [static]

Definition at line 290 of file ffmpeg.c.

int no_file_overwrite = 0 [static]

Definition at line 134 of file ffmpeg.c.

int opt_shortest = 0 [static]

Definition at line 146 of file ffmpeg.c.

static const OptionDef options [static]

Definition at line 116 of file ffmpeg.c.

Definition at line 291 of file ffmpeg.c.

Definition at line 289 of file ffmpeg.c.

const char* pass_logfilename_prefix [static]

Definition at line 140 of file ffmpeg.c.

int print_stats = 1 [static]

Definition at line 165 of file ffmpeg.c.

const int program_birth_year = 2000

program birth year, defined by the program for show_banner()

Definition at line 91 of file ffmpeg.c.

const char program_name[] = "ffmpeg"

program name, defined by the program for show_version().

Definition at line 90 of file ffmpeg.c.

int qp_hist = 0 [static]

Definition at line 127 of file ffmpeg.c.

volatile int received_nb_signals = 0 [static]

Definition at line 155 of file ffmpeg.c.

Referenced by decode_interrupt_cb(), sigterm_handler(), and transcode().

volatile int received_sigterm = 0 [static]

Definition at line 545 of file ffmpeg.c.

int run_as_daemon = 0 [static]

Definition at line 154 of file ffmpeg.c.

int same_quant = 0 [static]

Definition at line 122 of file ffmpeg.c.

const char* subtitle_codec_name = NULL [static]

int using_stdin = 0 [static]

Definition at line 153 of file ffmpeg.c.

const char* video_codec_name = NULL [static]

int video_discard = 0 [static]

Definition at line 121 of file ffmpeg.c.

int64_t video_size = 0 [static]

Definition at line 156 of file ffmpeg.c.

int video_sync_method = -1 [static]

Definition at line 141 of file ffmpeg.c.

FILE* vstats_file [static]

Definition at line 148 of file ffmpeg.c.

char* vstats_filename [static]

Definition at line 147 of file ffmpeg.c.


Generated on Fri Oct 26 02:43:45 2012 for FFmpeg by  doxygen 1.5.8