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. libavcodec provides some generic global options. Indicate that the stream is not to be re-encoded. If you want to specify the codec used to encode a stream, instead of relying on FFmpeg’s automatic defaults, you can select the codec using the -c option flag. This document describes the codecs (decoders and encoders) provided by the libavcodec library. Installing FFmpeg for Windows - Audacity Manual Installing FFmpeg for Windows The optional FFmpeg library allows Audacity to import and export a much larger range of audio formats including M4A (AAC), AC3, AMR (narrow band) and WMA and also to import audio from most video files. Name of a decoder/encoder or a special value copy (output only) to 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). ffmpeg -i input -c:v libx265 -crf 26 -preset fast -c:a aac -b:a 128k output.mp4 This example uses AAC audio at 128 kBit/s. acodec is a subset of that functionality that automatically scopes to Audio streams 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.
0 Comments
Leave a Reply. |