0
我在android中使用FFMPEG保存了rtsp流。當我強行停止保存視頻時,視頻文件已損壞。是否有任何命令停止保存rtsp流視頻。我正在使用ffmpeg庫。如何在Android中使用FFMPEG停止保存rtsp流媒體視頻
下面是我用節省流video-
String path=Environment.getExternalStorageDirectory().getAbsolutePath();
SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy-hhmmss");
String file_path = path + "/recording" + sdf.format(new Date()) + ".mp4";
String[] cmd = {"-y", "-i", "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov", "-c:v", "libx264", "-preset", "ultrafast", "-strict", "-2", "-s", "720*1280", "-aspect", "16:9", file_path };
execFFmpegBinary(cmd);