Re: [Mlt-devel] New avsync module
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <da...@de...> - 2013-02-26 06:20:25
|
On Mon, Feb 25, 2013 at 8:45 PM, Brian Matherly <pez...@ya...> wrote: > Dan, > > I added a new module: avsync. It has one producer and one consumer. The producer generates a stream with a classic blip/flash pattern. The consumer attempts to detect the blip/flash and calculate the audio/video sync. The consumer will report the caluclated lipsync in milliseconds. A positive number indicates that audio leads video. A negative number indicates that audio lags video. > > The module can test itself: > > melt -silent -profile atsc_720p_30 blipflash -consumer blipflash > avsync = 0.00 > > Obviously, 0 is perfect sync. > > It is interesting to round-trip the pattern through some various encodings: > > melt -profile atsc_720p_30 blipflash -consumer avformat:test.avi > melt -silent test.avi -consumer blipflash > avsync = -23.02 > > melt -profile atsc_720p_30 blipflash -consumer avformat:test.mpg > melt -silent test.mpg -consumer blipflash > avsync = -10.02 > > melt -profile atsc_720p_30 blipflash -consumer avformat:test.mkv > melt -silent test.mkv -consumer blipflash > avsync = 0.00 > > melt -profile atsc_720p_30 blipflash -consumer avformat:test.mov acodec=ac3 > melt -silent test.mov -consumer blipflash > avsync = -5.33 > > melt blipflash -consumer libdv:test.dv > melt -silent test.dv -consumer blipflash > avsync = -40.00 > It is interesting to note that melt blipflash -consumer libdv:test.dv gives 0.00, which lends itself to a possible off-by-one error in the avformat producer since this is PAL, which is 40ms per frame. -- +-DRD-+ |