

So with -c you can control all the types of streams, whereas -acodec and -vcodec are just shortcuts for the audio or video subsets thereof. This is saying use the original codec for all the steams ( -c copy), but for the second video stream use libx264 ( -c:v:1 libx264), and for the 138th audio stream use libvorbis ( -c:a:137 libvorbis). So to put it all together consider this command from the docįfmpeg -i INPUT -map 0 -c copy -c:v:1 libx264 -c:a:137 libvorbis OUTPUT There is also a -vcodec that works the same way for video streams.

Indicate that the stream is not to be re-encoded.

Name of a decoder/encoder or a special value copy (output only) to It doesnt matter if it is for commercial usage or not. codec codec (input/output,per-stream) Select an encoder (when used before an output file) or a decoder (when used before an input file) for one or more streams. acodec:1 is the same as -codec:a:1 and indicates you are setting the codec for the second audio stream (the first audio stream is 0). acodec is a subset of that functionality that automatically scopes to Audio streams The decision between these 2 should be made by usingĪVCodecContext.-c or -codec is a generic stream selector, so you can use it to set the codec for any of the streams be they audio or video. Values should trigger error concealment code and the decoder/demuxer should OTOH if possibly damaged data is assumed and it is assumed that the originalĭid contain specific values in reserved/unused fields then finding unexpected This means that if undamaged data is assumed then unused/resereved values Should be made so that the output quality is maximized. * The decision between erroring out or not in case of unexpected data ffmpeg - Video for Windows Codec x264 and VP80 - Video Production Stack Exchange Video for Windows Codec x264 and VP80 Ask Question Asked 8 years, 8 months ago Modified 8 years, 8 months ago Viewed 2k times 2 Im looking for VfW codec to encode H264 and VP80. Int (*decode)(AVCodecContext *, void *outdata, int *outdata_size,Ĭonst AVRational *supported_framerates ///array of supported framerates, or NULL if any, array is terminated by Int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data) The first thing to look at is the AVCodec struct. Registering the codec libavcodec/avcodec.h
