[mythtv-users] 0.25 Major AV sync problems

David Moore dmoo1790 at ihug.co.nz
Mon Jun 18 09:56:24 UTC 2012


On 18/06/12 20:48, Steven Ellis wrote:
>
> On Mon, June 18, 2012 6:03 pm, Steven Ellis wrote:
>>
>> On Sat, June 9, 2012 12:25 am, Richard wrote:
>>> On 08/06/12 01:11, David Moore wrote:
>>>> Thanks for the confirmations that I'm not the only one seeing this
>>>> problem. FYI I have created a ticket #10797.
>>>
>>> I've done a little bit more testing but I can't say that I've managed to
>>> home in on anything in particular.
>>>
>>> I'm using an NVidia 8400GS card and sound output via the on-board Intel
>>> chipset.
>>>
>>> If I use the 'VDPAU Normal' profile, I get the problem.  If I switch it
>>> just 'Normal', everything seems to be ok (apart from not looking as
>>> nice).
>>>
>>> With audio set to SPDIF, I get the problem.  If I change audio to
>>> analogue, I don't.
>>>
>>> When I get the problem, the A/V sync value seems to stay pretty much
>>> fixed (maybe a little bit of jitter in the hundredths range), changing
>>> either the video or audio settings to stop the problem and it changes
>>> almost constantly.
>>>
>>> This is on my main box in the living room, running a fresh install of
>>> Mythbuntu 12.04.
>>>
>>> I cannot reproduce the problem on my desktop.  It doesn't matter whether
>>> what video or audio settings I use, everything stays in sync (I've no
>>> way of listening to digital audio on the desktop but the A/V sync value
>>> looks ok).  Both machines have the same NVidia card in them (at least,
>>> it's the same chipset), but the desktop machine does have slightly newer
>>> NVidia drivers.
>>>
>>> Here are the main differences:
>>>
>>> Mythbox
>>> -----------
>>> NVidia 295.40
>>> 82801JI (ICH10 Family) HD Audio Controller
>>> MythTV Version : v0.25.1
>>>
>>> Desktop
>>> -----------
>>> NVidia 295.53
>>> 6 Series/C200 Series Chipset Family High Definition Audio Controller
>>> MythTV Version : v0.25.1-1-g016db04
>>>
>>>
>>> Does this give anyone any ideas?
>>>
>>
>>
>> I've upgraded from MythTV 0.23 to 0.25 and I'm seeing the issue on
>> existing as well as new DVB-S MPEG-2 recordings with MP2 audio.
>>
>> I'm running a GT220 card with an M2NPV-VM board and an Athlon X2 5050BE
>> CPU.
>>
>> I noticed that my de-interlacers were disabled during the upgrade so I've
>> turned Advanced 2x back on. Display is generally 1920x1080 50Hz unless I'm
>> watching US content.
>>
>> All my audio is going out over SPDIF to my amp. I haven't setup audio over
>> HDMI yet with the new upgrade.
>>
>> In order to get any reasonable sync I need to exit playback and re-enter
>> the file. Otherwise its a real mess.
>
> Ok I think I have a fix. Checking logs I saw the following alsa error
>
> Jun 17 20:30:10 mythtv mythfrontend[20861]: E CoreContext
> audio/audiooutputalsa.cpp:545 (OpenDevice) ALSA: Unable to sufficiently
> increase ALSA hardware buffer size - underruns are likely
>
> and recommendation
>
> Jun 17 22:36:39 mythtv mythfrontend[26876]: E CoreContext
> audio/audiooutputalsa.cpp:213 (SetPreallocBufferSize) ALSA: Try to
> manually increase audio buffer with: echo 128 | sudo tee
> /proc/asound/card0/pcm1p/sub0/prealloc
>
> I've actually bumped the prealloc up a bit higher to be certain
>
>   echo 256>  /proc/asound/card0/pcm1p/sub0/prealloc
>
> Just tested some files and sync is close to perfect and I'm not seeing any
> audio centric errors.
>
> Steve
> --------------------------------------------
> Steven Ellis - Technical Director
> OpenMedia Limited - The Home of myPVR
> email   - steven at openmedia.co.nz
> website - http://www.openmedia.co.nz
>

Hi Steve, One of the first things I tried was increasing the ALSA buffer 
size even though I wasn't getting the underrun warning. I raised the 
ticket after I did this and I still get major sync loss when seeking 
back to the start of a recording. Also minor (maybe a few tenths of a 
second or less) unsync between audio and video when seeking forwards. 
Pausing usually helps to improve sync.

The opinion of the person who analysed my logs was that the root problem 
lies in ffmpeg code. From what little debugging I could do I tend to 
agree. Haven't raised anything with ffmpeg devs yet. Not sure I have the 
energy to take it further. Just living with it for now.


More information about the mythtv-users mailing list