Comments (7)
Because the actual encoding is an async operation, we cannot throw the error here to the caller.
If we want to report this error "immediately" after it occurs we need an async signal, for example, a "recordingFailedHandler".
from videoio.
I think the current implementation is perfectly fine according to the documentation you referred.
There are two kinds of time movie time
and sample time (source time)
.
a sample you append with timestamp T plays at movie time (T-startTime)
If the session begins at sample time T, then simple with time T begins at "movie time" (T - startTime) => (T - T) => 0
Anyway, can you provide more detail about the issue you encountered?
Is there an error reported when you call stopRecording(completion:)
?
Is there something like "Video inputs: not ready for media data" in the console?
What about the recording duration reported in the durationChangedHandler
?
from videoio.
If the session begins at sample time T, then simple with time T begins at "movie time"
Thanks. That makes sense. I had almost come to this conclusion after some more digging last night.
This was a failure in the field, so I have no console data to hand unfortunately. I logged a failure to stop recording 2022-02-02 20:45:24.842 [Error] [main] [704] > [Recording] Failed to stop recording
, but unfortunately at this point I was not including the error from stopRecording(completion:)
(I am now).
The resulting track when run through moov validation reports an error in the duration. The Edits duration was the time actually before the stop, and the difference matches exactly with the missing frames (about 25 mins).
MP4/QuickTime Validator | | Warning | [897] tkhd incorrect duration. TrackID = 2. Edits duration = 183471994, TrackHeader duration = 183473548. Atom/Box path:moov-trak[2]-tkhd (Offset: 0x000000000019C11C)
from videoio.
It seems to be the case that the writer failed to append more frames duration recording:
VideoIO/Sources/VideoIO/MultitrackMovieRecorder.swift
Lines 215 to 228 in 50310e6
This could be caused by:
- Appending a frame that has earlier/equal timestamp than a previously appended frame.
- There's no enough disk space.
- ...
from videoio.
There's no enough disk space.
I think we may be running into this. Of course this just returns here rather than throwing, so unless we check the error state we don't know what has happened until we attempt to finalize the recording.
from videoio.
I'll take a closer look at this later this weekend.
from videoio.
Amazing. Thank you.
from videoio.
Related Issues (20)
- Domain: AVFoundationErrorDomain Code: -11819 NSLocalizedDescription: Cannot Complete Action
- Synchronized Video, Depth, and Audio Data HOT 3
- Segment Duration Zero HOT 1
- CIImage from MTIImage
- No output video buffers from AVPlayer using PlayerVideoOutput HOT 2
- Wrong audioTracks being added in audioOutput inside AssetExportSession HOT 1
- Unable to set Frame rate to 60fps for 'vide'/'x420' 3840x2160 HOT 4
- Toggle front / back camera during capture session? HOT 2
- Focus hunting on .builtInWideAngleCamera on iPhone 12 pro HOT 2
- How to switch microphone inputs to stereo? HOT 2
- Each time video recording is initiated, there is an error `Video inputs: not ready for media data` HOT 10
- Cannot Encode Media on AssetExportSession HOT 3
- Video overlay on top of live feed HOT 30
- Never ready for audio HOT 4
- use AVAssetWriterInputPixelBufferAdaptor to fix errorCode -11800 ? HOT 5
- Timer Label Overlay HOT 10
- How to use multiple video assets in this code example.
- Xcode 15 Beta compile issues (macOS)
- Video artifacts and reduced video size after export HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videoio.