How to put limit on the size of video being recorded in iOS app? - size

In my app I need to record the video and share in my app's network. I need to put some limit on the size of the video NOT on the duration. I had a look into the documents and I found duration property on which I can put a check for duration but NOT on the size of the video. Is there any way by which it can be achieved?
I am using "MPMoviePlayerController"

Related

How to create youtube-like seekbar preview images for HTML video

For many of the videos on Youtube, if one hovers over the seekbar, a small image will pop up reflecting the frame at about that place in the video.
Is there some way to create this if using an HTML video element?
The thumbnails are actually typically contained in a separate media stream or 'track' that is created on the server side and delivered as part of the streamed video.
The client downloads this stream and when a user seeks, it displays the thumbnail image that is closest to the time the user is seeking to.
You can see a good example of how the player handles this with the dash.js reference player:
https://reference.dashif.org/dash.js/latest/samples/thumbnails/thumbnails.html
Generating the thumbnails on the fly on the browser would require the video to be delivered, decoded and a frame displayed at the point the user was seeking to which is typically too much to do in the time available to be practical for streamed videos.

Diffrent results for the image and screenshot of the image

I am using an object localizer with react native image picker to get coordinates of objects within an image. When I send the image by taking a photo with the android device the results I get are not accurate but when I take the screenshot of the photo and send it the results are almost perfect. Why might this be the case and how can I fix it?
The interesting thing is when I use the android studio emulator and send photos without taking screenshots of them the results are correct too. I have read that there are recommended image sizes for these operations however I could not find one for the object localizer.
Edit: I have found that when I take a screen shot the image resolution is equal to my devices width and height however when I take photo it uses cameras resolution.To give an example right now when I take a photo its resolution is 4032x2268 and resolution of said images screen shot is 1080x2220 which is the resolution I use for my android device.İs there any way to set cameras resolution to same as devices resolution?

Video getting ahead of audio during recording HLS

I have a problem where I'm using the Kickflip.io (see code base which is in github) base and building off of it, but after about 10+ seconds the video is getting ahead of the audio. I was able to verify that the audio is playing at the correct rate, so its definitely the video.
I've tried adjusting the sample frame rate for the video down to 10 fps, and this does nothing. Based on all the other audio out of sync with video which is out there for FFMpeg, I'm starting to wonder if there's something in the FFMpeg cocoa pod.
My guess is that the issue is in:
https://github.com/Kickflip/kickflip-ios-sdk/blob/master/Kickflip/Outputs/Muxers/HLS/KFHLSWriter.m

Display Custom Embded TimeCode instead of Standard Timecode

I have video that uses different timecode tracks when we export our QT's. Is there a way to make that timecode get displayed? It always is a 00:00:00:00 formatted number.
http://i.stack.imgur.com/3FDgF.png
HTML5 video does not report frame information, so you would have to implement this yourself based on the current time & frame rate of the current video clip. There are a lot of pitfalls here if you are supporting a lot of different frame rates, so you'll have to do your calculations correctly in either a javascript timer or the HTML5 time updated event. If you want, you could then display the timecode over the video by absolutely positioning a div over the video element.

Is it possible play multiple clips using presentMoviePlayerViewControllerAnimated?

I have a situation where I'd like to play 2 video clips back to back using an MPMoviePlayerViewController displayed using presentMoviePlayerViewControllerAnimated.
The problem is that the modal view automatically closes itself as soon as the first movie is complete.
Has anyone found a way to do this?
Three options:
You may use MPMoviePlayerController and start the playback of the 2nd (Nth) item after the previous is complete. This however will introduce a small gap between the videos cause by identification and pre buffering of the content.
You may use AVQueuePlayer; AVQueuePlayer is a subclass of AVPlayer you use to play a number of items in sequence. See its reference for more.
You may use AVComposition for at runtime composing one video out of the two (or N) you need to play back. Note, this works only on locally stored videos and not on remote (streaming or progressive download). Then use AVPlayer for the playback.
It's not possible. If the video assets are in local file system, consider AVComposition.