69 codec_ctx = stream->
codec;
111 in_stream = ifmt_ctx->
streams[i];
112 dec_ctx = in_stream->
codec;
113 enc_ctx = out_stream->
codec;
147 av_log(NULL,
AV_LOG_FATAL,
"Elementary stream #%d is of unknown type, cannot proceed\n", i);
196 if (!outputs || !inputs || !filter_graph) {
204 if (!buffersrc || !buffersink) {
211 "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
218 args, NULL, filter_graph);
225 NULL, NULL, filter_graph);
241 if (!buffersrc || !buffersink) {
251 "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%"PRIx64,
256 args, NULL, filter_graph);
263 NULL, NULL, filter_graph);
301 outputs->
next = NULL;
308 if (!outputs->
name || !inputs->
name) {
314 &inputs, &outputs, NULL)) < 0)
334 const char *filter_spec;
351 filter_spec =
"null";
353 filter_spec =
"anull";
371 got_frame = &got_frame_local;
378 ret = enc_func(ofmt_ctx->
streams[stream_index]->
codec, &enc_pkt,
379 filt_frame, got_frame);
470 int main(
int argc,
char **argv)
476 unsigned int stream_index;
522 ret = dec_func(ifmt_ctx->
streams[stream_index]->
codec, frame,
523 &got_frame, &packet);