Resulting H.264 AV Sync drifts with certain MPEG2TS stream inputs
Transcode files with Intel QuickSync.
Brought to you by:
babgvant
I'm not sure why, but some of my clear QAM recordings result in slowly drifting AV sync. Perhaps there are some errors in the transport stream. Other channels sync fine over an hour. Here is a short blurb where the AV sync is off by around 500ms right away.
My guess is that the problem is that currently QSTranscode generates timestamps with the assumption that the source isn't missing packets. I'll have a look.
Yes it's very likely my TS files have missing packets. My cable line has errors sometimes. But the src TS plays fine on PC. Whereas the converted file has bad av sync. Ideally qstranscode could handle these scenarios.
1.0.23: Unfortunately, we've stepped backwards here: AV sync is off by a full second or so, even on Windows 7 playback. It's not even close. Also, LookAhead just locks up, so I had to move to CBR.
Please create a separate ticket for LookAhead (make sure you're on latest drivers first though).
Can you provide a longer sample TS? It doesn't have to be here, a download service (dropbox, skydrive, gdrive, etc) works too.
The minimum show size I have is 30 min, which is about 3.5gigs. Previous clips were just me randomly recording a station for 10 sec. Probably not OK for me to upload a full recorded broadcast (copyright), but short clips should be OK. Let me know the length you need, and I'll see what I can do.
Just a couple minutes would be fine as long as it encapsulates the problem in a reproducible way.
The existing clips I already uploaded don't exhibit this AV sync issue? I found it was off from the start, even on PC now.
The cooking one was perfect w/ 1.0.2.2 (didn't test w/ 1.0.2.3), the other one is too short for me to tell for sure.
Here is a short clip of about 15 seconds with a talking head. The AV sync from QSTranscode'd output (to MP4) is off immediately on PC playback via Media Player Classic.
BTW, this clip does not lock up LookAhead. Looks like only long clips do that.
Thanks
1024 should fix this issue. I had to make significant changes to the way input timestamps are handled* so it's possible that other issues were introduced. I'm traveling at the moment so I didn't test it with many files (only have a couple clips with me). So if you could help out with some testing I'd appreciate it. Also, I think I figured out why Ffmpeg 2+ was leaking memory, so it's back in as well.
The news.ts file (talking head) attached to this ticket is still way off sync with 1024. Appears to be no change from 1023 actually.
What player/SW are you using? I was using WMP to test it.
It might be a driver thing. My laptop is pretty old so it doesn't get many new drivers, but I'll install the latest and see if it behaves differently.
I use MPC-HC to play the files. Nvidia 570 GPU. Sandy bridge 2600k CPU.
You're using a more modern system to do the transcoding? The MSDK's behavior can vary b/w driver versions, so that might be why we're seeing different results. I updated the drivers on my SNB laptop and the A/V is working the same as before (good). I might be able to scare up an IVB system to run it on and see if the timestamps are different.
I transcode on an i3 Haswell NUC. I cannot transcode on the SNB as it has a MB with discrete video card. The NUC is my 'server' (transcode, record), while the SNB is my 'client' (playback).
There was a behavioral difference b/w SNB & IVB/HSW. 1025 takes this into account and is a little smarter (I think) with how it handles DTS/PTS. Hopefully you can reproduce and it doesn't break anything :).
Didn't have time to try SNB. However, on both HSW and a Chromebook, the AV
is now in sync for the news.ts file. Unfortunately, the frame rate appears
halved now. So it's not really playable this way either.
On Mon, Dec 30, 2013 at 7:07 PM, babgvant babgvant@users.sf.net wrote:
I can't think of a reason why the framerate would have changed. IIRC, this clip is interlaced so the default behavior is to DI to 30p.
Surprised myself. That's why I tried playing back directly on the Haswell NUC server. Looks like 15fps or less. Probably it is still 30fps, but the PTSs are doubled up or something along that line.
Perhaps it's an ffmpeg thing. Showed same low frame rate playback on a Haswell chromebook.
Dave.
Try 1.0.2.6. 29.97 interlaced content should really be rendered (or in this case encoded) @59.94 when deinterlaced so the default behavior has been changed to reflect that.
The ZIP file for 1026 is corrupt.
Dave.
On Sat, Jan 4, 2014 at 3:45 PM, babgvant babgvant@users.sf.net wrote:
Uploaded again.