Video and Audio not synchronous

VLC for Android and Chrome OS specific usage questions
herman602
New Cone
New Cone
Posts: 3
Joined: 15 May 2014 05:40

Video and Audio not synchronous

Postby herman602 » 15 May 2014 07:13

Hi guys,
I integrate the VLC for Android to our app for testing, there are some problems that I can't solve.
First, when the MediaPlayerPlaying is invoked, the video streaming doesn't present the video with only the audio sound,
after few seconds the video is displayed. How can I make the Video and Audio synchronous?
I found that there are many messages like the following. The problem is caused by that?
BTW, the video stream server uses VLC for Linux.

Code: Select all

05-15 11:48:35.905: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:35.905: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:35.905: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:35.935: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:35.935: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:35.935: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:35.985: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.005: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.075: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.075: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.075: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.075: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.145: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.145: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.215: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.295: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.295: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.335: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.355: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.465: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.465: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS 05-15 11:48:36.465: W/VLC(30132): packetizer_h264 packetizer: waiting for SPS/PPS
Another problem is that we use the hTC Desire 816, when the video is playing and it shows a lot of

Code: Select all

05-15 11:39:49.275: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8cb8 w/ time 13015405289 us 05-15 11:39:49.295: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c18 w/ time 13015371923 us 05-15 11:39:49.325: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8bc8 w/ time 13015338556 us 05-15 11:39:49.395: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c68 w/ time 13015505389 us 05-15 11:39:49.425: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8cb8 w/ time 13015472023 us 05-15 11:39:49.445: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c18 w/ time 13015438878 us 05-15 11:39:49.475: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8bc8 w/ time 13015605712 us 05-15 11:39:49.485: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c68 w/ time 13015572345 us 05-15 11:39:49.525: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8cb8 w/ time 13015538978 us 05-15 11:39:49.555: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c18 w/ time 13015672445 us 05-15 11:39:49.585: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8bc8 w/ time 13015639078 us 05-15 11:39:49.625: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c68 w/ time 13015706045 us 05-15 11:39:49.655: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8cb8 w/ time 13015772778 us 05-15 11:39:49.685: E/ACodec(30132): [OMX.qcom.video.decoder.avc] calling emptyBuffer 0xb77e8c18 w/ time 13015739412 us
however, the video is still can be played.
Do I need to handle it?

The last problem is that how can I know whether the video is being buffering?
If the video is being buffering which can be detected that the app can shows a dialog to prompt users.

flx42
Blank Cone
Blank Cone
Posts: 41
Joined: 17 Feb 2014 12:29

Re: Video and Audio not synchronous

Postby flx42 » 16 May 2014 10:57

What happens with the VLC for Android app? (http://nightlies.videolan.org/build/android-armv7/)
And with the desktop version?

herman602
New Cone
New Cone
Posts: 3
Joined: 15 May 2014 05:40

Re: Video and Audio not synchronous

Postby herman602 » 16 May 2014 11:38

What happens with the VLC for Android app? (http://nightlies.videolan.org/build/android-armv7/)
And with the desktop version?
I have tried the desktop version and the VLC for Android app, the result was that the the audio is before video presented.
When I use the VLC for Android app, the audio presents first, and the app switch to video mode after few seconds.

flx42
Blank Cone
Blank Cone
Posts: 41
Joined: 17 Feb 2014 12:29

Re: Video and Audio not synchronous

Postby flx42 » 16 May 2014 12:04

Globally the behavior seems normal as far as the android app is concerned. We don't know what the stream contains so we start as audio. If a video track is detected, our AudioService activity receives a MediaPlayerVout event, we start the VideoPlayerActivity of our android project.

Is the video supposed to start immediately for this stream? If this is the case then the problem might be related to the lack of H264 SPS/PPS.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Video and Audio not synchronous

Postby edwardw » 17 May 2014 20:47

Indeed, we can only display the video when we receive the video ES notification.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 19 guests