|  | @@ -304,9 +304,9 @@ public class FFmpegUtil {
 | 
	
		
			
				|  |  |      public static String[] mediaMux(String videoFile, String audioFile, boolean copy, String muxFile) {
 | 
	
		
			
				|  |  |          String mediaMuxCmd;
 | 
	
		
			
				|  |  |          if (copy) {
 | 
	
		
			
				|  |  | -            mediaMuxCmd = "ffmpeg -i %s -i %s -codec copy -y %s";
 | 
	
		
			
				|  |  | +            mediaMuxCmd = "ffmpeg -i %s -i %s -codec copy -shortest -y %s";
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -            mediaMuxCmd = "ffmpeg -i %s -i %s -y %s";
 | 
	
		
			
				|  |  | +            mediaMuxCmd = "ffmpeg -i %s -i %s -shortest -y %s";
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          mediaMuxCmd = String.format(Locale.getDefault(), mediaMuxCmd, videoFile, audioFile, muxFile);
 | 
	
		
			
				|  |  |          return mediaMuxCmd.split(" ");
 | 
	
	
		
			
				|  | @@ -324,9 +324,9 @@ public class FFmpegUtil {
 | 
	
		
			
				|  |  |      public static String[] mediaMux2(String videoFile, String audioFile, boolean copy, String muxFile, float videoDelay) {
 | 
	
		
			
				|  |  |          String mediaMuxCmd;
 | 
	
		
			
				|  |  |          if (copy) {
 | 
	
		
			
				|  |  | -            mediaMuxCmd = "ffmpeg -itsoffset %f -i %s -itsoffset 0 -i %s -codec copy -y %s";
 | 
	
		
			
				|  |  | +            mediaMuxCmd = "ffmpeg -itsoffset %f -i %s -itsoffset 0 -i %s -codec copy -shortest -y %s";
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  | -            mediaMuxCmd = "ffmpeg -itsoffset %f -i %s -itsoffset 0 -i %s -y %s";
 | 
	
		
			
				|  |  | +            mediaMuxCmd = "ffmpeg -itsoffset %f -i %s -itsoffset 0 -i %s -shortest -y %s";
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          mediaMuxCmd = String.format(Locale.getDefault(), mediaMuxCmd, videoDelay, videoFile, audioFile, muxFile);
 | 
	
		
			
				|  |  |          return mediaMuxCmd.split(" ");
 |