Skip to content

Commit

Permalink
修复音乐合成bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Administrator committed Oct 24, 2017
1 parent dae7972 commit 5ac3dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion joevideolib/src/main/java/VideoHandle/EpEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ public void music(String videoin, String audioin, String output, float videoVolu
return;
}
int at = TrackUtils.selectAudioTrack(mediaExtractor);
mediaExtractor.release();
String cmd;
if (at == -1) {
int vt = TrackUtils.selectVideoTrack(mediaExtractor);
Expand All @@ -287,6 +286,7 @@ public void music(String videoin, String audioin, String output, float videoVolu
} else {
cmd = "-y -i " + videoin + " -i " + audioin + " -filter_complex [0:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=" + videoVolume + "[a0];[1:a]aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=stereo,volume=" + audioVolume + "[a1];[a0][a1]amix=inputs=2:duration=first[aout] -map [aout] -ac 2 -c:v copy -map 0:v:0 " + output;
}
mediaExtractor.release();
execCmd(cmd, 0, onEditorListener);
}

Expand Down

0 comments on commit 5ac3dfc

Please sign in to comment.