Opened 11 years ago

Closed 10 years ago

#4940 closed defect (invalid)

Audio/Video Sync. Reproducible. Internal player issue.

Reported by: mark@… Owned by: Janne Grunau
Priority: major Milestone: 0.21.1
Component: Video Playback Version: 0.21-fixes
Severity: high Keywords:
Cc: Ticket locked: no


From a very long series of list conversations. Others can reproduce this problem as well.

Internal player has audio about 1 second(ish) behind video. Capture is from firewire on DCT-6200.

HD capture from this same device is fine. This is SD capture.

After recommendations to try playing the file with ffplay:

I have also tried to enter a ticket with ffmpeg ( this behavior is the same when playing file in ffplay ), but ffmpeg said they would not accept ticket unless I was running latest SVN. The ffmpeg libraries that are used in Myth Internal player are "old" in the words of the ffmpeg list.

Mplayer and xine play this fine BTW.

To get the sample file: wget this file below.

My Internal player has audio sync problems. mplayer is fine with the file. The Internal player audio is off. Please, try it for yourself. It starts with 3 commercials. The third one is two kids talking. It is obvious that the audio is off with the internal player.

I'm having the same audio problem when playing your file back with my system. Here's my log:

[mythtv@livingroom ~]$ ffplay syncprob.mpg FFplay version SVN-r12135, Copyright (c) 2003-2008 Fabrice Bellard, et al.

configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib

--mandir=/usr/share/man --enable-shared --enable-gpl --enable-pp -- enable-swscaler --enable-pthreads --enable-x11grab --enable-liba52 -- enable-liba52bin --disable-avisynth --disable-libamr-nb --disable- libamr-wb --enable-libdc1394 --enable-libfaac --enable-libfaad -- enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable- libtheora --enable-libvorbis --enable-libx264 --enable-libxvid -- extra- cflags=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions - fstack- protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic - fasynchronous-unwind-tables --disable-strip

libavutil version: 49.6.0 libavcodec version: 51.50.1 libavformat version: 52.7.0 libavdevice version: 52.0.0 built on Feb 18 2008 20:01:30, gcc: 4.1.2 20070925 (Red Hat

4.1.2-33) No accelerated IMDCT transform found

Any chance you want to try it in MythTV as a recording--use or whatever--with a valid seektable? Create the seektable with:

mythtranscode --mpeg2 --buildindex --allkeys -c 9999 -s '2008-03-11 16:00:00'

(fixing chanid and starttime to equal whatever you used when you imported it). Played perfectly for me with a good seektable. See my post in the "Sound a second behind video" thread. Will do.

Actually, that question was meant for Brad. I just want someone else to confirm that it plays without A/V sync issues whenwe have a good seektable.

Question though.

This file was a recording. Named "1023_20080311101559.mpg" Can I just choose transcode on it and do the same thing?

For you, Mark, follow the instructions in my post on the other thread.

Perhaps I

should transcode all files after recording? I am wondering what a permanent fix could be. This came from a TV recoding originally. Or do I need to run another transcode command?

Thanks for the help. What is the root cause of this problem though? ffmpeg or something else?

The jury is still out...


I have deleted seek table and then run the transcode, same results. Seems related to strictly the internal player. ffmpeg?

If i take that recording and move it to my video directory, Internal player is still having sync issues. That would seem to remove the seektable variable from this.

MythTV uses ffmpeg's libraries, but it uses a copy built specifically for MythTV. Therefore, it's not using the libraries that you have installed on your system, but it's own "internal" copy of the libs.

ffplay gave the same behavior. I was using the latest ATRPMS version of .21.

Right. Because we are using ffmpeg libs. Just not ones that you can change.


Happy to provide more info to get this fixed. Live TV is unwatchable with this. Playback is essentially the same. The only way to watch is with another player such as mplayer etc...

Change History (10)

comment:1 Changed 11 years ago by mark@…

As suggested in the mythtv-users list....

The feedback I got from the ffmpeg developer list on this issue was that they were able to play the sample fine in the latest ( as of March 12th, 2008 ) SVN of FFMPEG. This is likely not a mythtv bug, but simply requires that the new ffmpeg libraries be used. Also that perhaps Janne might be willing to merge this in. I would be happy to test it.

comment:2 Changed 11 years ago by mark@…

Further details. The SVN version of FFMPEG is 12428

comment:3 Changed 11 years ago by belcampo@…

BBC HD 1920x1280 h264 trailer from Apple's website. ffplay SVN-r12547 plays it perfectly on my AMD AM2-4000 with CPU load < 55% In mythfrontend I have disabled all deinterlacing and get:

2008-04-06 14:39:23.699 Connected to database 'mythconverg' at host: 2008-04-06 14:39:23.699 FilterManager?: failed to load filter 'none', no such filter exists 2008-04-06 14:39:23.699 Couldn't load deinterlace filter none 2008-04-06 14:39:23.762 Video timing method: USleep with busy wait 2008-04-06 14:39:28.870 NVP: prebuffering pause 2008-04-06 14:39:30.107 NVP: prebuffering pause 2008-04-06 14:39:37.915 NVP: prebuffering pause 2008-04-06 14:39:39.399 NVP: prebuffering pause 2008-04-06 14:39:40.944 NVP: prebuffering pause 2008-04-06 14:39:42.272 NVP: prebuffering pause 2008-04-06 14:39:43.549 NVP: prebuffering pause So the filters are all none, and it stutters 20 times in 30 sec.

comment:4 Changed 11 years ago by brownitus@…

I am experiencing this too, only since the update to 0.21. If I open the .mpg files in my capture directory in VLC or Xine they play just fine, it's the internal player. I have so far with every recording had to increase the audio sync forward about 50-80ms. Using Haup PVR-150, Arch linux.

comment:5 Changed 11 years ago by geoffp@…

I have what appears to the same problem, but with a catch. On some channels, audio sync is consistently off with my Haup pvr-150, most notably 22 (cable), which is my local NBC affiliate. Other channels, however, appear to have perfect sync.

comment:6 Changed 11 years ago by stuartm

Component: mythtvVideo Playback
Milestone: unknown0.22
Priority: criticalmajor

comment:7 Changed 10 years ago by Dibblah

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:8 Changed 10 years ago by danielk

Owner: danielk deleted
Status: assignednew

Dibblah, unfortunately I'm not terribly familiar with MythTV's A/V Sync.

comment:9 Changed 10 years ago by Janne Grunau

Owner: set to Janne Grunau
Status: newaccepted

comment:10 Changed 10 years ago by stuartm

Resolution: invalid
Status: acceptedclosed

Open a new ticket if you can reproduce against current trunk.

Note: See TracTickets for help on using tickets.