Giter VIP home page Giter VIP logo

ofxiosvideowriter's Introduction

ofxiOSVideoWriter is a openFrameworks addon for screen recording on iOS.

image

The iosScreenRecordExample demostrates how graphics and video can be recorded into a h264 video in real-time. Sound from the source video is also recored to the output video, although ofxiOSVideoWriter only supports the recording of one audio source at the one time (for now).

AssetsLibrary.framework - needs to be added to xcode project libraries.

This addon was developed during the Foxtel All Stars iOS project, which allows for live video compositing and recording in OpenGL using openFrameworks. For a better understanding of how this addon can be used, feel free to checkout the app. https://itunes.apple.com/au/app/foxtel-all-stars/id814838234?mt=8

ofxiosvideowriter's People

Contributors

admsyn avatar julapy avatar trentbrooks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ofxiosvideowriter's Issues

16 pixel alignment ?

I think (not 100% sure -- just going on what I saw just now) that the widths of the video writer need to be aligned on 16 pixels or you get some weird sheering effect. It might be nice to add a few convenience functions and a getWidth() function to make it easier.

Black Frames in beginning of saved videos

Like the title says, I get about a second of black frames at the beginning of every video. There is some chatter about this elsewhere here, here, here

I don't remember noticing this issue until audio recording was added in. Perhaps it has something to do with the audio buffers being added before the video is ready, as one of the threads above suggests.

It may be a separate issue, but also possibly related. I've noticed that the recorded framerate is a bit variable. It usually comes out to be something like 28.2 or 28.76, but never an even 29.97 (or 30). Wonder if you've noticed this as well?

Crashes on 2nd recording

The addon works great for the first recording, but if I try to use it more than once after launching the app it crashes with :

'NSInvalidArgumentException', reason: '*** -[AVAssetWriter initWithURL:fileType:error:] invalid parameter not satisfying: outputURL != ((void *)0)'

FWIW I added the saveMovieToCameraRoll method call finishRecording() to ofxiOSVideoWriter.mm. So now it looks like

void ofxiOSVideoWriter::finishRecording() {
    if((videoWriter == nil) ||
       [videoWriter isWriting] == NO) {
        return;
    }

    [videoWriter finishRecording];
    [videoWriter saveMovieToCameraRoll];

    killTextureCache();
    cout<<"Finishing"<<endl;
}

And in my ofApp I'm calling the videoWriter like so in touchDown:

     save = !save;
      if(save){
          videoWriter.startRecording();
      } else {
          videoWriter.finishRecording();
      }

I logged the fileURL being passed into the startRecording method and found that on the second go round the url=null. I traced this to saveMovieToCameraRoll commented out line ~586 which was setting self.outputUrl = nil;. Once I did that is seems to save for multiple videos :D

cannot open with xcode

I have downloaded the project to the local,but,Project error,cannot run,what should I do?I would like to know,how this project use in iOS develop,3Q

Mic recording and video recording seem to be out of sync

The audio input seems to cut off after the video input resulting in my video having the last frame repeated while still playing the extra audio recording at the end.

I'm using iOS 11 on an iPhone SE, running some semi-intensive OpenCV calculations.

dropping frames

I am not 100% positive about this -- more of an intuition -- but I think I'm seeing some dropped frames using this addon -- specifically, if I draw the frame number into the video, I see that some frames are duplicated while others are skipped --- ie, you'll see 28,29,31,31,32....

(the issue sounds similar to BradLarson/GPUImage#1501, which has similarish issues about the black frames at the start BradLarson/GPUImage#52)

haven't dug into this too much, maybe useful?
http://tuohuang.info/gpuimage-video-merge-fix-movie-writer

file not found

ofMain.h ofxiOSVideoPlayer.h ofxiOSSoundPlayer.h ofxiOSEAGLView.h not found

[warning] ofGLProgrammableRenderer: draw(): texture is not allocated

Hi,
I'm trying to use this addon with the latest version of ios openframeworks (for iPad). When I toggle the record button, it shows "Recording" on the top left corner, but the video is stuck in the first frame, and the music stops, and the current frame number stays at 000000. In the console, it shows a warning:
[warning] ofGLProgrammableRenderer: draw(): texture is not allocated

When I toggle the recording button again, the music and video starts to run again. Is this expected behavior? Where can I find the recorded video?

Thanks in advance!

iOS : How to record from Microphone

Hi,

I am developing the app which required to video recording. I looked into iosScreenRecordExample but it record from video player.
But I need to record audio from microphone.

Please help me.

Possible to change bitrate?

Like the title says, wondering if it's possible to record higher bitrate videos.

I saw in the video settings there is
AVVideoAverageBitRateKey: [NSNumber numberWithInt:bitrate]

have you tried it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.