FORUMS: list search recent posts

exchanging audio in DNxHD

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Grzegorz Kwiatkowski
exchanging audio in DNxHD
on May 6, 2012 at 4:43:25 pm

Is there any way to exchange audio in
DNxHD file or add audio without recompressing the video stream? If not ffmpeg, can any other software do this?

thanks 4 help


Return to posts index

Reuben Martin
Re: exchanging audio in DNxHD
on May 7, 2012 at 3:27:13 am

Specifying the video codec as copy, (i.e. "-vcodec copy") will copy the video stream without re-encoding. If you want to replace the audio, you use more than one input, and use stream mapping to specify which stream sources end up in the output.

http://ffmpeg.org/ffmpeg.html#Advanced-options


Return to posts index

Grzegorz Kwiatkowski
Re: exchanging audio in DNxHD
on May 8, 2012 at 11:02:07 am

Martin,

OK I created a command line that seems to work:

ffmpeg -i test.mov -i test.wav -vcodec copy -acodec sb16be -map 0:v -map 1:0 out.mov

I got a few questions.

How do we understand streams? How can a video file have more than one audio or video stream? When we use 'map' command, we indicate a stream, 0:0 means "first stream of a video"? I always though a video file has one stream of audio which can consist of two channels (stereo audio).


Return to posts index


Reuben Martin
Re: exchanging audio in DNxHD
on May 9, 2012 at 3:53:44 am

A video file can an arbitrary number of streams. They are simply separate data streams chopped up into chunks and interleaved together. They do no have to be just audio or video either. For example a stream can hold time code, closed captioning, subtitle or metadata.

A good example you might be familiar with is DVDs. They often have more than one audio stream to support multiple languages. When you switch from english to spanish, it's just changing with audio stream it is reading.

Likewise, audio streams can contain any number of channels (e.g. surround sound) FFmpeg can do channel mapping also.

You can have multiple video streams that can be in different codecs, different resolutions, and even different frame rates. You are only limited by whatever the limitations are of the format they are muxed into.

The "-map 0:0" means "first file, first stream". First file being whatever file is listed first in the command line via the "-i" option. First stream is whatever stream is first inside the file, regardless of the type of stream.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]