streamid does not work with newaudio, newvideo, newsubtitle
fixes issue2465. The problem is that the ffmpeg (the app) -streamid option did not work with -newaudio/-newvideo/-newsubtitle. The cause was a conflict between the feature where streamid values were reset to default for each output filename, and the implementation of -new*, which requires that the -new* option be specified after the target filename. My patch changes the ffmpeg behavior so that user-specified streamid values apply to all the following output files on the command line (rather than just the next output filename.) Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net> (cherry picked from commit 20ac9de3df9b129a4a312d626fed0e2bbb760200)
This commit is contained in:
		
							parent
							
								
									73fd7c1f0a
								
							
						
					
					
						commit
						ba0dd9e8ff
					
				@ -712,8 +712,10 @@ Set the maximum demux-decode delay.
 | 
				
			|||||||
@item -muxpreload @var{seconds}
 | 
					@item -muxpreload @var{seconds}
 | 
				
			||||||
Set the initial demux-decode delay.
 | 
					Set the initial demux-decode delay.
 | 
				
			||||||
@item -streamid @var{output-stream-index}:@var{new-value}
 | 
					@item -streamid @var{output-stream-index}:@var{new-value}
 | 
				
			||||||
Assign a new value to a stream's stream-id field in the next output file.
 | 
					Assign a new stream-id value to an output stream. This option should be
 | 
				
			||||||
All stream-id fields are reset to default for each output file.
 | 
					specified prior to the output filename to which it applies.
 | 
				
			||||||
 | 
					For the situation where multiple output files exist, a streamid
 | 
				
			||||||
 | 
					may be reassigned to a different value.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For example, to set the stream 0 PID to 33 and the stream 1 PID to 36 for
 | 
					For example, to set the stream 0 PID to 33 and the stream 1 PID to 36 for
 | 
				
			||||||
an output mpegts file:
 | 
					an output mpegts file:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								ffmpeg.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								ffmpeg.c
									
									
									
									
									
								
							@ -3816,7 +3816,6 @@ static void opt_output_file(const char *filename)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    set_context_opts(oc, avformat_opts, AV_OPT_FLAG_ENCODING_PARAM, NULL);
 | 
					    set_context_opts(oc, avformat_opts, AV_OPT_FLAG_ENCODING_PARAM, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nb_streamid_map = 0;
 | 
					 | 
				
			||||||
    av_freep(&forced_key_frames);
 | 
					    av_freep(&forced_key_frames);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user