Audio-Video-Synchronization | FFMpeg 处理音视频同步的过程分析 | Android library
kandi X-RAY | Audio-Video-Synchronization Summary
kandi X-RAY | Audio-Video-Synchronization Summary
Audio-Video-Synchronization
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Audio-Video-Synchronization
Audio-Video-Synchronization Key Features
Audio-Video-Synchronization Examples and Code Snippets
Community Discussions
Trending Discussions on Audio-Video-Synchronization
QUESTION
Is there any way to automatically get the audiodelay to set in the videoplayer? It is really annoying to fix it manually every time.
Exoplayer (google native player used in yt) is using the getLatency method, not part of the public SDK (https://github.com/google/ExoPlayer/blob/b5beb32618ac99adc58b537031a6f7c3dd761b9a/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java#L172) so I cant replicate this in due to xamarin not including this method in the c# wrapper
...ANSWER
Answered 2021-Jan-12 at 02:23You can't. LibVLC does not offer to detect the latency caused by an external speaker.
Your best bet is to manually sync it with SetAudioDelay
(or write a libvlc plugin with that feature).
EDIT: Being told by a core dev that latency is handled on all platforms except Android. You might want to test it. In any case, it may happen in a future libvlc android version.
QUESTION
I see many resources recommending that AudioTrack.getTimestamp()
be used on modern Android versions to calculate audio latency for audio/video sync.
For instance:
https://stackoverflow.com/a/37625791/332798
https://developer.amazon.com/docs/fire-tv/audio-video-synchronization.html#section1-1
https://groups.google.com/forum/#!topic/android-platform/PoHfyNK54ps
However, none of these explain how to use the timestamp to calculate the latency? I'm struggling to figure what to do with the timestamp's framePosition/nanoTime to come up with a latency number.
...ANSWER
Answered 2018-Apr-04 at 01:47So prior to this API, you would use AudioTrack.getPlaybackHeadPosition()
which was just an approximation. Thus, to account for latency you had to offset that value with a latency value from one of two hidden methods: AudioManager.getOutputLatency()
or AudioTrack.getLatency()
.
With the new AudioTrack.getTimestamp()
API, you get a snapshot of the playhead position at a given time, taken directly at the output. As such, it is fully accurate and already accounts for device latency. Thus there's no need to call any other APIs now to add/remove latency.
The caveat is that this timestamp is only a snapshot, and the docs recommend you don't call this new method very often. So the trick to getting the "current" position is to use your last snapshot and linearly interpolate what the current value should be:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Audio-Video-Synchronization
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page