A/V Sync issues under mp4 possible diagnosis and FIX

I have posted here, but figured I would drop a line here as well.

http://community.wd.com/t5/WD-TV-Live-SMP-Issues/Incorrect-audio-video-sync-issues-WITH-DIAGNOSIS-and-FIX/idi-p/615519

This great little player has recently been giving me a terrible time with my OTA → mp4 conversions with many suffering from horrific A/V sync issues when no other player has problems.  The most frustrating part was that only some of the files were having trouble, many had little or no problems and all played on at least two other playforms without issue ( VLC on Mac and iOS ) so I know it wasn’t the encoder.  I have dignosed the problem and can fix my files without any changes to the stream data ( this is a metadata fix ).  I can’t guarntee it works for every case of AV sync, but it’s cleared all of my buggy files.

It does appear to be a clear firmware bug related to improper use of the DTS timestamp rather than PTS for inital A/V offset.  It will affect any file where the inital DTS is signifigantly different from the PTS so ( b-frames and HD seem to be triggers ).  Thankfully DTS timecodes are not necessary for standard playback, they are more of a hint to the decoder.

I have been sucessful in using the following command to “fix” my files.  I’m sure that someone with more knowledge than I could probably write an in-place fix to strip the dts timestamps, but this is built from the stock tool avconv under linux.  Maybe others can chime in with a similar tool for windows and mac to strip this metadata.  The mp4->mkv strips the DTS codes and then you can bring it back to mp4 without issue.

avconv -i Peg\ Plus\ Cat.S01E05.The\ Circus\ Problem;\ The\ Buried\ Treasure\ Problem.mp4 -codec copy -f matroska - | avconv -i pipe:0 -codec copy -f mp4 stream.mp4

Hello,

Thanks for sharing.

Make sure you go back to your post on the issues board and complete the missing information so the MOD. can upload that as a issue for investigation.