Opened 6 years ago

Closed 3 years ago

Last modified 2 years ago

#5755 closed Bugs

Audio sync/delay issues when playing 24p (HD) material in 23.98hz & 24hz

Reported by: mindweaver Owned by:
Priority: 4 - Normal Milestone:
Component: Video playback (inc. audio in video and codecs) Version: GIT
Severity: Normal Keywords: refresh rate audio sync delay 24hz
Cc: phi2039, bobo1on1, elupus, DDDamian, Blocked By:
Blocking: Platform: All
Revision: 17272

Description (last modified by malloc)

I could not find a ticket for this, tried to search.

When playing HD movies (mkv or quicktime trailers) that are in 24p (24 or 23.98fps) on a TV that is set to either 24hz or 23.98hz the audio is out of sync. It is almost always the same amout of delay. I have to set the audio delay back -0.250.

I have to do this on every HD movie. When playing the same video files in 60hz the audio sync is perfect. All material watched in 60hz has great audio sync.

I think this is a big issue and should be looked at. Is there any more info you need from me that could help?

Referring to the discussion in:

Attachments (3)

wzpart.mp4 (7.6 MB) - added by fuathurio 5 years ago.
Sample File
xbmc-9.11.log (101.0 KB) - added by christsim 5 years ago.
xbmc-r26540.log (98.4 KB) - added by christsim 5 years ago.

Change History (72)

comment:1 Changed 6 years ago by althekiller

  • Component changed from DVD-video navigation/playback to Video playback (inc. audio in video)
  • Priority changed from 6 to 4 - Normal
  • Severity changed from Major to Normal

comment:2 Changed 6 years ago by mindweaver

Thank you for fixing my mistakes!

Why did you change severity? Isn't it kind of serious that videos are played out of sync?

comment:3 Changed 6 years ago by tslayer

If XBMC does not start up or crashes often, that is MAJOR. This isn't major, especially if there is a workaround.

My 2 cents/

comment:4 Changed 6 years ago by mindweaver

ok, I can accept that. But I do believe it is more important than just "normal" since you now have the auto refresh rate function working, and everyone with a normal TV is affected.

Oh well, the most important thing is that it gets fixed :) regardless of severity labeling :) keep up the good work.

comment:5 Changed 6 years ago by pilluli

Just want to point out that I'm also hit by this bug and I'm running r18471 in LINUX so not specific to windows only.

I sincerely hope this bug gets attention from the developers as don't believe playing them at 60Hz is a workaround as you get other kind of problems (judder).

Regards,

comment:6 Changed 6 years ago by schmoko

I can also confirm this is not limited to Windows, I've seen it on both Ubuntu 8.04 and 8.10. I erroneously assumed Smooth-Video branch was addressing this (it is not). Issue occurs with both VDPAU and GL, so it is not the renderer. It is also not limited to HD material (ie, .mkv and x264 encodes of 480P material at 24 FPS will have the same issue).

comment:7 Changed 6 years ago by mindweaver

Is this fixed? I tried a new build yesterday and it synced everything I watched. schmoko try XBMCSetup-Rev18730

comment:8 Changed 6 years ago by pilluli

I don't think it is fixed. I just watch a film with svn version 18759 and I'm still having the same problem (in ubuntu intrepid). Also I'd like to confirm schmoko's post. I'm experiencing ausio sync problems at 24Hz in both HD and SD material and in all 3 svn branches (main,vdpau and smoothvideo).

comment:9 follow-up: Changed 6 years ago by Nazgulled

Wondering if http://trac.xbmc.org/changeset/19284 fixed this problem?

comment:10 in reply to: ↑ 9 ; follow-up: Changed 6 years ago by mindweaver

Replying to Nazgulled:

Wondering if http://trac.xbmc.org/changeset/19284 fixed this problem?

It seems to have done some good, but I haven't tested it enough to say for sure.

comment:11 in reply to: ↑ 10 Changed 6 years ago by Nazgulled

Replying to mindweaver:

Replying to Nazgulled:

Wondering if http://trac.xbmc.org/changeset/19284 fixed this problem?

It seems to have done some good, but I haven't tested it enough to say for sure.

It was all the same for me :/

comment:12 Changed 6 years ago by bogey

Is it better? For me it seems that for some movies sync is ok, but for some movies I need to set 150ms delay. Weird thing is that if movie sync is ok without setting offset, setting delay to 150ms seems not change a thing?

I'm currently at r19623.

comment:13 Changed 6 years ago by bogey

Seems that sync is ok now. I'm at r20172

Smoothvideo r20211 also OK.

Could someone else test?

comment:14 Changed 6 years ago by Nazgulled

I just updated to r20225 and although sometimes it's hard to tell, I don't think it's fixed. At least on my end...

comment:15 Changed 6 years ago by schmoko

I stopped seeing this issue with Smoothvideo a while ago and definitely do not see it with trunk. This includes sources where it was really bad before.

comment:16 Changed 6 years ago by pilluli

I can still reproduce this bug (or related to it). Audio is ~200ms ahead of video for 24hz sources. Using trunk in linux.

comment:17 Changed 6 years ago by pilluli

I haven't seen any specific entry in the subversion logs but as in r21555 this issue seems to be fixed.

comment:18 Changed 6 years ago by WiSo

  • Milestone changed from Future / Pending to 9.10
  • Resolution set to Fixed in SVN
  • Status changed from new to closed

please reopen if it isn't fixed yet.

comment:19 Changed 6 years ago by pilluli

I'm sorry to reopen this ticket again but I was just too quick informing it was fixed. After watching some more movies the issue is still here :-(

However, now it seems as if audio is not always out of sync (previously audio was *all* the time around 200ms ahead) but now it is ok on some movies and not in others.

I've managed to create a log, first movie (xXx) plays out of sync, however the next one (eureka) plays in sync. Log is here:

http://pastebin.com/f57a9bf1a

PS1: Please, don't comment on my taste in videos, they are just examples :-)

comment:20 Changed 6 years ago by pilluli

It seems I can not reopen the ticket :-? Hope it gets attention to some developer and change it..

comment:21 Changed 6 years ago by mindweaver

Weird, I cannot reopen my own ticket.

And as you said, the issue is not fixed.

comment:22 Changed 6 years ago by WiSo

  • Cc phi2039 bobo1on1 added
  • Platform changed from Windows to All
  • Resolution Fixed in SVN deleted
  • Status changed from closed to reopened

comment:23 Changed 5 years ago by mindweaver

Is there no progress on this?

comment:24 Changed 5 years ago by elupus

  • Cc elupus added

I suspect this could be samples where it's impossible to drop any B frames during decode. We currently never drop on output.. If you have a sample which we can reproduce with it'd be interesting.

comment:25 Changed 5 years ago by narkotic

I have the same issue and can show it on a copy of "There Will Be Blood" that I got from the newsgroups (1080p - DTS) which is around 16gb. How can I make a sample and where can I upload it to?

comment:26 Changed 5 years ago by fuathurio

I've noticed this issue with much of the content on Revision 3, diggnation specifically. That is pretty easily available for testing.

comment:27 Changed 5 years ago by vdrfan

Please attach a sample file.

Changed 5 years ago by fuathurio

Sample File

comment:28 Changed 5 years ago by fuathurio

Sample file fell out of sync in Beta2 but doesn't in RC1. Haven't noticed any syn problems in RC1.

comment:29 Changed 5 years ago by malloc

  • Resolution set to Fixed in SVN
  • Status changed from reopened to closed

Closing again based on fuathurio's previous comment.

comment:30 follow-up: Changed 5 years ago by mindweaver

It actually seems fixed. Will have to do some more testing though.

I hope I don't have to request a reopening :)

comment:31 in reply to: ↑ 30 Changed 5 years ago by christsim

Replying to mindweaver:

It actually seems fixed. Will have to do some more testing though.

I hope I don't have to request a reopening :)

Sorry to do this :), but I think this is still an issue. I'm still getting a 250ms audio delay when playing 24hz content, including the sample provided above.

My debug log is available here (http://pastebin.com/f16b4d3db) if it helps

comment:32 Changed 5 years ago by malloc

  • Resolution Fixed in SVN deleted
  • Status changed from closed to reopened

@christsim, could you test with 9.11? I'm curious if there's been a regression since then. Also, please upload log files as attachments not to pastebin.

comment:33 Changed 5 years ago by malloc

  • Milestone changed from 9.11 to Future / Pending

comment:34 Changed 5 years ago by christsim

Can you please clarify? I thought 9.11 was the official Camelot release on the xbmc download page (http://xbmc.org/download/), is that not the case?

I originally saw the issue with that release, then tried to upgrade to one of the nightly builds to see if the issue disappeared (but it didn't). I then tried to use the WASAPI sound driver, but that also didn't work (that is the log of the pastebin url above using svn:26333).

Is there a specific version(s) you would like me to test and upload the logs for?

comment:35 Changed 5 years ago by malloc

9.11 is the official release. I saw you were using a newer version so I wanted to make sure you tested 9.11 like the others who claim it's fixed have. Do you get the repro with the sample file attached? If not, could you attach a new sample?

comment:36 Changed 5 years ago by bobo1on1

This might have been fixed in r25985, you need trunk for that though because it's not in Camelot.

Changed 5 years ago by christsim

comment:37 Changed 5 years ago by malloc

He's got SVN, still repros in 26333.

comment:38 Changed 5 years ago by christsim

Ya, I've managed to check out the latest source code from svn, and i've compiled it with vs2008, and that didn't seem to fix the issue. Would you like me to test r25985 specifically? or maybe the lastest nightly on the download page?

comment:39 Changed 5 years ago by christsim

Also, i've attached the logs from the xbmc 9.11 install.

What i've also noticed is that my TV takes about two seconds to switch refresh rates - meanwhile the audio starts playing - the video then runs at super speed to catch up to the audio. When it eventually does, the sound is out by 250ms.

This issue pretty much affects all my 24fps movies, sd and hd content.

comment:40 Changed 5 years ago by bobo1on1

As long as you have trunk with revision 25985 or higher, you're ok.

Changed 5 years ago by christsim

comment:41 Changed 5 years ago by christsim

ok, i downloaded and installed the latest nightly trunk build r26540. This issue still occurs. I've attached the debug log to this thread.

The issue i noticed before, the super speed video, is now gone. The audio does start before the tv has finished setting the refresh rate, but the video just starts from the current audio position. if that makes sense.

Also, at the end of the video sample, the sound is messed for a brief moment. It sounds as if the last sample is played repeatedly until the video is finished. If i adjust the audio delay to -250ms, this noise dissapears.

comment:42 Changed 5 years ago by malloc

@christsim, please answer my earlier question: Do you get the repro with the sample file attached? If not, could you attach a new sample?

Also, what is the make and model of your TV?

comment:43 Changed 5 years ago by christsim

Sorry, I do get the delay issue with the sample file attached.

My TV is a Samsung 46 inch LED 6 Series (UA46B6000).

I also tried setting the audio output to use the tv's speakers, but no luck. Usually I use the optical (TOSLINK) to my A/V Receiver. I also tried setting the audio output to analog, also with no luck.

comment:44 Changed 5 years ago by althekiller

nvidia gfx by chance? Add

    Option         "DynamicTwinview" "false"
    Option         "FlatPanelProperties" "Scaling=Native"

to device section of xorg.conf if so.

comment:45 Changed 5 years ago by althekiller

Ah, win32. Disregard.

Sync was fine here on linux with the sample. Perhaps platform needs changed and wiso cc'd?

comment:46 Changed 5 years ago by mindweaver

I can reproduce it with the sample file that is attached. I have a LG50PG7000

comment:47 Changed 5 years ago by ashlar

For what it's worth, on Windows 7 and recent builds (WASAPI introduction), I solved this by using WASAPI output. I noticed sound was slightly out of sync and discovered that, at last, I could set the delay to 0ms with pretty much perfect results. Previously I had it set up at 250ms for all videos.

Considering that WASAPI bypasses all OS mixers and stuff... could it be that XBMC does not take into account the DirectSound processing that normally takes place in Windows?

comment:48 Changed 5 years ago by elupus

Looks like you could be right.. But i'm not sure how one would get the actual ouptut delay. (wsapi looks like it would have same problem too)

comment:49 Changed 5 years ago by malloc

  • Description modified (diff)

so this was always a constant time buffer issue? That should repro regardless of file input shouldn't it? I believe we have a feature request open for gui delay configuration.

comment:50 Changed 5 years ago by mindweaver

What did you change in my description? Did you only remove the forum url? No it's not constant it differs. I just found a medium value that seemed to work -0.250 I believe since the latest revision that value has changed somewhat for me. it's less off sync but still not good.

comment:51 Changed 5 years ago by malloc

didn't change anything. Trac hates my palm pre.

comment:52 Changed 5 years ago by ashlar

Well, happy to be right once in a while. :)

Could it help to have debug logs with both WASAPI and DirectSound for the same file?

comment:53 follow-up: Changed 5 years ago by elupus

Nope.. Something i've forgot to ask. What does A/V info in player/codec info display when you have this delay?

comment:54 Changed 5 years ago by bossanova808

I have this issue too - TV is Panasonic Viera V10 plasma with hdmi audio out to a Denon 2309 receiver.

I am on an ASRock ION 330 with XBMCLive Camelot - and I am using the flatpanel scaling=native and composite=disable options.

Delay is pretty much consistent with 24hz material - about 150ms I make it, maybe a tad more.

I use adjust refresh rate and other material seems in sync. I can't play that sample because my reciever isn't keen on AAC I think.

comment:55 in reply to: ↑ 53 Changed 5 years ago by christsim

Replying to elupus:

Nope.. Something i've forgot to ask. What does A/V info in player/codec info display when you have this delay?

Sorry for the late reply, the a/v hovers around 0.0, pretty much going up to +/-0.040.

comment:56 follow-up: Changed 5 years ago by elupus

Ok, atleast we know it's not messing up by what it know. Often TV's introduce a substantial delay in their processing.

If you can switch you TV to game mode or turn of all 100hz/motion smoothing processing, that could remove the delay.

I suspect that we still need some global audio delay setting. My TV for example has a 100ms delay, that I most of the time have to adjust for.

comment:57 Changed 5 years ago by elupus

Oh wait.. you said that the other windows renderer didn't have the problem.

comment:58 in reply to: ↑ 56 Changed 5 years ago by christsim

Replying to elupus:

Ok, atleast we know it's not messing up by what it know. Often TV's introduce a substantial delay in their processing.

If you can switch you TV to game mode or turn of all 100hz/motion smoothing processing, that could remove the delay.

I suspect that we still need some global audio delay setting. My TV for example has a 100ms delay, that I most of the time have to adjust for.

Ok, just to make sure, i did try enabling game mode and disabling 100hz (also made sure the noise reduction was off), but that didn't seem to help.

comment:59 follow-up: Changed 5 years ago by mindweaver

It isn't the TV. auto refresh rate in PowerDVD, TMT and WinDVD when playing blu-rays with reclock does not present this problem. So it must be fixable in XBMC aswell :) I hope.

comment:60 in reply to: ↑ 59 Changed 5 years ago by christsim

Replying to mindweaver:

It isn't the TV. auto refresh rate in PowerDVD, TMT and WinDVD when playing blu-rays with reclock does not present this problem. So it must be fixable in XBMC aswell :) I hope.

I agree, i tested a Mede8tor that is 24hz capable on my TV without an issue. The main reason why i think it's xbmc, is that at the end of the video i can hear scrambled sound, as if xbmc is playing garbage memory or the last sample of the video over and over for split second. If i set the audio delay to 250ms, this sound disappears.

comment:61 Changed 4 years ago by frotsen

This problems appears if auto refresh rate on and you mkv that has 5 or more reference frames. If i remix the movie with 2 reference frames it plays fine

comment:62 Changed 4 years ago by lkraav

Running (xbmc-pvr odk44 currently) into this playing divx and xvid, 250ms delay seems to be the exact correct amount. HD OTOH content plays perfectly.

comment:63 Changed 3 years ago by sho

Can you affected guys please test this with current master post ffmpeg bump. (Does not happen on Windows 7 64 bit)

comment:64 Changed 3 years ago by torcar

This is a rather big issue in my opinion. Seems to be alot of users affected.

Check this thread for more input. http://forum.xbmc.org/showthread.php?tid=80247&page=21

comment:65 Changed 3 years ago by sho

  • Cc DDDamian added
  • Milestone changed from Future / Pending to 12.0

Thank you, we already knew that. What I was asking was if this was fixed in latest master (which according to someone elses post in the thread it is).

comment:66 Changed 3 years ago by torcar

The latest master would be this, right?

XBMCSetup-20120515-2687fac-master.exe

I can test it as soon as possible if its the correct master.

comment:67 Changed 3 years ago by sho

This would be the latest nightly build from the current master, which is enough for most. Technically you would have to build your own to be on the bleeding edge.

I would suggest you do not overwrite your production installation with this until you are confident it solves your issues and does not introduce new.

comment:68 Changed 3 years ago by Martijn

  • Status changed from reopened to closed

comment:69 Changed 2 years ago by Martijn

  • Milestone 12.0 deleted
Note: See TracTickets for help on using tickets.