minsikzzang / ifvideopicker Goto Github PK
View Code? Open in Web Editor NEWLibrary iOS video picker using AVCapturexxxx libraries
License: MIT License
Library iOS video picker using AVCapturexxxx libraries
License: MIT License
IFVideoEncoder *ve =
[IFVideoEncoder createH264VideoWithDimensions:dimensions
bitRate:500000
maxKeyFrame:200];
[videoPicker_ startCaptureWithEncoder:ve
audio:ae
captureBlock:^(NSArray *frames, NSData *buffer) {
// Captured MP4 frames are coming
NSLog(@"buffer: %d bytes, with %d frames", [buffer length], [frames count]);
} metaHeaderBlock:^(MP4Reader *reader) {}
// MP4 moov header coming
} failureBlock:^(NSError *error) {
// Failed to capture video / audio chunk
}];
In the captureBlock,buffer is mp4, now I want to convert mp4 to flv, so I can stream it to a rtmp server with rtmp-wrapper's help .
How can I do that? Thanks.
DEBUG2: 0030: 73 08 eb 9f s...
2014-05-13 17:01:54.092 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.101 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.112 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.116 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.123 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.144 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.146 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.152 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.172 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.173 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.230 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.260 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.290 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.294 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.296 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.298 testVideoPicker[983:6007] *************** Failed to encode given sample buffer
2014-05-13 17:01:54.367 testVideoPicker[983:6007] Failed to append sample buffer: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x173471e0 {NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x17226c00 "The operation couldn’t be completed. (OSStatus error -12763.)", NSLocalizedFailureReason=An unknown er
Hey, I think this is an awesome project and I love what it does and how beautifully written it is! One small problem I have found in testing is that there is a memory leak. While it can be quite small leak at the rate (30 FPS and 44.1 Hz) that one could be capturing the audio and video frames it can become quite a big leak over time causing to a crash within the apps if videos are long enough. While i am no expert on the matter of memory management as I came in to IOS development after ARC was created it seems that the issues for the leaks is retaining the body object properties in both the FLVVideoTag and the FLVAudioTag objects. I changed
@Property (atomic, retain) NSData *body;
to
@Property (nonatomic) NSData *body;
In both those files. Once the change was in place the memory stayed at around the 10MB mark.
Thanks for your time.
-BrightScorpion
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.