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

2020-09-28 Thread Gyan Doshi



On 28-09-2020 06:01 pm, Stub via ffmpeg-user wrote:

On Monday, September 28, 2020, 09:35:28 AM GMT+9, Carl Zwanzig  
wrote:

On 9/27/2020 5:27 PM, James Darnley wrote:

Please do not top post.

And the formatting makes the ffprobe output difficult to read. If you (the
OP) is posting in HTML, turn that off and stick to plain text.

See https://ffmpeg.org/mailing-list-faq.html


If I understand the question-
there is a container holding multiple input streams and you want those
streams to go into a stream-capable output container. Yes?

Or is this question of copying metadata/stream names to the output container?

Examples of commands you've tried along with the full output would clarify
things.

-

Thank you for the quick responses.

Let me give a much simplified example of what I hoped to achieve. I have two 
movie files that each contain a video stream and an audio stream: movie1.mp4 
and movie2.mp4. I merge both into a single MKV container with ffmpeg:

ffmpeg -i movie1.mp4 -i movie2.mp4 -map 0:v -map 0:a -map 1:v -map 1:a -c copy 
combined.mkv

At the end of the ffmpeg monitor output I get the following about the contents of the 
"combined.mkv":

Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
   Stream #1:0 -> #0:2 (copy)
   Stream #1:1 -> #0:3 (copy)


Now, my question is how to achieve the following mapping:

Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
   Stream #1:0 -> #1:0 (copy)
   Stream #1:1 -> #1:1 (copy)


It seems that the "-map" flag always adds a stream as a "#0:n". I would like to have "#1:0" and 
"#1:1" in the "combined.mkv" container. Is that possible?


No. The first numeral in #0:n for a output stream refers to the output 
file index. Since you're sending streams to the same output file, they 
will have the same output file index


If you want  to record for posterity which file a stream originated 
from, add metadata tags per stream e.g.


  -metadata:s:2 title="from input 1"

This applies the metadata to the third output stream.

Gyan

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-28 Thread Moritz Barsnick
On Mon, Sep 28, 2020 at 12:31:49 +, Stub via ffmpeg-user wrote:
> Let me give a much simplified example of what I hoped to achieve. I have two 
> movie files that each contain a video stream and an audio stream: movie1.mp4 
> and movie2.mp4. I merge both into a single MKV container with ffmpeg:
>
> ffmpeg -i movie1.mp4 -i movie2.mp4 -map 0:v -map 0:a -map 1:v -map 1:a -c 
> copy combined.mkv
>
> At the end of the ffmpeg monitor output I get the following about the 
> contents of the "combined.mkv":
>
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
>   Stream #0:1 -> #0:1 (copy)
>   Stream #1:0 -> #0:2 (copy)
>   Stream #1:1 -> #0:3 (copy)

In ffmpeg's stream mapping notation, the digits before the colon count
the separate inputs (files or URIs) and outputs.

> Now, my question is how to achieve the following mapping:
>
> Stream mapping:
>   Stream #0:0 -> #0:0 (copy)
>   Stream #0:1 -> #0:1 (copy)
>   Stream #1:0 -> #1:0 (copy)
>   Stream #1:1 -> #1:1 (copy)

You can only achieve this by creating two output files, not a combined
file.

$ ffmpeg -i movie1.mp4 -i movie2.mp4 -map 0:v -map 0:a -c copy output1.mkv -map 
1:v -map 1:a -c copy output2.mkv

> It seems that the "-map" flag always adds a stream as a "#0:n". I
> would like to have "#1:0" and "#1:1" in the "combined.mkv" container.
> Is that possible?

No. And to reiterate others' questions: What for? A single input file
will always present itself to ffmpeg as "Input #0". If you want an
additional "Input #1", give ffmpeg a second input file/URI.

Again: If you map to a *combined* file, all output streams of the
conversion process *need* to be "#0:N".

Cheers,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-28 Thread Stub via ffmpeg-user
On Monday, September 28, 2020, 09:35:28 AM GMT+9, Carl Zwanzig  
wrote:

On 9/27/2020 5:27 PM, James Darnley wrote:
> Please do not top post. 

And the formatting makes the ffprobe output difficult to read. If you (the 
OP) is posting in HTML, turn that off and stick to plain text.

See https://ffmpeg.org/mailing-list-faq.html


If I understand the question-
there is a container holding multiple input streams and you want those 
streams to go into a stream-capable output container. Yes?

Or is this question of copying metadata/stream names to the output container?

Examples of commands you've tried along with the full output would clarify 
things.

-

Thank you for the quick responses.

Let me give a much simplified example of what I hoped to achieve. I have two 
movie files that each contain a video stream and an audio stream: movie1.mp4 
and movie2.mp4. I merge both into a single MKV container with ffmpeg:

ffmpeg -i movie1.mp4 -i movie2.mp4 -map 0:v -map 0:a -map 1:v -map 1:a -c copy 
combined.mkv

At the end of the ffmpeg monitor output I get the following about the contents 
of the "combined.mkv":

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (copy)
  Stream #1:1 -> #0:3 (copy)


Now, my question is how to achieve the following mapping:

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #1:0 (copy)
  Stream #1:1 -> #1:1 (copy)


It seems that the "-map" flag always adds a stream as a "#0:n". I would like to 
have "#1:0" and "#1:1" in the "combined.mkv" container. Is that possible?

Thank you.
-S.R.
 
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-27 Thread Carl Zwanzig

On 9/27/2020 5:27 PM, James Darnley wrote:
Please do not top post. 


And the formatting makes the ffprobe output difficult to read. If you (the 
OP) is posting in HTML, turn that off and stick to plain text.


See https://ffmpeg.org/mailing-list-faq.html


If I understand the question-
there is a container holding multiple input streams and you want those 
streams to go into a stream-capable output container. Yes?


Or is this question of copying metadata/stream names to the output container?

Examples of commands you've tried along with the full output would clarify 
things.


z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-27 Thread James Darnley
On 28/09/2020, Stub via ffmpeg-user  wrote:
>  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: isommp42MAJOR_BRAND : mp42MINOR_VERSION   :
> 0ENCODER : Lavf58.29.100  Duration: 00:23:21.60, start:
> 0.00, bitrate: 580 kb/sStream #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.6Stream #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.6Stream
> #0:2: Audio: aac (LC), 32000 Hz, mono, fltp (default)Metadata:
> HANDLER_NAME: AAC audio  DURATION: 00:23:21.56800
> Stream #0:3: Subtitle: webvttMetadata:  DURATION:
> 00:23:20.79000
>
>
> 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?

Please do not top post.  Your reply should be placed below the text
you are quoting.

I don't quite understand.

Are you trying to get the string "Input #0" into the output file?
Perhaps you want to look at the -metadata option and give the streams
you map some label of your choosing.  Just be aware that not all
formats support arbitrary metadata.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-27 Thread Jim DeLaHunt

On 2020-09-27 17:14, Stub via ffmpeg-user wrote:


…When I then do a 'ffprobe' of the resulting output file, I get for example 
something like this:
[… ffprobe output left out for brevity …]

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.


A good next step on this list will be to  give a specific example of how 
you are using _ffmpeg_ on your input files, with a specific command line 
and console output, and tell us specifically what about that example is 
different than what you want.


What you showed was the result of running _ffprobe_ on the output file 
which did not turn out the way you wanted. That _ffprobe_ run does not 
let you tell us much.



___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-27 Thread Stub via ffmpeg-user
 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.00, 
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.6    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.6    Stream #0:2: Audio: aac 
(LC), 32000 Hz, mono, fltp (default)    Metadata:      HANDLER_NAME    : AAC 
audio      DURATION        : 00:23:21.56800    Stream #0:3: Subtitle: 
webvtt    Metadata:      DURATION        : 00:23:20.79000


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 
 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: 
.

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@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".  
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-27 Thread Jim DeLaHunt

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: 
.


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@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

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

2020-09-27 Thread Stub via ffmpeg-user
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.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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