OpenWatch / FFmpegWrapper

A lightweight Objective-C wrapper for some FFmpeg libav functions
Other
179 stars 54 forks source link

Hi guys! Please help me! #24

Closed alyfreym closed 11 months ago

alyfreym commented 6 years ago

I have one question, is it possible with FFMpeg to record the phone screen on iOS, if so then any clue how to do it, I would be very grateful, thank you!

L1onKing commented 6 years ago

It's not so easy to explain it from the scratch. But I'll give you the answer as abstract as your question is: 1) Setup VideoDataOutput for iOS Camera. There're plenty of tutorials about how to catch pixel data from iOS Camera 2) Create output file by FFMpeg. You can see how it needs to be done in FFmpegWrapper 3) Init FFMpeg AVFrame out of pixel data from camera. There're links in the internet how you can achieve that 4) Transform AVFrame to AVPacket 5) Write AVPacket to output file you created through FFMpeg functions