How do I add a new audio stream?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I add a new audio stream?

Tuuls
Hi all. How, after all the new changes, you can add a new audio stream to the .mov file?
Previously, it was a option -newaudio , after the output file name.
Now any attempt to do so will generate an error "Missing argument for option 'newaudio'"

G:\ffmpeg\bin>ffmpeg -threads 4 -i E:\IN.avi  -pix_fmt yuv420p  -codec:v mpeg2video -b:v 25000k  -r 25 -copyts -codec:a pcm_s16le -ar 48000 -ac 2  -y d:\out.mov  -map 0:1 -codec:a pcm_s16le -ar 48000 -ac 2  -newaudio

Reply | Threaded
Open this post in threaded view
|

Re: How do I add a new audio stream?

Carl Eugen Hoyos
Tuuls <koxaniy <at> mail.ru> writes:

> Hi all. How, after all the new changes, you can add a new audio stream to the
> .mov file?

> G:\ffmpeg\bin>ffmpeg -threads 4 -i E:\IN.avi  -pix_fmt yuv420p  -codec:v
> mpeg2video -b:v 25000k  -r 25 -copyts -codec:a pcm_s16le -ar 48000 -ac 2  -y
> d:\out.mov  -map 0:1 -codec:a pcm_s16le -ar 48000 -ac 2  -newaudio

(Complete, uncut output console output missing, therefore I have to guess.)

ffmpeg -i i.avi -map 0:0 -map 0:1 -map 0:1 -c:v mpeg2video -c:a pcm_s16le out.mov

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: How do I add a new audio stream?

Tuuls
Thank you so much! The option -newaudio is no longer used?
Reply | Threaded
Open this post in threaded view
|

Re: How do I add a new audio stream?

Tuuls
Another question!
How different channels of a stereo, expanded in different streams ?


If I use this option:

  -map 0:1 -map_channel 0.1.0  -map 0:1 -map_channel 0.1.1 -codec:a pcm_s16le -ar 48000 -ac 1  

the output I get two stream, but the same channels in it, and not different, the left and right!
How to get different channels in different stream?
Reply | Threaded
Open this post in threaded view
|

Re: How do I add a new audio stream?

Clément Bœsch
On Sun, Nov 20, 2011 at 02:38:54PM -0800, Tuuls wrote:
> Another question!
> How different channels of a stereo, expanded in different streams ?
>

You mean something like this?:

  ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -y out.ogg

I'll add a similar example to the documentation soon.

[...]

--
Clément B.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

attachment0 (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How do I add a new audio stream?

Tuuls
Very very big thank you for this! This is very useful!