Video/Audio out of sync

More channels means more money for the techs, right?
Post Reply
stevense23
Posts: 6
Joined: Mon Sep 22, 2014 9:30 pm

Video/Audio out of sync

Post by stevense23 » Mon Sep 22, 2014 9:48 pm

Hi all, I'm a newbie in the field of digital broadcasting. We are currently broadcasting a dtt service based on isdbt standards in the Philippines. I changed some settings on the mux and encoder due to inclusion of datacasting service. It has audio and video but it has a 2 second delay. Some engineers told me about the pcr pid settings. How does it affect the service and how will i able to sync audio? Hope you can help. Thanks!

User avatar
PID_Stop
Posts: 475
Joined: Thu Apr 01, 2010 11:58 am
Location: Syracuse, New York
Contact:

Re: Video/Audio out of sync

Post by PID_Stop » Tue Sep 23, 2014 8:10 am

I am assuming that you mean the audio is out of sync with the video...

First off, video encoding works by accumulating a number of video frames in order to find patterns of repetition that can be simplified (temporal compression) and patterns within each frame that can be simplified (spatial compression). Once all of this processing has been done, you get an output that consists of a series of occasional "I" frames that completely describe the picture, followed by a bunch of "P" frames that only describe the difference between the previous frame and the current one. Naturally, all of this creates considerable delay in the video.

Audio encoding, by comparison, is really fast and adds minimal delay to the signal. If you were to look at the immediate output of the video and audio encoders, you would find that the video lags way behind the audio. So a typical encoder includes a variable audio delay that allows you to match up the audio and video. You should find an adjustment for this in the encoder settings.

The problem is, while the audio encoding delay is pretty much constant, the video packets don't necessarily show up with consistent delay, and will tend to drift somewhat in time according to the complexity of the content (a great deal of randomness or rapid motion tends to increase the delay). So how do you keep the audio and video locked together? You include a timing reference within the video that the receiver uses to align everything again... and that reference is called "PCR", or Program Clock Reference.

As a rule, PCR is included within the video packets for each program you are transmitting. For example, if you have a station that transmits two program streams on one channel, and you are using services 3 and 4 for the two streams (pretty typical), your signal would include:

Service 3 (first program stream):
PID 48: PMT (Program Map Table)
PID 49: Video and PCR
PID 52: Audio (encoded with Dolby AC3 in the United States)

Service 4 (second program):
PID 64: PMT (Program Map Table)
PID 65: Video and PCR
PID 68: Audio

There are other PIDs present, but the really important thing as far as keeping audio and video in sync is that each program service must have PCR enabled in its video PID. An MPEG analyzer can tell you whether this is present.

Hope this gives you at least a good idea of what to look for, and what to expect.

Regards,

-- Jeff

stevense23
Posts: 6
Joined: Mon Sep 22, 2014 9:30 pm

Re: Video/Audio out of sync

Post by stevense23 » Wed Sep 24, 2014 9:32 pm

Thanks for this Jeff! Yes, the audio is out of sync with the video and I have 5 programs in 1 channel. So the PCR and video PID should be the same? This is my current PID settings.

Program1
PCR 283
VID 289
AUD 290

Program2
PCR 284
VID 291
AUD 292

Program3
PCR 285
VID 293
AUD 294

Program4
PCR 286
VID 295
AUD 296

Program5
PCR 287
VID 297
AUD 298

User avatar
PID_Stop
Posts: 475
Joined: Thu Apr 01, 2010 11:58 am
Location: Syracuse, New York
Contact:

Re: Video/Audio out of sync

Post by PID_Stop » Thu Sep 25, 2014 12:13 pm

I need to read more carefully! I completely missed that you are running ISDB-T... and I'm not familiar with the standards that apply there. My answer was based entirely on ATSC systems, and DVB has strong similarities. Ordinarily I would expect that PCR would indeed appear in the same PID as video, but you should confirm that for your standard. You might consider contacting technical support for your encoder or multiplexer: they should have someone familiar with typical PID assignments for your situation.

Regards,

-- Jeff

User avatar
NECRAT
Site Admin
Posts: 2916
Joined: Sat Nov 17, 2007 9:13 pm
Location: Taunton, MA
Contact:

Re: Video/Audio out of sync

Post by NECRAT » Thu Sep 25, 2014 5:08 pm

stevense23 wrote:Thanks for this Jeff! Yes, the audio is out of sync with the video and I have 5 programs in 1 channel. So the PCR and video PID should be the same? This is my current PID settings.
Is the Audio/Video sync off on all five streams?
http://www.necrat.us

"Arguing with an engineer is like mud wrestling with a pig. After a couple of hours, you realize the pig likes it"

stevense23
Posts: 6
Joined: Mon Sep 22, 2014 9:30 pm

Re: Video/Audio out of sync

Post by stevense23 » Thu Sep 25, 2014 10:57 pm

NECRAT wrote:
stevense23 wrote:Thanks for this Jeff! Yes, the audio is out of sync with the video and I have 5 programs in 1 channel. So the PCR and video PID should be the same? This is my current PID settings.
Is the Audio/Video sync off on all five streams?
Yes all audio of the 5 streams is out of sync with the video. It has a 1-2 second delay.

User avatar
NECRAT
Site Admin
Posts: 2916
Joined: Sat Nov 17, 2007 9:13 pm
Location: Taunton, MA
Contact:

Re: Video/Audio out of sync

Post by NECRAT » Fri Sep 26, 2014 11:12 am

Have you adjusted the encoder's audio latency? Most (if not all) encoders have the ability to delay audio to closer match the encoded video.
http://www.necrat.us

"Arguing with an engineer is like mud wrestling with a pig. After a couple of hours, you realize the pig likes it"

stevense23
Posts: 6
Joined: Mon Sep 22, 2014 9:30 pm

Re: Video/Audio out of sync

Post by stevense23 » Sun Sep 28, 2014 8:12 pm

Hi all, audio now syncs with the video. I changed the PCR PID of the programs in the encoder just like what Jeff said. I think digital standards have the same concept when it comes to headend side? BTW, thanks for your replies! :)

User avatar
PID_Stop
Posts: 475
Joined: Thu Apr 01, 2010 11:58 am
Location: Syracuse, New York
Contact:

Re: Video/Audio out of sync

Post by PID_Stop » Mon Sep 29, 2014 8:38 am

Hooray! That's great for you, and I learned something in the process.

-- Jeff

stevense23
Posts: 6
Joined: Mon Sep 22, 2014 9:30 pm

Re: Video/Audio out of sync

Post by stevense23 » Tue Sep 30, 2014 9:33 pm

BTW guys, Is there someone here who knows something about ISDBT system? I think most of you are on DVB/ATSC standards. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest