update shell of building FFmpeg

pull/166/head
xufulong 4 years ago
parent 2b35671931
commit 65e10d3ff3
  1. 14
      app/src/main/java/com/frank/ffmpeg/activity/AudioHandleActivity.java
  2. 4
      app/src/main/java/com/frank/ffmpeg/util/FileUtil.java
  3. 2
      app/src/main/res/values-en/strings.xml
  4. 2
      app/src/main/res/values/strings.xml
  5. 4
      shell/ffmpeg/build_ffmpeg_mp3.sh
  6. 4
      shell/ffmpeg/build_ffmpeg_one.sh
  7. 4
      shell/ffmpeg/build_ffmpeg_x264.sh

@ -163,12 +163,6 @@ public class AudioHandleActivity extends BaseActivity {
if (!FileUtil.checkFileExist(appendFile)) {
return;
}
// List<String> fileList = new ArrayList<>();
// fileList.add(srcFile);
// fileList.add(appendFile);
// String concatFile = PATH + File.separator + "concat.mp3";
// commandLine = FFmpegUtil.concatAudio(fileList, concatFile);
// break;
concatAudio(srcFile);
return;
case R.id.btn_mix://mix audio
@ -189,12 +183,12 @@ public class AudioHandleActivity extends BaseActivity {
new Thread(() -> new AudioPlayer().playAudio(srcFile)).start();
return;
case R.id.btn_audio_encode://audio encode
String pcmFile = PATH + File.separator + "concat.pcm";
String wavFile = PATH + File.separator + "new.wav";
String pcmFile = PATH + File.separator + "raw.pcm";
String wavFile = PATH + File.separator + "convert.mp3";
//sample rate, normal is 8000/16000/44100
int sampleRate = 8000;
int sampleRate = 44100;
//channel num of pcm
int channel = 1;
int channel = 2;
commandLine = FFmpegUtil.encodeAudio(pcmFile, wavFile, sampleRate, channel);
break;
case R.id.btn_pcm_concat://concat PCM streams

@ -25,6 +25,7 @@ public class FileUtil {
private final static String TYPE_WAV = "wav";
private final static String TYPE_OGG = "ogg";
private final static String TYPE_AC3 = "ac3";
private final static String TYPE_RAW = "pcm";
public final static String TYPE_MP4 = "mp4";
private final static String TYPE_MKV = "mkv";
@ -119,7 +120,8 @@ public class FileUtil {
|| path.endsWith(TYPE_WMA)
|| path.endsWith(TYPE_WAV)
|| path.endsWith(TYPE_OGG)
|| path.endsWith(TYPE_AC3);
|| path.endsWith(TYPE_AC3)
|| path.endsWith(TYPE_RAW);
}
public static boolean isVideo(String path) {

@ -6,7 +6,7 @@
<string name="audio_mix">Audio mix</string>
<string name="audio_play">AudioTrack play</string>
<string name="audio_opensl">OpenSL play</string>
<string name="audio_encode">Audio encode</string>
<string name="audio_encode">PCM encode</string>
<string name="pcm_concat">PCM concat</string>
<string name="audio_speed">Audio speed</string>
<string name="audio_effect">Audio effect</string>

@ -6,7 +6,7 @@
<string name="audio_mix">音频混合</string>
<string name="audio_play">音频解码AudioTrack播放</string>
<string name="audio_opensl">音频解码OpenSL播放</string>
<string name="audio_encode">音频编码</string>
<string name="audio_encode">PCM编码</string>
<string name="pcm_concat">PCM合并</string>
<string name="audio_speed">音频速度</string>
<string name="audio_effect">音乐均衡器</string>

@ -94,8 +94,8 @@ mp3float,mp3,mp3_at,mp3adufloat,mp3adu,mp3on4float,mp3on4,aac_fixed,aac_at,aac_l
--disable-demuxers \
--enable-demuxer=aac,ac3,amr,amrnb,amrwb,ape,asf,asf_o,ast,avi,caf,cavsvideo,codec2,concat,data,dnxhd,flac,flv,g722,g729,\
gif,gif_pipe,h264,hevc,hls,image2,image2pipe,ingenient,jpeg_pipe,lavfi,lrc,m4v,matroska,webm,mjpeg,mov,mp4,m4a,3gp,mp3,mpeg,\
mpegts,mv,ogg,png_pipe,realtext,rm,rtp,rtsp,s16be,s16le,s24be,s24le,s32be,s32le,sdp,srt,swf,u16be,u16le,u24be,u24le,u32be,u32le,\
vc1,wav,webm_dash,manifest,xmv,f32be,f32le,f64be,f64le \
mpegts,mv,ogg,png_pipe,realtext,rm,rtp,rtsp,pcm_s16be,pcm_s16le,pcm_s32be,pcm_s32le,sdp,srt,swf,\
vc1,wav,webm_dash,manifest,xmv,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,mpegvideo,mulaw,sami,srt \
$ADDITIONAL_CONFIGURE_FLAG
make
make install

@ -99,8 +99,8 @@ pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_vidc,pcm_zork,ad
--disable-demuxers \
--enable-demuxer=aac,ac3,alaw,amr,amrnb,amrwb,ape,asf,asf_o,avi,cavsvideo,codec2,concat,dnxhd,eac3,flac,flv,\
gif,gif_pipe,h263,h264,hevc,hls,image2,image2pipe,jpeg_pipe,lrc,m4v,matroska,webm,mjpeg,mov,mp4,m4a,3gp,mp3,mpeg,\
mpegts,mv,ogg,png_pipe,realtext,rm,rtp,rtsp,s16be,s16le,s24be,s24le,s32be,s32le,sdp,srt,swf,u16be,u16le,u24be,\
u24le,u32be,u32le,vc1,wav,webm_dash,manifest,xmv,f32be,f32le,f64be,f64le,mpegvideo,mulaw,sami,srt \
mpegts,mv,ogg,png_pipe,realtext,rm,rtp,rtsp,pcm_s16be,pcm_s16le,pcm_s32be,pcm_s32le,sdp,srt,swf,\
vc1,wav,webm_dash,manifest,xmv,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,mpegvideo,mulaw,sami,srt \
$ADDITIONAL_CONFIGURE_FLAG
make
make install

@ -95,8 +95,8 @@ mp3float,mp3,mp3_at,mp3adufloat,mp3adu,mp3on4float,mp3on4,aac_fixed,aac_at,aac_l
--disable-demuxers \
--enable-demuxer=aac,ac3,amr,amrnb,amrwb,ape,asf,asf_o,ast,avi,caf,cavsvideo,codec2,concat,data,dnxhd,flac,flv,g722,g729,\
gif,gif_pipe,h264,hevc,hls,image2,image2pipe,ingenient,jpeg_pipe,lavfi,lrc,m4v,matroska,webm,mjpeg,mov,mp4,m4a,3gp,mp3,mpeg,\
mpegts,mv,ogg,png_pipe,realtext,rm,rtp,rtsp,s16be,s16le,s24be,s24le,s32be,s32le,sdp,srt,swf,u16be,u16le,u24be,u24le,u32be,u32le,\
vc1,wav,webm_dash,manifest,xmv,f32be,f32le,f64be,f64le \
mpegts,mv,ogg,png_pipe,realtext,rm,rtp,rtsp,pcm_s16be,pcm_s16le,pcm_s32be,pcm_s32le,sdp,srt,swf,\
vc1,wav,webm_dash,manifest,xmv,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,mpegvideo,mulaw,sami,srt \
$ADDITIONAL_CONFIGURE_FLAG
make
make install

Loading…
Cancel
Save