View Full Version : Demuxing on Mac OS X -> sync problems

03-31-2003, 05:34 PM
Hi there... Trying to figure out how best to convert a TyStream to a QuickTime formatted file (using any variety of codec QT Pro allows for export, including Sorenson, H.263, MPEG-4 w/ ACC, etc.).

I've exported Tys with mfs_export and mfsstream, and when converting to a muxed MPEG with the OS X-compiled tyc (from http://www.fajkowski.com/tivo/) or jdiner's mac_vsplitmux2c1 (http://themurrays.homeip.net/downloads/tivo/for_mac), the file plays just fine in QuickTime with the MPEG-2 plug-in. Unfortunately the QuickTime MPEG-2 can't do demuxing, so it can't export/convert the file to other formats.

I've tried demuxing the muxed file with mpgtx (http://www.biermann.org/philipp/mpegcut/), as well as using mac_vsplit to do it. Then I convert the mp2->wav with mpg123.

QuickTime will play the demuxed file(s), but the sync is consistently off by maybe half a second or more.

I want to downconvert the files to save space, maybe play it on handheld platform. But this sync problem is really a pisser. Any ideas on where things are falling out of sync? Could it be mpg123? Or is it just the nature of multiplexed and Ty'ed streams? (As touched upon by jdiner here: http://lists.merlins.org/archives/extractstream/2002-May/001623.html)

From what I've read on the forums, it seems like the Windows tools don't have these sync problems. Anybody know what's up with that?



04-03-2003, 05:04 AM
Ok, so apparently I needed to dig up a copy of tydemux, which later was rolled into TyStudio which unfortunately doesn't have a Mac port yet. Is that right?

I only dug far enough to find version 0.4.2 here: http://www.dealdatabase.com/forum/showthread.php?s=&threadid=20056&perpage=15&highlight=tydemux&pagenumber=27

Is that the latest?

Anywho, tydemux provides the following output after demuxing:

A/V Sync Offset: -013ms (i.e. audio plays 013ms late use -O 013 in mplex)

Apparently sox lets you trim files from the command line, but alas, I didn't feel like downloading the compiler and building it tonight. So after using mpg123 to convert to wav, I opened the file up in Audacity and trimmed 13ms (or so) off, fired up the mpg in QuickTime, and voila -- sync!!

Now if only I could get sox or some other command-line utility to work, I could cobble some kind of perl script together that takes the Offset out of tydemux and feeds it to a command-line trimmer for automatic trimming.

(From there it's easy enough to use QuickTime Pro itself to snip out commercials and then export to MPEG-4 or somesuch. I haven't even thought about how to get it onto DVD yet, but there's plenty of good guides, I know. :-)

04-04-2003, 09:37 PM
sox works fine. You can get a pkg installer of if from the opendarwin wedav server at http://packages.opendarwin.org I built it myself from source without any problem-- so either way you should be able to get it up and running.