Audio out of sync with MKV

Hi, this is my first post. I tried to gater all the info requested, pardon me if something is missing.

  • Your ATV model (2 or 3) and firmware version (found under the ATV settings > general > about > Apple TV software): 7.0.2 (6915)

  • The DNS server set on the ATV (found under the ATV settings > general > network > DNS): 192.168.254.1

  • The local IP address of the device that PlexConnect is installed on: 192.168.254.1

  • The device and operating system (including version number) that PlexConnect is installed on: MacBook Pro 2009 (2,26 GHz Intel Core 2 Duo) - OSX Yosemite 10.10.1

  • The device and operating system (including version number) that the Plex media server (PMS) is installed on: MacBook Pro 2009 (2,26 GHz Intel Core 2 Duo) - OSX Yosemite 10.10.1

  • The Plex media server (PMS) version number you are running (do not put 'latest'): 0.9.11.16.958-80f1748

  • The local IP address of the device that the Plex media server (PMS) is installed on: 192.168.254.1

  • The PlexConnect version number. If using Github source then a time and date of download (look at the creation date of the folder) and if you are using any non-standard setup e.g. Plexify or a fork: 0.5-dev (?)

  • The contents of your 'Settings.cfg' file (this is created at first clean shutdown of PlexConnect, using CTR+c):
     

    [PlexConnect]
    enable_plexgdm = True
    ip_pms = 192.168.178.10
    port_pms = 32400
    enable_dnsserver = True
    port_dnsserver = 53
    ip_dnsmaster = 8.8.8.8
    prevent_atv_update = True
    enable_plexconnect_autodetect = True
    ip_plexconnect = 0.0.0.0
    hosttointercept = trailers.apple.com
    port_webserver = 80
    enable_webserver_ssl = True
    port_ssl = 443
    certfile = ./assets/certificates/trailers.pem
    allow_gzip_atv = False
    allow_gzip_pmslocal = False
    allow_gzip_pmsremote = True
    loglevel = Normal
    logpath = .
     
  • Detail on the media file if it is an issue related to playing a media file (in order to get the necessary information on a particular media file go into the Plex web interface, select the video file, when it brings up the page for the media file click on the "i" information button on the left hand side, it will then bring up a "media info" box, click on the "View XML" button, it will then open a browser window with the relevant information, copy this to http://www.pastebin.com and use the pastebin link to post the details; posting the information directly in the forum may mess up the formatting and generally takes up a lot of space): http://pastebin.com/ipJ3w61k

  • detailed description of the issue (the clearer you can make this the better): I'm experiencing a video delay on most of my files. It's under 1 second but it's very annoying and it gets to the point where I can't really use Plex. What I mean is that the audio comes few millisecond before the video. I've tried the same file on the Mac with VLC and it's ok.
    Reading some posts I tried to listen to the audio directly form the TV instead of using the optical output but still, the audio is out of sync. I tried also to lower the transcode to "transcodequality = 1080p 10.0Mbps" but without luck. And this happens with or without subtitles. Also, last time I tried, the subtitles where way ot of sync (this should be logged in the PlexConnect.log in the next step). I tried with Beamer and sync is perfect (both audio and subtitle). 

  • Ensure you post your 'PlexConnect.log' file to pastebin and post the link ('PlexConnect.log' is located in your PlexConnect folder). If possible, follow these steps to create a "more detailed fresh" one: multiple paste
    http://pastebin.com/5jzmVuUC 
    http://pastebin.com/gfaNXFDH
    http://pastebin.com/T0gq67ij
    http://pastebin.com/TvRXJWbj
    http://pastebin.com/mMgh3G2d

 

Any Help is much appreciated.

Some TV's, such as mine, have a slow video processor. Anything that I see in HD has audio ahead of video, even regular TV broadcasts. If I switch to SD all is Ok. To check if it is the same with your TV, you can try to play using VLC, connecting the TV via HDMI, and see what happens with the sound and the video.

MKV's on the aTV are problematic.  I've got some that work fine, others don't.  As a result most of my over 560 movies are now m4v's, only the mkv's that work remain.  Do a test and use handbreak to redo the mkv in question to a m4v and see if the lag has been eliminated.

Some TV's, such as mine, have a slow video processor. Anything that I see in HD has audio ahead of video, even regular TV broadcasts. If I switch to SD all is Ok. To check if it is the same with your TV, you can try to play using VLC, connecting the TV via HDMI, and see what happens with the sound and the video.

Uh, actually with Beamer I've no problem with the same file from my Mac.

Unfortunately I don't have an HDMI port on the computer so I can't really try.

Thanks anyway.

MKV's on the aTV are problematic.  I've got some that work fine, others don't.  As a result most of my over 560 movies are now m4v's, only the mkv's that work remain.  Do a test and use handbreak to redo the mkv in question to a m4v and see if the lag has been eliminated.

I see. So you suggest to convert all the files to m4v?

Is it a complicated process?

I could try and see if the lag disappear...

Fairly easy. And as it should be only a "container change" (video=h264, audio=mp3 or aac or something), there should be no need for a full transcode using handbrake.

Something like the following using ffmpeg and mp4box should be enough, taking a just a couple of minutes if scripted...

Probably ffmpeg can do it on its own, I don't know.

# Extracting video:
ffmpeg -i "movie.mv" -an -c:v copy "temp_video.m4v"

Extracting audio:

ffmpeg -i “movie.mv” -vn -c:a copy “temp_audio.m4a”

Remuxing to mp4:

mp4box -add “temp_video.m4v” -add “temp_audio.m4a” “movie.mp4”