ffmpeg "newaudio" parameter.

It appears that ffmpeg devs changes the calling parameters without advance notice, and
conversions that worked previously stop working.

For example I use this:


> $ ffmpeg -i inputfile.mpg -qscale 8  -async 1 -deinterlace -vcodec libxvid -acodec libmp3lame outputfile.avi -newaudio
....
> Missing argument for option 'newaudio'

but:

> $ ffmpeg -i inputfile.mpg -qscale 8  -async 1 -deinterlace -vcodec libxvid -acodec libmp3lame outputfile.avi -newaudio ppp
....
> Unrecognized option 'newaudio'
> Failed to set value 'ppp' for option 'newaudio'


The current man page has no reference to “newaudio”.

The reason for this parameter was that the mpeg streams I want to convert have two audio
streams, in English and Spanish, and I want to keep both. Without that parameter I got (and
get) only one language.

I get this:


Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libxvid)
Stream #0:1 -> #0:1 (mp2 -> libmp3lame)

Now that parameter has disappeared, the manual says nothing, and I don’t know how to get the
same result of two language streams.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Use “-map 0” perhaps - per the ffmpeg docs at
FFmpeg documentation : :

On 2012-07-31 17:46, smithlar wrote:

> Use “-map 0” perhaps - per the ffmpeg docs at
> ‘FFmpeg documentation : :’
> (http://ffmpeg.org/ffmpeg.html#Audio-Options)

I did not look at -map because it is so complex to be a nightmare.

+++···················
STREAM SELECTION
By default ffmpeg includes only one stream of each type (video,
audio, subtitle) present in the input files and adds them to
each output file. It picks the “best” of each based upon the
following criteria; for video it is the stream with the highest
resolution, for audio the stream with the most channels, for
subtitle it’s the first subtitle stream. In the case where
several streams of the same type rate equally, the lowest
numbered stream is chosen.

You can disable some of those defaults by using “-vn/-an/-sn”
options. For full manual control, use the “-map” option, which
disables the defaults just described.

-an (output)
Disable audio recording.

-vn (output)
Disable video recording.

-sn (output)
Disable subtitle recording.
···················+±

The default is one stream of each. It does not say how to change that default, only how to
disable the stream.

Maybe:

+++···················
For example, to map ALL streams from the first input file to output

ffmpeg -i INPUT -map 0 output
···················+±

Mmm… it appears to work :-?

+++···················

> Output #0, avi, to ‘Sueño Olimpico (20120728) - d[remux].2.avi’:
> Metadata:
> ISFT : Lavf54.6.100
> Stream #0:0: Video: mpeg4 (xvid / 0x64697678), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc
> Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16
> Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16
> Stream mapping:
> Stream #0:0#0:0 (mpeg2video → libxvid)
> Stream #0:1#0:1 (mp2 → libmp3lame)
> Stream #0:2#0:2 (mp2 → libmp3lame)
···················+±

Thanks :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Yes, the manual section linked gives several examples of using one or more “-map” commands, each followed by different args to
select specific streams to be output ( -map 0, -map 0:1, -map 0:v, -map 0:a:2, etc).