[FFmpeg-user] How to create "Input #1", "Input #2" etc. in addition to "Input #0"?

Stub spamrefuse at yahoo.com
Mon Sep 28 03:14:26 EEST 2020


 Dear Jin DeLaHunt,
Thank you for your detailed response.
I am quite familiar with how versatile ffmpeg is with its extensive commandline flags. I know about how to use multiple input files (-i), use mapping (-map) to select what of those inputs should go into the output file, and apply complicated filters on that before it is going into the ouput file container.

When I then do a 'ffprobe' of the resulting output file, I get for example something like this:
Input #0, matroska,webm, from 'GMT20200918-030903.mkv':  Metadata:    COMPATIBLE_BRANDS: isommp42    MAJOR_BRAND     : mp42    MINOR_VERSION   : 0    ENCODER         : Lavf58.29.100  Duration: 00:23:21.60, start: 0.000000, bitrate: 580 kb/s    Stream #0:0: Video: h264 (High), yuv420p(progressive), 640x360, 25 fps, 25 tbr, 1k tbn, 2k tbc (default)    Metadata:      HANDLER_NAME    : H.264/AVC video      ENCODER         : AVC Coding      DURATION        : 00:23:21.600000000    Stream #0:1: Video: h264 (High), yuv420p(progressive), 1024x768, 25 fps, 25 tbr, 1k tbn, 2k tbc (default)    Metadata:      HANDLER_NAME    : H.264/AVC video      ENCODER         : AVC Coding      DURATION        : 00:23:21.600000000    Stream #0:2: Audio: aac (LC), 32000 Hz, mono, fltp (default)    Metadata:      HANDLER_NAME    : AAC audio      DURATION        : 00:23:21.568000000    Stream #0:3: Subtitle: webvtt    Metadata:      DURATION        : 00:23:20.790000000


The streams that I have selected from the input files, all end up under the "Input #0" of the output file.

My question is then this:Can I also have (and/or create) "Input #1", "Input #2", etc. in the output file container?Having an "Input #0" in the file, at least suggest that the container file can contain also "Input #1", "Input #2", etc.

I have been searching the Internet for more than a week, without success.....

Any ideas?

Thank you.-SR.
    On Monday, September 28, 2020, 04:00:54 AM GMT+9, Jim DeLaHunt <list+ffmpeg-user at jdlh.com> wrote:  
 
 On 2020-09-27 02:58, Stub via ffmpeg-user wrote:
> Hello,
> Can ffmpeg put various mapped inputs into different Input streams in the same container output file?
> So far I only have created output container files, which only had "Input #0":Input #0   Stream #0:0   Stream #0:1   Stream #0:2   etc.
> Can I also add to this container another input, like:
> Input #1   Stream #1:0   Stream #1:1   Stream #1:2   etc.
> If yes, how can I go about with ffmpeg?
> Thank you.-SR.

Hello, Stub Spamrefuse (curious email addresses you have there):

Yes, FFmpeg can put various mapped inputs into different _output_ 
streams in the same container output file.

Invoke FFmpeg with multiple '-i inputfile' arguments to read multiple 
inputs. The '-map' option gives a flexible way of mapping input streams 
into output streams, perhaps via filters. See "Stream selection" in the 
documentation for a description: 
<http://ffmpeg.org/ffmpeg-all.html#Stream-selection>.

I don't follow what you mean by "into different Input streams in the 
same container output file". Streams in an output file are no longer 
input streams, are they?

But FFmpeg is a complicated tool. It may be easier if you give a 
specific example, with a specific command line and console output, and 
tell us specifically what about that example is different than what you 
want.

Best regards,
     —Jim DeLaHunt



_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".  


More information about the ffmpeg-user mailing list