Android video trimming via ffmpeg

后端 未结 4 768
半阙折子戏
半阙折子戏 2020-12-16 05:46

I have downloaded video trimming code from github from this link.

It’s working perfectly for the first time, but when I try to run it for the second time the code cr

4条回答
  •  失恋的感觉
    2020-12-16 06:17

    Just make a method in your ffmpeg.c which will seems like this

    void exitmycode(){
           ffmpeg_exit(0);
    
    }
    

    ffmpeg_exit(0) method is already there in the ffmpeg.c you just have to call exitmycode(); from your main C file after the completion of video trimming.

    Now what was happening is that when you trim a video or anything else with the ffmpeg it doesn't get exit completely, so the next time you run the command it get exited, but it also don't run your trim command.Again if you run that third time, command get executed perfectly. So, what I had done is calling the ffmpeg_exit(0) manually at the end of processing done.

提交回复
热议问题