You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the recording + resampling feature, it appears as though the metadata for the audio (and possibly the audio itself) is incorrect. This results in a recording that appears in the iOS camera roll as significantly longer than it actually is e.g. a recording of 1-2 minutes is showing as 6hr48m. It is not actually that long, but it's what the metadata says. The audio is also missing (or at least is corrupt).
This is only an issue in the recorded file when the audio bitrate is set to 44.1 kHz. It's fine when set to 48 kHz. I have a hunch the issue might only occur when the audio is being resampled to something other than the device mic default of 48 kHz, but haven't tested that theory.
To Reproduce
Start recording on a stream startRecording(self)
Set the sample rate to 44100 on the stream's audio settings
Stream for a short period of time (e.g. 30 seconds)
Stop the live stream and the recording
Handle func recorder(_ recorder: IORecorder, finishWriting writer: AVAssetWriter) callback by writing the recording to the device camera roll (using the PHPhotoLibrary.shared().performChanges... code from the documentation example
Look in camera roll, and see a recording with incorrect metadata (significantly longer video duration than expected, and no working audio)
Expected behavior
Would expect the metadata for duration to match what was actually recorded, and for the audio to have been recorded as well.
Currently the audio is not recorded, the file metadata (specifically duration) is incorrect.
Version
1.7.2
Smartphone info.
iPad Pro (11-inch) (2nd generation) running iOS 17.2
iPhone 15 Pro running iOS 17.3.
Additional context
Using the built-in mic on both devices mentioned above, and it's probably relevant to note that we're using the public func append(_ sampleBuffer: CMSampleBuffer) method for sending both audio and video sample buffers to the RTMP(s) stream, and not the attachCamera or attachAudio methods.
Happy to provide additional information, testing, etc. Just let me know what's required. Thanks :)
Screenshots
The recording was probably 1-2 minutes in actuality, yet note the metadata saying it was almost 7 hours.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When using the recording + resampling feature, it appears as though the metadata for the audio (and possibly the audio itself) is incorrect. This results in a recording that appears in the iOS camera roll as significantly longer than it actually is e.g. a recording of 1-2 minutes is showing as 6hr48m. It is not actually that long, but it's what the metadata says. The audio is also missing (or at least is corrupt).
This is only an issue in the recorded file when the audio bitrate is set to 44.1 kHz. It's fine when set to 48 kHz. I have a hunch the issue might only occur when the audio is being resampled to something other than the device mic default of 48 kHz, but haven't tested that theory.
To Reproduce
startRecording(self)
44100
on the stream's audio settingsfunc recorder(_ recorder: IORecorder, finishWriting writer: AVAssetWriter)
callback by writing the recording to the device camera roll (using thePHPhotoLibrary.shared().performChanges...
code from the documentation exampleExpected behavior
Would expect the metadata for duration to match what was actually recorded, and for the audio to have been recorded as well.
Currently the audio is not recorded, the file metadata (specifically duration) is incorrect.
Version
1.7.2
Smartphone info.
Additional context
Using the built-in mic on both devices mentioned above, and it's probably relevant to note that we're using the
public func append(_ sampleBuffer: CMSampleBuffer)
method for sending both audio and video sample buffers to the RTMP(s) stream, and not theattachCamera
orattachAudio
methods.Happy to provide additional information, testing, etc. Just let me know what's required. Thanks :)
Screenshots
The recording was probably 1-2 minutes in actuality, yet note the metadata saying it was almost 7 hours.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: