Closed naffan2014 closed 3 years ago
i do jave format code code as below:
public List<String> formatVideo(Long taskId, List<String> videoPathList, DirType targetDir, String targetFormat) throws IllegalArgumentException,EncoderException { List<String> formattedList = new ArrayList<>(); String targetPath = fileInfra.makeDirPath(taskId, targetDir); AudioAttributes audio = new AudioAttributes(); audio.setCodec(DIRECT_STREAM_COPY); VideoAttributes video = new VideoAttributes(); video.setCodec(DIRECT_STREAM_COPY); EncodingAttributes attrs = new EncodingAttributes(); attrs.setAudioAttributes(audio); attrs.setVideoAttributes(video); for (String o: videoPathList) { String[] keySplit = o.split("/"); String fileName = keySplit[keySplit.length - 1]; String targetName = fileName.substring(0,fileName.lastIndexOf(".") + 1) + targetFormat; File target = new File(targetPath, targetName); if (target.exists()) { target.delete(); } Encoder encoder = new Encoder(); try { encoder.encode(new MultimediaObject( new File(o)), target, attrs); }catch (Exception e){ throw e; } formattedList.add(targetPath + targetName); } return formattedList; }
it occurs error code is 137 . what this code mean?
Perhaps this? https://stackoverflow.com/questions/19548027/ffmpeg-closes-with-return-code-137
thank u
i do jave format code code as below:
it occurs error code is 137 . what this code mean?