I am creating an iOS application that requires re-encoding and cropping video in the background.
I can’t use iOS libraries (AVFoundation), since they rely on the GPU, and no application can access the GPU if it is set.
Due to this problem, I switched to FFMpeg and compiled it (along with libx264) and integrated it into my iOS application.
To summarize what I need:
- Trim video in the first 10 seconds
- zoom out video
After a couple of weeks - and quite often I hit my head against the wall - I managed:
- split the video container into streams (demuxing)
- copy the audio stream to the output stream (without decoding or encoding)
- , , ( h264, , h264)
ffmpeg , :
ffmpeg -i input.MOV -ss 0 -t 10 -vf scale=320:240 -c:v libx264 -preset ultrafast -c:a copy output.mkv
, ? , /, FPS , , , .
- - , 10 ( ) .
AV?