Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the first input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the first input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the first input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see

deleted 1 character in body
Source Link
llogan
  • 60.6k
  • 17
  • 130
  • 152

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the secondfirst input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the second input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the first input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see

Source Link
llogan
  • 60.6k
  • 17
  • 130
  • 152

The problem

The issue is your usage of -map. You're telling ffmpeg to map steams 0:2 and 0:1 which in this input correspond to the aac audio stream and the mjpeg video stream.

Solutions

Use the default stream selection

You can omit the -map options and rely on the default stream selection behavior:

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:

  • video – the stream with the highest resolution
  • audio – the stream with the most channels
  • subtitles – the first subtitle stream

In the case where several streams of the same type rate equally, the stream with the lowest index is chosen.

Use proper mapping

If the default stream selection is not acceptable for you then you'll have to use the correct -map options for each input.

A better method than explicitly selecting a particular stream by index number is to add a stream specifier.

Examples

  1. Choose all video streams and all audio streams from the first (and only) input:

     ffmpeg -i input0 -map 0:v -map 0:a … output
    
  • Note that ffmpeg starts counting from 0.
  1. Choose the first video stream from the second input and the third audio stream from the second input:

     ffmpeg -i input0 -i input1 -map 1:v:0 -map 0:a:2 … output
    
  2. Use a negative mapping to choose all streams from input 0 except any subtitle streams:

     ffmpeg -i input0 -map 0 -map -0:s … output
    

Also see