Does any one know how cut portion from video stream based on start and end time ? Using ffmpeg library in iOS.
Asked
Active
Viewed 592 times
0
-
Why must ffmpeg, I think you can use AVFoundation. If you must use ffmpeg, maybe you can check [this question](http://stackoverflow.com/questions/20856803/how-to-cut-video-with-ffmpeg-c-api). – justin Nov 21 '16 at 03:11
1 Answers
0
if you dont mind doing it with the application rather than the library:
ffmpeg -i video.mp4 -ss hh:mm:ss -to hh:mm:ss -c copy cut.mp4
eg
ffmpeg -i video.mp4 -ss 00:01:00 -to 00:02:00 -c copy cut.mp4
-c copy tells it to remux rather than transcode but it depends on the codecs you are using whether or not this will work
see also https://trac.ffmpeg.org/wiki/Seeking

user3770489
- 186
- 4