Axis Q7401 -> Wowza 2 -> JW Player or Flow Player audio/video sync issue

I’m having an audio/video synchronization problem.

Audio gradually plays faster than video and the gap gets bigger as time passes.

Here are what I have set up:

  1. AXIS Q7401

Video: H.264, 250kbits constant bitrate

Audio: AAC, 16KHz sampling, 64kbits

  1. Wowza Media Server

Application Name: live

Stream type: live-lowlatency

Application.xml:

Streams/Properties/Property/sortPackets: true

Streams/Properties/Property/sortBufferSize: 750

Streams/Properties/Property/flushInterval: 30

I used the streammanager to receive stream from AXIS Q7401.

Stream type that I used for pulling from AXIS Q7401 was rtp-record.

  1. JW Player 5.5, Flow Player 3.2.7

  2. Web Browser - Crome with Flash Player 10.2

First, the audio/video are in sync. But it gets tilted as time passes.

It seems that there is a problem in RTSP->RTMP re-streaming.

The reason why I think that is the problem is that even if I set JWPlayer’s bufferlength to 1 sec, the audio/video are out of sync by more than 3 seconds if I play it for 3hours.

Is there any setting that I can try in Wowza Media Server?

Thank you for your help!

In general these issues are on the encoding side. The AAC stream is slightly off and it will drift out of sync over time.

Does this describe your problem:

Connect a player to the stream and stream for 2 hours. The stream slowly drifts out of sync. If I disconnect the player and re-connect then the stream is back in sync but again slowly drifts out of sync.

If you increase the sample frequency of the audio encoding to 48KHz you might have more luck.

Charlie

There is no Wowza solution. It requires a fix at the camera side.

Charlie

Have you checked for firmware update?

Richard

Here is a way to debug timecodes:

https://www.wowza.com/docs/how-to-debug-aac-or-mp3-timecode-issues-with-apple-hls-packetization

Note Charlie’s comment: “In general these issues are on the encoding side. The AAC stream is slightly off and it will drift out of sync over time.”. The above is way of debugging, looking at the audio alignment, but the problem is probably on the encoder side, which is why I suggest seeing if there is any firmware update.

Richard

Take a look at ModuleMediaCasterStreamMonitorAdvanced which will reset as necessary. That would be better than a set reset interval:

https://www.wowza.com/docs/how-to-enable-advanced-monitoring-and-resetting-of-mediacaster-streams)

Richard

Opening a case with Axis is the right direction. Output of the AAC timecode debug method we pointed to should be helpful.

https://www.wowza.com/docs/how-to-debug-aac-or-mp3-timecode-issues-with-apple-hls-packetization

Richard

Some clients are able to adjust a/v sync issues and others can’t. I think Flash can sometimes (albeit not in your case) while iOS does not.

Richard

I am having the same issue, we are using the Q7401 and the audio does exactly what you are stating.

Have you had any luck?

We are using the most current one, I assume you were talking about the Q7401?

We have the exactly same issue with our Q1755. Firmware 5.02 and recent 5.20. No difference. I tried to use the StreamMonitor but I can’t figure out how to read the loglines and which settings are needed to reset the stream.

I set

streamMonitorAVSyncToleranceEnable=true

streamMonitorAVSyncTolerance=100

Using the videos from

http://editorsean.com/blog/49-audiovideosynctest

I still see much bigger desync and no reset until I stop and restart the player (JW Player 5)

I opened a case with AXIS, too.

Well, AXIS tries to play the “Sorry, but there’s nothing we can do about that”-game :frowning: Do you have any suggestions how I can proof that their devices do something wrong in a way they can not deny? I think Wowza timecode debugging is not possible for them.

Latest Update. AXIS wanted to know if AXIS Media Control (AMC activex component) shows the same drift. Took me a while to get a Windows Box with IE, but no, it doesn’t. It claims to use RTP over RTSP over HTTP. Streaming parameters are the same used for wowza. In sync at start and no drift. Not one frame within 30 minutes.

Another update. AXIS told me to check some things. After doing so I finally had time to check the AAC debug output from wowza, too.

The output shows

tc[0]: …

for some seconds and then …

tc[8]: 1012784303:1012784295:16000

reset: 16204548720

tc[8]: 1012784359:1012784367:16000

reset: 16204549872

time between the tc[8] differs, but they always appear twice.

Only to understand the technical aspects… why is it that RTSP clients are able to keep A/V Sync while it fails in some other cases like RTMP to flash?

Flash Player 11.2 (maybe 11.1) fixed this issue for us. AV-Sync is stable with AXIS now.

Thank you for your reply Charlie.

You said,

Connect a player to the stream and stream for 2 hours. The stream slowly drifts out of sync. If I disconnect the player and re-connect then the stream is back in sync but again slowly drifts out of sync.

If you increase the sample frequency of the audio encoding to 48KHz you might have more luck.

Charlie

I also tested it, and it is as you said.

However, if I play the RTSP stream from AXIS Q7401 directly through VLC Player 1.1.7, the sync doesn’t drift-it stays the same.

Also, AXIS Q7401 doesn’t support 48KHz sample rate(16 KHz is the maximum), but it has options to different bitrates.

Do you think adjusting the bitrate can help?

Also, if I use HTTP streaming, would the problem be solved?

Exactly the same problem. Camera Axis P-1344, latest firmware.

Audio gradually plays faster than video.

What can I do?

It seems to me that the problem with the server. Record through the Wowza, so good. The only problem for online viewing. Have to do a ForceReset every 30 minutes.