#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 "libavutil/imgutils.h"
#include "libavformat/os_support.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 | MetadataMap |
select an input file for an output file More... | |
struct | FrameBuffer |
struct | InputStream |
struct | InputFile |
struct | OutputStream |
struct | OutputFile |
struct | OptionsContext |
Defines | |
#define | VSYNC_AUTO -1 |
#define | VSYNC_PASSTHROUGH 0 |
#define | VSYNC_CFR 1 |
#define | VSYNC_VFR 2 |
#define | DEFAULT_PASS_LOGFILENAME_PREFIX "av2pass" |
#define | MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st) |
#define | MAKE_SFMT_PAIR(a, b) ((a)+AV_SAMPLE_FMT_NB*(b)) |
#define | METADATA_CHECK_INDEX(index, nb_elems, desc) |
#define | SET_DICT(type, meta, context, index) |
#define | NEW_STREAM(type, index) |
#define | OFFSET(x) offsetof(OptionsContext, x) |
Typedefs | |
typedef struct StreamMap | StreamMap |
typedef struct MetadataMap | MetadataMap |
select an input file for an output file | |
typedef struct FrameBuffer | FrameBuffer |
typedef struct InputStream | InputStream |
typedef struct InputFile | InputFile |
typedef struct OutputStream | OutputStream |
typedef struct OutputFile | OutputFile |
typedef struct OptionsContext | OptionsContext |
Functions | |
static void | reset_options (OptionsContext *o) |
static int | alloc_buffer (InputStream *ist, FrameBuffer **pbuf) |
static void | free_buffer_pool (InputStream *ist) |
static void | unref_buffer (InputStream *ist, FrameBuffer *buf) |
static int | codec_get_buffer (AVCodecContext *s, AVFrame *frame) |
static void | codec_release_buffer (AVCodecContext *s, AVFrame *frame) |
static void | filter_release_buffer (AVFilterBuffer *fb) |
static void | term_exit (void) |
static void | sigterm_handler (int sig) |
static void | term_init (void) |
static int | decode_interrupt_cb (void *ctx) |
void | 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 | update_sample_fmt (AVCodecContext *dec, AVCodec *dec_codec, AVCodecContext *enc) |
Update the requested input sample format based on the output sample format. | |
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, OutputStream *ost) |
static void | generate_silence (uint8_t *buf, enum AVSampleFormat sample_fmt, size_t size) |
static int | encode_audio_frame (AVFormatContext *s, OutputStream *ost, const uint8_t *buf, int buf_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) |
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) |
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 void | parse_forced_key_frames (char *kf, OutputStream *ost, AVCodecContext *avctx) |
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 double | parse_frame_aspect_ratio (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 void | parse_meta_type (char *arg, char *type, int *index, const char **stream_spec) |
Parse a metadata specifier in arg. | |
static int | copy_metadata (char *outspec, char *inspec, AVFormatContext *oc, AVFormatContext *ic, OptionsContext *o) |
static AVCodec * | find_codec_or_die (const char *name, enum AVMediaType type, int encoder) |
static AVCodec * | choose_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 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 OutputStream * | new_output_stream (OptionsContext *o, AVFormatContext *oc, enum AVMediaType type) |
static void | parse_matrix_coeffs (uint16_t *dest, const char *str) |
static OutputStream * | new_video_stream (OptionsContext *o, AVFormatContext *oc) |
static OutputStream * | new_audio_stream (OptionsContext *o, AVFormatContext *oc) |
static OutputStream * | new_data_stream (OptionsContext *o, AVFormatContext *oc) |
static OutputStream * | new_attachment_stream (OptionsContext *o, AVFormatContext *oc) |
static OutputStream * | new_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 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 void | show_help (void) |
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_video_tag (OptionsContext *o, const char *opt, const char *arg) |
static int | opt_audio_tag (OptionsContext *o, const char *opt, const char *arg) |
static int | opt_subtitle_tag (OptionsContext *o, const char *opt, const char *arg) |
static int | opt_video_filters (OptionsContext *o, const char *opt, const char *arg) |
static int | opt_vsync (const char *opt, const char *arg) |
int | main (int argc, char **argv) |
Variables | |
const char | program_name [] = "avconv" |
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 | video_discard = 0 |
static int | same_quant = 0 |
static int | do_deinterlace = 0 |
static int | intra_dc_precision = 8 |
static int | qp_hist = 0 |
static int | file_overwrite = 0 |
static int | do_benchmark = 0 |
static int | do_hex_dump = 0 |
static int | do_pkt_dump = 0 |
static int | do_pass = 0 |
static char * | pass_logfilename_prefix = NULL |
static int | video_sync_method = VSYNC_AUTO |
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 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 unsigned int | allocated_audio_buf_size |
static InputStream * | input_streams = NULL |
static int | nb_input_streams = 0 |
static InputFile * | input_files = NULL |
static int | nb_input_files = 0 |
static OutputStream * | output_streams = NULL |
static int | nb_output_streams = 0 |
static OutputFile * | output_files = NULL |
static int | nb_output_files = 0 |
static volatile int | received_sigterm = 0 |
static volatile int | received_nb_signals = 0 |
static const AVIOInterruptCB | int_cb = { decode_interrupt_cb, NULL } |
static int | bit_buffer_size = 1024 * 256 |
static uint8_t * | bit_buffer = NULL |
#define DEFAULT_PASS_LOGFILENAME_PREFIX "av2pass" |
Definition at line 146 of file avconv.c.
Referenced by transcode_init().
#define MAKE_SFMT_PAIR | ( | a, | |
b | |||
) | ((a)+AV_SAMPLE_FMT_NB*(b)) |
Referenced by do_audio_out(), transcode(), and transcode_init().
#define MATCH_PER_STREAM_OPT | ( | name, | |
type, | |||
outvar, | |||
fmtctx, | |||
st | |||
) |
{\ 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 371 of file avconv.c.
Referenced by add_input_streams(), choose_decoder(), choose_encoder(), new_audio_stream(), new_output_stream(), and new_video_stream().
#define METADATA_CHECK_INDEX | ( | index, | |
nb_elems, | |||
desc | |||
) |
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);\ }
Referenced by transcode().
#define NEW_STREAM | ( | type, | |
index | |||
) |
if (index >= 0) {\ ost = new_ ## type ## _stream(o, oc);\ ost->source_index = index;\ ost->sync_ist = &input_streams[index];\ input_streams[index].discard = 0;\ }
Referenced by opt_output_file().
#define OFFSET | ( | x | ) | offsetof(OptionsContext, x) |
switch (type) {\ case 'g':\ meta = &context->metadata;\ break;\ case 'c':\ METADATA_CHECK_INDEX(index, context->nb_chapters, "chapter")\ meta = &context->chapters[index]->metadata;\ break;\ case 'p':\ METADATA_CHECK_INDEX(index, context->nb_programs, "program")\ meta = &context->programs[index]->metadata;\ break;\ }\
Referenced by copy_metadata().
#define VSYNC_AUTO -1 |
Definition at line 79 of file avconv.c.
Referenced by do_video_out(), and opt_vsync().
#define VSYNC_CFR 1 |
Definition at line 81 of file avconv.c.
Referenced by do_video_out(), and opt_vsync().
#define VSYNC_PASSTHROUGH 0 |
Definition at line 80 of file avconv.c.
Referenced by do_video_out(), and opt_vsync().
#define VSYNC_VFR 2 |
Definition at line 82 of file avconv.c.
Referenced by do_video_out(), and opt_vsync().
typedef struct FrameBuffer FrameBuffer |
typedef struct InputStream InputStream |
typedef struct MetadataMap MetadataMap |
select an input file for an output file
typedef struct OptionsContext OptionsContext |
typedef struct OutputFile OutputFile |
typedef struct OutputStream OutputStream |
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 3174 of file avconv.c.
Referenced by opt_input_file().
static int alloc_buffer | ( | InputStream * | ist, |
FrameBuffer ** | pbuf | ||
) | [static] |
Definition at line 421 of file avconv.c.
Referenced by codec_get_buffer().
static void assert_avoptions | ( | AVDictionary * | m | ) | [static] |
Definition at line 733 of file avconv.c.
Referenced by init_input_stream(), opt_input_file(), and transcode_init().
static void assert_codec_experimental | ( | AVCodecContext * | c, |
int | encoder | ||
) | [static] |
Definition at line 742 of file avconv.c.
Referenced by init_input_stream(), and transcode_init().
static void assert_file_overwrite | ( | const char * | filename | ) | [static] |
Definition at line 3227 of file avconv.c.
Referenced by dump_attachment(), and opt_output_file().
static int check_output_constraints | ( | InputStream * | ist, |
OutputStream * | ost | ||
) | [static] |
Definition at line 1728 of file avconv.c.
Referenced by output_packet(), transcode_audio(), transcode_subtitles(), and transcode_video().
static AVCodec* choose_decoder | ( | OptionsContext * | o, |
AVFormatContext * | s, | ||
AVStream * | st | ||
) | [static] |
Definition at line 3157 of file avconv.c.
Referenced by add_input_streams(), and opt_input_file().
static void choose_encoder | ( | OptionsContext * | o, |
AVFormatContext * | s, | ||
OutputStream * | ost | ||
) | [static] |
Definition at line 3446 of file avconv.c.
Referenced by new_output_stream().
static void choose_pixel_fmt | ( | AVStream * | st, |
AVCodec * | codec | ||
) | [static] |
Definition at line 838 of file avconv.c.
Referenced by transcode_init().
static void choose_sample_fmt | ( | AVStream * | st, |
AVCodec * | codec | ||
) | [static] |
Definition at line 759 of file avconv.c.
Referenced by transcode_init().
static void choose_sample_rate | ( | AVStream * | st, |
AVCodec * | codec | ||
) | [static] |
Definition at line 818 of file avconv.c.
Referenced by transcode_init().
static int codec_get_buffer | ( | AVCodecContext * | s, |
AVFrame * | frame | ||
) | [static] |
Definition at line 493 of file avconv.c.
Referenced by init_input_stream().
static void codec_release_buffer | ( | AVCodecContext * | s, |
AVFrame * | frame | ||
) | [static] |
Definition at line 527 of file avconv.c.
Referenced by init_input_stream().
static int copy_chapters | ( | InputFile * | ifile, |
OutputFile * | ofile, | ||
int | copy_metadata | ||
) | [static] |
Definition at line 3783 of file avconv.c.
Referenced by opt_output_file().
static int copy_metadata | ( | char * | outspec, |
char * | inspec, | ||
AVFormatContext * | oc, | ||
AVFormatContext * | ic, | ||
OptionsContext * | o | ||
) | [static] |
Definition at line 3065 of file avconv.c.
Referenced by opt_output_file().
static int decode_interrupt_cb | ( | void * | ctx | ) | [static] |
static void do_audio_out | ( | AVFormatContext * | s, |
OutputStream * | ost, | ||
InputStream * | ist, | ||
AVFrame * | decoded_frame | ||
) | [static] |
Definition at line 988 of file avconv.c.
Referenced by transcode_audio().
static void do_streamcopy | ( | InputStream * | ist, |
OutputStream * | ost, | ||
const AVPacket * | pkt | ||
) | [static] |
Definition at line 1749 of file avconv.c.
Referenced by output_packet().
static void do_subtitle_out | ( | AVFormatContext * | s, |
OutputStream * | ost, | ||
InputStream * | ist, | ||
AVSubtitle * | sub, | ||
int64_t | pts | ||
) | [static] |
Definition at line 1212 of file avconv.c.
Referenced by transcode_subtitles().
static void do_video_out | ( | AVFormatContext * | s, |
OutputStream * | ost, | ||
InputStream * | ist, | ||
AVFrame * | in_picture, | ||
int * | frame_size, | ||
float | quality | ||
) | [static] |
Definition at line 1331 of file avconv.c.
Referenced by transcode_video().
static void do_video_resample | ( | OutputStream * | ost, |
InputStream * | ist, | ||
AVFrame * | in_picture, | ||
AVFrame ** | out_picture | ||
) | [static] |
Definition at line 1279 of file avconv.c.
Referenced by do_video_out().
static void do_video_stats | ( | AVFormatContext * | os, |
OutputStream * | ost, | ||
int | frame_size | ||
) | [static] |
Definition at line 1481 of file avconv.c.
Referenced by transcode_video().
static void dump_attachment | ( | AVStream * | st, |
const char * | filename | ||
) | [static] |
Definition at line 3249 of file avconv.c.
Referenced by opt_input_file().
static int encode_audio_frame | ( | AVFormatContext * | s, |
OutputStream * | ost, | ||
const uint8_t * | buf, | ||
int | buf_size | ||
) | [static] |
Definition at line 930 of file avconv.c.
Referenced by do_audio_out(), and flush_encoders().
void exit_program | ( | int | ret | ) |
Do all the necessary cleanup and abort.
This function is implemented in the avtools, not cmdutils.
Definition at line 663 of file avconv.c.
Referenced by assert_avoptions(), assert_codec_experimental(), assert_file_overwrite(), copy_metadata(), do_audio_out(), do_subtitle_out(), do_video_out(), do_video_resample(), do_video_stats(), dump_attachment(), encode_audio_frame(), find_codec_or_die(), flush_encoders(), get_line(), grow_array(), main(), new_audio_stream(), new_data_stream(), new_output_stream(), new_video_stream(), opt_audio_sample_fmt(), opt_bsf(), opt_frame_pix_fmt(), opt_frame_rate(), opt_input_file(), opt_loglevel(), opt_map(), opt_metadata(), opt_new_stream(), opt_output_file(), opt_preset(), opt_streamid(), opt_target(), output_packet(), parse_forced_key_frames(), parse_frame_aspect_ratio(), parse_matrix_coeffs(), parse_meta_type(), parse_number_or_die(), parse_option(), parse_options(), parse_time_or_die(), print_sdp(), transcode(), transcode_audio(), transcode_init(), transcode_video(), and write_frame().
static void filter_release_buffer | ( | AVFilterBuffer * | fb | ) | [static] |
Definition at line 539 of file avconv.c.
Referenced by transcode_video().
static AVCodec* find_codec_or_die | ( | const char * | name, |
enum AVMediaType | type, | ||
int | encoder | ||
) | [static] |
Definition at line 3138 of file avconv.c.
Referenced by choose_decoder(), and choose_encoder().
static void flush_encoders | ( | OutputStream * | ost_table, |
int | nb_ostreams | ||
) | [static] |
Definition at line 1641 of file avconv.c.
Referenced by transcode().
static void free_buffer_pool | ( | InputStream * | ist | ) | [static] |
Definition at line 472 of file avconv.c.
Referenced by exit_program().
static void generate_silence | ( | uint8_t * | buf, |
enum AVSampleFormat | sample_fmt, | ||
size_t | size | ||
) | [static] |
Definition at line 922 of file avconv.c.
Referenced by do_audio_out(), and flush_encoders().
static uint8_t* get_line | ( | AVIOContext * | s | ) | [static] |
Definition at line 3401 of file avconv.c.
Referenced by new_output_stream().
static int get_preset_file_2 | ( | const char * | preset_name, |
const char * | codec_name, | ||
AVIOContext ** | s | ||
) | [static] |
Definition at line 3420 of file avconv.c.
Referenced by new_output_stream().
static double get_sync_ipts | ( | const OutputStream * | ost | ) | [static] |
Definition at line 867 of file avconv.c.
Referenced by do_audio_out(), and do_video_out().
static int init_input_stream | ( | int | ist_index, |
OutputStream * | output_streams, | ||
int | nb_output_streams, | ||
char * | error, | ||
int | error_len | ||
) | [static] |
Definition at line 2186 of file avconv.c.
Referenced by transcode_init().
int main | ( | int | argc, |
char ** | argv | ||
) |
static OutputStream* new_attachment_stream | ( | OptionsContext * | o, |
AVFormatContext * | oc | ||
) | [static] |
Definition at line 3739 of file avconv.c.
Referenced by opt_output_file().
static OutputStream* new_audio_stream | ( | OptionsContext * | o, |
AVFormatContext * | oc | ||
) | [static] |
Definition at line 3696 of file avconv.c.
Referenced by opt_output_file().
static OutputStream* new_data_stream | ( | OptionsContext * | o, |
AVFormatContext * | oc | ||
) | [static] |
Definition at line 3726 of file avconv.c.
Referenced by opt_output_file().
static OutputStream* new_output_stream | ( | OptionsContext * | o, |
AVFormatContext * | oc, | ||
enum AVMediaType | type | ||
) | [static] |
Definition at line 3463 of file avconv.c.
Referenced by new_attachment_stream(), new_audio_stream(), new_data_stream(), new_subtitle_stream(), and new_video_stream().
static OutputStream* new_subtitle_stream | ( | OptionsContext * | o, |
AVFormatContext * | oc | ||
) | [static] |
Definition at line 3746 of file avconv.c.
Referenced by opt_output_file().
static OutputStream* new_video_stream | ( | OptionsContext * | o, |
AVFormatContext * | oc | ||
) | [static] |
Definition at line 3580 of file avconv.c.
Referenced by opt_output_file().
static int opt_attach | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_audio_codec | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
Definition at line 2921 of file avconv.c.
Referenced by opt_target().
static int opt_audio_frames | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_audio_qscale | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_audio_tag | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_data_codec | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_data_frames | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_input_file | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | filename | ||
) | [static] |
static int opt_map | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static void opt_output_file | ( | void * | optctx, |
const char * | filename | ||
) | [static] |
static int opt_pass | ( | const char * | opt, |
const char * | arg | ||
) | [static] |
static int opt_streamid | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_subtitle_codec | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_subtitle_tag | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_target | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_video_codec | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
Definition at line 2926 of file avconv.c.
Referenced by opt_target().
static int opt_video_filters | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_video_frames | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_video_tag | ( | OptionsContext * | o, |
const char * | opt, | ||
const char * | arg | ||
) | [static] |
static int opt_vstats | ( | const char * | opt, |
const char * | arg | ||
) | [static] |
static int opt_vstats_file | ( | const char * | opt, |
const char * | arg | ||
) | [static] |
Definition at line 4327 of file avconv.c.
Referenced by opt_vstats().
static int opt_vsync | ( | const char * | opt, |
const char * | arg | ||
) | [static] |
static int output_packet | ( | InputStream * | ist, |
OutputStream * | ost_table, | ||
int | nb_ostreams, | ||
const AVPacket * | pkt | ||
) | [static] |
Definition at line 2072 of file avconv.c.
Referenced by transcode().
static void parse_forced_key_frames | ( | char * | kf, |
OutputStream * | ost, | ||
AVCodecContext * | avctx | ||
) | [static] |
Definition at line 2234 of file avconv.c.
Referenced by transcode_init().
static double parse_frame_aspect_ratio | ( | const char * | arg | ) | [static] |
Definition at line 2897 of file avconv.c.
Referenced by new_video_stream().
static void parse_matrix_coeffs | ( | uint16_t * | dest, |
const char * | str | ||
) | [static] |
Definition at line 3563 of file avconv.c.
Referenced by new_video_stream().
static void parse_meta_type | ( | char * | arg, |
char * | type, | ||
int * | index, | ||
const char ** | stream_spec | ||
) | [static] |
Parse a metadata specifier in arg.
type | metadata type is written here -- g(lobal)/s(tream)/c(hapter)/p(rogram) |
index | for type c/p, chapter/program index is written here |
stream_spec | for type s, the stream specifier is written here |
Definition at line 3038 of file avconv.c.
Referenced by copy_metadata(), and opt_output_file().
static void pre_process_video_frame | ( | InputStream * | ist, |
AVPicture * | picture, | ||
void ** | bufp | ||
) | [static] |
Definition at line 1173 of file avconv.c.
Referenced by transcode_video().
static void print_report | ( | OutputFile * | output_files, |
OutputStream * | ost_table, | ||
int | nb_ostreams, | ||
int | is_last_report, | ||
int64_t | timer_start | ||
) | [static] |
Definition at line 1518 of file avconv.c.
Referenced by transcode().
static void print_sdp | ( | OutputFile * | output_files, |
int | n | ||
) | [static] |
Definition at line 2169 of file avconv.c.
Referenced by transcode_init().
static double psnr | ( | double | d | ) | [static] |
Definition at line 1476 of file avconv.c.
Referenced by do_video_stats(), main(), and print_report().
static void rate_emu_sleep | ( | InputStream * | ist | ) | [static] |
Definition at line 1801 of file avconv.c.
Referenced by output_packet(), transcode_audio(), transcode_subtitles(), and transcode_video().
static void reset_options | ( | OptionsContext * | o | ) | [static] |
Definition at line 383 of file avconv.c.
Referenced by main(), opt_input_file(), and opt_output_file().
static void show_usage | ( | void | ) | [static] |
Definition at line 4150 of file avconv.c.
Referenced by main(), and show_help().
static void sigterm_handler | ( | int | sig | ) | [static] |
Definition at line 640 of file avconv.c.
Referenced by term_init().
Definition at line 631 of file avconv.c.
Referenced by sigterm_handler(), and transcode().
Definition at line 647 of file avconv.c.
Referenced by transcode().
static int transcode | ( | OutputFile * | output_files, |
int | nb_output_files, | ||
InputFile * | input_files, | ||
int | nb_input_files | ||
) | [static] |
static int transcode_audio | ( | InputStream * | ist, |
AVPacket * | pkt, | ||
int * | got_output | ||
) | [static] |
Definition at line 1811 of file avconv.c.
Referenced by output_packet().
static int transcode_init | ( | OutputFile * | output_files, |
int | nb_output_files, | ||
InputFile * | input_files, | ||
int | nb_input_files | ||
) | [static] |
Definition at line 2265 of file avconv.c.
Referenced by transcode().
static int transcode_subtitles | ( | InputStream * | ist, |
AVPacket * | pkt, | ||
int * | got_output | ||
) | [static] |
Definition at line 2046 of file avconv.c.
Referenced by output_packet().
static int transcode_video | ( | InputStream * | ist, |
AVPacket * | pkt, | ||
int * | got_output, | ||
int64_t * | pkt_pts | ||
) | [static] |
Definition at line 1915 of file avconv.c.
Referenced by output_packet().
static void unref_buffer | ( | InputStream * | ist, |
FrameBuffer * | buf | ||
) | [static] |
Definition at line 483 of file avconv.c.
Referenced by codec_release_buffer(), and filter_release_buffer().
static void update_sample_fmt | ( | AVCodecContext * | dec, |
AVCodec * | dec_codec, | ||
AVCodecContext * | enc | ||
) | [static] |
Update the requested input sample format based on the output sample format.
This is currently only used to request float output from decoders which support multiple sample formats, one of which is AV_SAMPLE_FMT_FLT. Ideally this will be removed in the future when decoders do not do format conversion and only output in their native format.
Definition at line 785 of file avconv.c.
Referenced by init_input_stream().
static void write_frame | ( | AVFormatContext * | s, |
AVPacket * | pkt, | ||
OutputStream * | ost | ||
) | [static] |
Definition at line 874 of file avconv.c.
Referenced by do_streamcopy(), do_subtitle_out(), do_video_out(), encode_audio_frame(), and flush_encoders().
unsigned int allocated_audio_buf_size [static] |
Definition at line 144 of file avconv.c.
Referenced by do_audio_out(), exit_program(), and flush_encoders().
uint8_t* audio_buf [static] |
Definition at line 143 of file avconv.c.
Referenced by do_audio_out(), exit_program(), and flush_encoders().
float audio_drift_threshold = 0.1 [static] |
Definition at line 121 of file avconv.c.
Referenced by do_audio_out().
int64_t audio_size = 0 [static] |
Definition at line 133 of file avconv.c.
Referenced by bfi_read_packet(), bmv_read_packet(), do_streamcopy(), encode_audio_frame(), print_report(), read_packet(), rl2_read_header(), rpl_read_header(), and sdl_audio_callback().
int audio_sync_method = 0 [static] |
Definition at line 120 of file avconv.c.
Referenced by do_audio_out(), and transcode_init().
int audio_volume = 256 [static] |
Definition at line 128 of file avconv.c.
Referenced by transcode_audio(), and transcode_init().
uint8_t* bit_buffer = NULL [static] |
Definition at line 1276 of file avconv.c.
Referenced by do_video_out(), flush_encoders(), transcode(), and transcode_init().
int bit_buffer_size = 1024 * 256 [static] |
Definition at line 1275 of file avconv.c.
Referenced by transcode_init().
int copy_tb = 1 [static] |
Definition at line 123 of file avconv.c.
Referenced by transcode_init().
int copy_ts = 0 [static] |
Definition at line 122 of file avconv.c.
Referenced by opt_input_file(), and transcode().
int do_benchmark = 0 [static] |
int do_deinterlace = 0 [static] |
Definition at line 109 of file avconv.c.
Referenced by pre_process_video_frame().
int do_hex_dump = 0 [static] |
Definition at line 115 of file avconv.c.
Referenced by transcode().
int do_pass = 0 [static] |
Definition at line 117 of file avconv.c.
Referenced by new_video_stream(), and opt_pass().
int do_pkt_dump = 0 [static] |
Definition at line 116 of file avconv.c.
Referenced by transcode().
float dts_delta_threshold = 10 [static] |
Definition at line 139 of file avconv.c.
Referenced by transcode().
int exit_on_error = 0 [static] |
Definition at line 130 of file avconv.c.
Referenced by do_audio_out(), do_subtitle_out(), transcode(), and write_frame().
int64_t extra_size = 0 [static] |
Definition at line 134 of file avconv.c.
Referenced by ape_read_packet(), asf_write_header1(), print_report(), and transcode_init().
int file_overwrite = 0 [static] |
Definition at line 113 of file avconv.c.
Referenced by assert_file_overwrite().
InputFile* input_files = NULL [static] |
InputStream* input_streams = NULL [static] |
Definition at line 268 of file avconv.c.
Referenced by check_output_constraints().
int input_sync [static] |
Definition at line 137 of file avconv.c.
Referenced by transcode().
const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL } [static] |
Definition at line 661 of file avconv.c.
Referenced by dump_attachment(), get_preset_file_2(), opt_input_file(), opt_output_file(), transcode_init(), and url_alloc_for_protocol().
int intra_dc_precision = 8 [static] |
Definition at line 110 of file avconv.c.
Referenced by new_video_stream().
int nb_frames_drop = 0 [static] |
Definition at line 136 of file avconv.c.
Referenced by do_video_out(), and print_report().
int nb_frames_dup = 0 [static] |
Definition at line 135 of file avconv.c.
Referenced by do_video_out(), and print_report().
int nb_input_files = 0 [static] |
Definition at line 271 of file avconv.c.
Referenced by add_input_streams(), dump_attachment(), exit_program(), main(), opt_input_file(), opt_map(), opt_output_file(), opt_target(), and transcode_init().
int nb_input_streams = 0 [static] |
Definition at line 269 of file avconv.c.
Referenced by add_input_streams(), exit_program(), opt_input_file(), opt_output_file(), transcode(), and transcode_init().
int nb_output_files = 0 [static] |
Definition at line 276 of file avconv.c.
Referenced by exit_program(), main(), new_output_stream(), opt_output_file(), transcode(), and transcode_init().
int nb_output_streams = 0 [static] |
Definition at line 274 of file avconv.c.
Referenced by exit_program(), init_input_stream(), new_output_stream(), opt_output_file(), transcode(), transcode_audio(), transcode_init(), transcode_subtitles(), and transcode_video().
int opt_shortest = 0 [static] |
Definition at line 124 of file avconv.c.
Referenced by transcode().
Definition at line 105 of file avconv.c.
Referenced by pp_get_mode_by_name_and_quality(), and reset_options().
OutputFile* output_files = NULL [static] |
OutputStream* output_streams = NULL [static] |
char* pass_logfilename_prefix = NULL [static] |
Definition at line 118 of file avconv.c.
Referenced by transcode_init().
int print_stats = 1 [static] |
Definition at line 141 of file avconv.c.
Referenced by print_report().
const int program_birth_year = 2000 |
program birth year, defined by the program for show_banner()
Definition at line 85 of file avconv.c.
Referenced by show_banner().
const char program_name[] = "avconv" |
program name, defined by the program for show_version().
Definition at line 84 of file avconv.c.
Referenced by compute_status(), main(), show_banner(), show_license(), show_usage(), and show_version().
int qp_hist = 0 [static] |
Definition at line 111 of file avconv.c.
Referenced by print_report().
volatile int received_nb_signals = 0 [static] |
volatile int received_sigterm = 0 [static] |
Definition at line 636 of file avconv.c.
Referenced by transcode().
int same_quant = 0 [static] |
Definition at line 108 of file avconv.c.
Referenced by new_output_stream(), and transcode_video().
int using_stdin = 0 [static] |
Definition at line 131 of file avconv.c.
Referenced by assert_file_overwrite(), and opt_input_file().
int video_discard = 0 [static] |
Definition at line 107 of file avconv.c.
Referenced by add_input_streams().
int64_t video_size = 0 [static] |
Definition at line 132 of file avconv.c.
Referenced by decode_frame(), do_streamcopy(), do_video_out(), do_video_stats(), flush_encoders(), print_report(), and rpl_read_header().
int video_sync_method = VSYNC_AUTO [static] |
Definition at line 119 of file avconv.c.
Referenced by do_video_out(), and opt_vsync().
FILE* vstats_file [static] |
Definition at line 126 of file avconv.c.
Referenced by do_video_stats(), and exit_program().
char* vstats_filename [static] |
Definition at line 125 of file avconv.c.
Referenced by do_video_stats(), exit_program(), opt_vstats_file(), and transcode_video().