I am using the camera package to record video in my app, via the
CameraController.startVideoRecording() method.
I would like to display the increasing value for the length of the video while recording.
My initial thought was to create a timer. But, I wonder if there is a better solution that is more integrated with the video recording itself, such a a callback/event that I can listen to for the current length of the video or some property related to the video that I can interrogate?
Any suggestions/recommendations or examples are appreciated.
Thanks
Related
I have created the video player using chewie controller and I need to get the total watch or played time of video for the particular user and I need to update it in database. how can I achieve this?
Use value and position in the video controller .
what I'd like to do:
I would like to record a video using Flutter's CameraController that has the same duration as an animated webp. On top of my screen, the animated webp is playing and below there is a CameraPreview() widget that records whatever my camera catches. This recorded video's duration should be exact as long as the animated webp's duration.
what I've tried so far:
Since Giphy offers not only a webp-version, but also an mp4-version, I downloaded the mp4 version and used ffmpeg to get the duration of that file.
I then used a timer and called VideoController.stopVideoRecording() after this duration automatically after VideoController.startVideoRecording().
what I'd expect to happen:
I'd expect this recorded video to be as long as the animated webp. Unfortunately, it's not.
So, my question is:
Do you guys have any idea how I could manage to record a video with same duration as an animated webp?
Thanks :)
Ok, sort of found what the issue is: Webp (and also Gifs) in Flutter are played slower than in browsers. Dont know if that is the case for all webps and gifs, but the ones I tested are all animated faster in a desktop-browser than in flutter. So, animation time of those webp is not the same as playing-time of the respective .mp4 file.
I use those mp4-versions now instead and that does the job.
When using Vimeo's unity sdk there is a parameter that defines the resolution of the video currently playing.
To change that, I need to set the desired resolution and call the method LoadVideo() on Vimeo sdk to take effect.
But, when I call load video just for the sake of changing the Resolution,the video starts playing from the beginning and not from the current time.
I want to repeat 1s video to 10 seconds. I used AVMutableComposition and attached the code below.
When I try with a video recorded by apple default camera app, it works as well.
But I need to have specified video so that I made a customized camera. I made 1s video(frame rate : 5fps, H264 codec).
I am getting black frames with this video.
I am not sure whats the problem. Please help.
I solved it by myself so I did not translate target view's coordinator when apply transform to video track so that it doesn't show up properly.
I am trying to see if it is possible to record a video from the iPhone's camera and write this to a file. I then want the video to start playing on the screen a set time after. This all needs to happen continuously. For example, I want the video on the screen to always be 20 seconds behind what the camera is recording.
Some background:
I have a friend who is a coach and would like for his players to be able to see their last play. This could be accomplished by a feed going to a TV from an iPad always 20 seconds behind what is recorded. This needs to continually run until practice is over. (I would connect the iPad to the TV either with a cable or AirPlay to an Apple TV). The video would never need to be saved and should just be discarded after playing.
Is this even possible with the APIs AVFoundation offers? Will the iPhone let you write to a file and read from a file at the same time to accomplish this? Any other better way to accomplish this?
Thanks for your time.
Instead of writing to a file, how about saving your frames in a circular buffer big enough to hold X seconds of video?
The way I would start to do this would be to look at what's provided in AVCaptureVideoDataOutput and its delegate methods (where you can get the frame data from).