rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

How to get recording video size? #387

Open kuldeep13990 opened 7 years ago

kuldeep13990 commented 7 years ago

I want to check whether space is available or not in device. so can you guys please help me about How can i get Currently recording video size ?

so i can notify user that you don't have enough space in your device.

Thanks in Advance.

bestiosdeveloper commented 7 years ago

Try to use this func getRecordedDuration() -> Float64 { guard let session = self.recorder?.session else { return 0.0 } let currentTime = session.duration return CMTimeGetSeconds(currentTime) }

kuldeep13990 commented 7 years ago

@kumarpramod017 , I don't wat to get video recording duration nut i want the live video recording size.

suppose record duration reach to 1 min than video size will be 20 mb, if video duration reach to 2 min than video size will be 50 mb.

actually i want to check recording video size.

wholeinsoul commented 7 years ago

size = bit_rate * current_duration