Results 1 to 9 of 9

Thread: Flash Player, Adaptive Bitrate, and Audio Sync. Issues

  1. #1
    Join Date
    Feb 2011
    Posts
    15

    Question Flash Player, Adaptive Bitrate, and Audio Sync. Issues

    We have Wowza 3.0.5 build1220 and we use the transcoder addon to deliver adaptive bitrate streams. We have noticed a slight audio sync delay, by just a handful of frames, in Flash Player versions 11.1.x and lower (v11.2.x plays fine). We have tried enabling and disabling hardware acceleration.

    For encoding, we use the latest version of Wirecast to push h264, 30fps (to match capture card), and AAC at 44.1kHz.

    Has anyone here experienced this same issue, or have ideas about fixing this problem?

  2. #2
    Join Date
    Sep 2011
    Posts
    1,601

    Default

    Hi
    Does this issue occur when playing the none transcoded stream?

    Jason

  3. #3
    Join Date
    Feb 2011
    Posts
    15

    Default

    No. If I play only, for instance, mp4:stream_high it will play with no sync. issues. If I reference the SMIL, smil:stream.smil, it will drift.

  4. #4
    Join Date
    Sep 2011
    Posts
    1,601

    Default

    Hi
    Have you tried changing the AAC to 22050 kHz?

    Does this happen when you're not using the .smil file?

    How many transcoder renditions are you publishing?
    Whats the source streams keyframes set to?

    At a guess if the above suggestions don't make a difference I'd say that the server is either to busy (struggling with the transcodes)
    Or the keyframes are to far apart in the source stream.

    Jason

  5. #5
    Join Date
    Feb 2011
    Posts
    15

    Default

    Thanks for your replies Jason. We only see the drifting with SMIL files, in non-11.2 flash players. We send AAC 44.1 kHz, and the video frame rate is 30 FPS.

    Our encoder setup is:
    cable wire > blackmagic decklink studio 2 > Wirecast h264+aac > Wowza+Transcoder Addon

    Player setup:
    Flash Player > CDN > Wowza+Transcoder Addon

    Our wowza server can handle this stream config., it sits at about 10-15% cpu usage during the encode.

    Transrate.xml
    Code:
    <Root>
    	<Transcode>
    		<Encodes>
    			<!-- Example Encode block for source, not required unless Member of StreamNameGroup. --> 
    			<Encode>
    				<Enable>false</Enable>
    				<Name>source</Name>
    				<StreamName>mp4:${SourceStreamName}_source</StreamName>
    				<Video>
    					<!-- H.264, PassThru, Disable -->
    					<Codec>PassThru</Codec>
    					<Bitrate>${SourceVideoBitrate}</Bitrate>
    					<Parameters>
    					</Parameters>
    				</Video>
    				<Audio>
    					<!-- AAC, PassThru, Disable -->
    					<Codec>PassThru</Codec>
    					<Bitrate>${SourceAudioBitrate}</Bitrate>
    				</Audio>
    				<Properties>
    				</Properties>
    			</Encode>
    			<Encode>
    				<Enable>true</Enable>
    				<Name>high</Name>
    				<StreamName>mp4:${SourceStreamName}_high</StreamName>
    				<Video>
    					<!-- H.264, PassThru, Disable -->
    					<Codec>H.264</Codec>
    					<!-- default, CUDA, QuickSync -->
    					<Transcoder>default</Transcoder>
    					<GPUID>-1</GPUID>
    					<FrameSize>
    						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
    						<FitMode>match-source</FitMode>
    						<Width>640</Width>
    						<Height>360</Height>
    						<!-- <Crop>0,0,0,0</Crop> -->
    						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
    					</FrameSize>
    					<Profile>main</Profile>
    					<Bitrate>1500000</Bitrate>
    					<KeyFrameInterval>
    						<FollowSource>false</FollowSource>
    						<Interval>60</Interval>
    					</KeyFrameInterval>
    					<Overlays>
    						<Overlay>
    							<Enable>false</Enable>
    							<Index>0</Index>
    							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
    							<Opacity>100</Opacity>
    							<Location>
    								<X>5</X>
    								<Y>5</Y>
    								<Width>${ImageWidth}</Width>
    								<Height>${ImageHeight}</Height>
    								<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
    								<Align>left,top</Align>
    							</Location>
    						</Overlay>
    					</Overlays>
    					<Parameters>
    					</Parameters>
    				</Video>
    				<Audio>
    					<!-- AAC, PassThru, Disable -->
    					<Codec>PassThru</Codec>
    					<Bitrate>${SourceAudioBitrate}</Bitrate>
    				</Audio>
    				<Properties>
    				</Properties>
    			</Encode>
    			<Encode>
    				<Enable>true</Enable>
    				<Name>medium</Name>
    				<StreamName>mp4:${SourceStreamName}_medium</StreamName>
    				<Video>
    					<!-- H.264, PassThru, Disable -->
    					<Codec>H.264</Codec>
    					<!-- default, CUDA, QuickSync -->
    					<Transcoder>default</Transcoder>
    					<GPUID>-1</GPUID>
    					<FrameSize>
    						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source  -->
    						<FitMode>match-source</FitMode>
    						<Width>640</Width>
    						<Height>360</Height>
    						<!-- <Crop>0,0,0,0</Crop> -->
    						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
    					</FrameSize>
    					<Profile>main</Profile>
    					<Bitrate>800000</Bitrate>
    					<KeyFrameInterval>
    						<FollowSource>false</FollowSource>
    						<Interval>60</Interval>
    					</KeyFrameInterval>
    					<Overlays>
    						<Overlay>
    							<Enable>false</Enable>
    							<Index>0</Index>
    							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
    							<Opacity>100</Opacity>
    							<Location>
    								<X>5</X>
    								<Y>5</Y>
    								<Width>${ImageWidth}</Width>
    								<Height>${ImageHeight}</Height>
    								<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
    								<Align>left,top</Align>
    							</Location>
    						</Overlay>
    					</Overlays>
    					<Parameters>
    					</Parameters>
    				</Video>
    				<Audio>
    					<!-- AAC, PassThru, Disable -->
    					<Codec>PassThru</Codec>
    					<Bitrate>${SourceAudioBitrate}</Bitrate>
    				</Audio>
    				<Properties>
    				</Properties>
    			</Encode>
    			<Encode>
    				<Enable>true</Enable>
    				<Name>low</Name>
    				<StreamName>mp4:${SourceStreamName}_low</StreamName>
    				<Video>
    					<!-- H.264, PassThru, Disable -->
    					<Codec>H.264</Codec>
    					<!-- default, CUDA, QuickSync -->
    					<Transcoder>default</Transcoder>
    					<GPUID>-1</GPUID>
    					<FrameSize>
    						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source  -->
    						<FitMode>match-source</FitMode>
    						<Width>640</Width>
    						<Height>360</Height>
    						<!-- <Crop>0,0,0,0</Crop> -->
    						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
    					</FrameSize>
    					<Profile>main</Profile>
    					<Bitrate>300000</Bitrate>
    					<KeyFrameInterval>
    						<FollowSource>false</FollowSource>
    						<Interval>60</Interval>
    					</KeyFrameInterval>
    					<Overlays>
    						<Overlay>
    							<Enable>false</Enable>
    							<Index>0</Index>
    							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
    							<Opacity>100</Opacity>
    							<Location>
    								<X>5</X>
    								<Y>5</Y>
    								<Width>${ImageWidth}</Width>
    								<Height>${ImageHeight}</Height>
    								<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
    								<Align>left,top</Align>
    							</Location>
    						</Overlay>
    					</Overlays>
    					<Parameters>
    					</Parameters>
    				</Video>
    				<Audio>
    					<!-- AAC, PassThru, Disable -->
    					<Codec>PassThru</Codec>
    					<Bitrate>${SourceAudioBitrate}</Bitrate>
    				</Audio>
    				<Properties>
    				</Properties>
    			</Encode>
    		</Encodes>
    		<Decode>
    			<Video>
    				<Deinterlace>false</Deinterlace>
    				<Overlays>
    					<Overlay>
    						<Enable>false</Enable>
    						<Index>0</Index>
    						<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
    						<Opacity>100</Opacity>
    						<Location>
    							<X>5</X>
    							<Y>5</Y>
    							<Width>${ImageWidth}</Width>
    							<Height>${ImageHeight}</Height>
    							<!-- horiz: left, right, hcenter - vert: top, bottom, vcenter -->
    							<Align>left,top</Align>
    						</Location>
    					</Overlay>
    				</Overlays>
    				<Parameters>
    				</Parameters>
    			</Video>
    			<Properties>
    			</Properties>
    		</Decode>
    		<StreamNameGroups>
    			<!-- Note: Play stream using stream name ngrp:[stream-name] -->
    			<StreamNameGroup>
    				<Name>${SourceStreamName}_all</Name>
    				<Members>
    					<Member>
    						<EncodeName>high</EncodeName>
    					</Member>
    					<Member>
    						<EncodeName>medium</EncodeName>
    					</Member>
    					<Member>
    						<EncodeName>low</EncodeName>
    					</Member>
    				</Members>
    			</StreamNameGroup>
    			<StreamNameGroup>
    				<Name>${SourceStreamName}_mobile</Name>
    				<Members>
    					<Member>
    						<EncodeName>medium</EncodeName>
    					</Member>
    					<Member>
    						<EncodeName>low</EncodeName>
    					</Member>
    					<!--
    					<Member>
    						<EncodeName>low</EncodeName>
    						<MediaListRendition>
    							<WowzaAudioOnly>true</WowzaAudioOnly>
    						</MediaListRendition>
    					</Member>
    					-->
    				</Members>
    			</StreamNameGroup>
    		</StreamNameGroups>
    		<Properties>
    		</Properties>
    	</Transcode>
    </Root>

  6. #6
    Join Date
    Sep 2011
    Posts
    1,601

    Default

    Hi
    Sorry if I wasn't clear, I would also like to know the time between Keyframes. I know normal frames are 30fps.
    Do you have 1 Keyframe every second?

    Have you tried the same scenario that has audio drift but with the audio configured to be 22050 kHz?

    If you play the transcoded stream with-out the .smil does it drift?

    Transcoder.xml:
    This is pass-through for audio on all renditions, have you tried setting this to be AAC (I know its AAC already, but worth a try)

    Jason

  7. #7
    Join Date
    Feb 2011
    Posts
    15

    Default

    I have keyframes set to 2 seconds (a value of 60 in the transrate.xml). The keyframes look aligned here, but is this log showing audio drift? I haven't tried 22 kHz yet, but I'll check that soon. Single streams seem to play without drift.

    Code:
    2012-04-13	16:17:08	LiveReceiver.keyframe[live_video_mbr/_definst_/42261_high]: dts:1924000 pts:1924000	-	-	-	3609.116
    2012-04-13	16:17:08	LiveReceiver.keyframe[live_video_mbr/_definst_/42261_medium]: dts:1924000 pts:1924000	-	-	-	3609.116
    2012-04-13	16:17:08	LiveReceiver.keyframe[live_video_mbr/_definst_/42261_low]: dts:1924000 pts:1924000	-	-	-	3609.116
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926094>1926123 || rt:1334333830760>1334333830833	-	-	-	3611.225
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926095>1926123 || rt:1334333830760>1334333830833	-	-	-	3611.225
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926117>1926123 || rt:1334333830761>1334333830833	-	-	-	3611.226
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926117>1926123 || rt:1334333830761>1334333830833	-	-	-	3611.226
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926117>1926123 || rt:1334333830761>1334333830833	-	-	-	3611.226
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926100>1926123 || rt:1334333830761>1334333830833	-	-	-	3611.226
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][true,false,75]: tc:1926118>1926123 || rt:1334333830833>1334333830833	-	-	-	3611.298
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][true,false,75]: tc:1926133>1926123 || rt:1334333830833>1334333830833	-	-	-	3611.298
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][true,false,75]: tc:1926118>1926123 || rt:1334333830833>1334333830833	-	-	-	3611.298
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926167>1926208 || rt:1334333830834>1334333830908	-	-	-	3611.299
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926141>1926193 || rt:1334333830834>1334333830908	-	-	-	3611.299
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926167>1926208 || rt:1334333830834>1334333830908	-	-	-	3611.299
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926133>1926193 || rt:1334333830834>1334333830908	-	-	-	3611.299
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926167>1926208 || rt:1334333830835>1334333830908	-	-	-	3611.3
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926141>1926193 || rt:1334333830834>1334333830908	-	-	-	3611.3
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926200>1926208 || rt:1334333830835>1334333830908	-	-	-	3611.3
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926141>1926193 || rt:1334333830835>1334333830908	-	-	-	3611.3
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926200>1926208 || rt:1334333830835>1334333830908	-	-	-	3611.301
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926164>1926193 || rt:1334333830835>1334333830908	-	-	-	3611.3
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][true,false,75]: tc:1926210>1926208 || rt:1334333830836>1334333830908	-	-	-	3611.301
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926167>1926193 || rt:1334333830836>1334333830908	-	-	-	3611.301
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926233>1926285 || rt:1334333830836>1334333830911	-	-	-	3611.301
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926167>1926193 || rt:1334333830836>1334333830908	-	-	-	3611.301	
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][true,false,75]: tc:1926200>1926193 || rt:1334333830836>1334333830908	-	-	-	3611.301
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][true,false,75]: tc:1926200>1926193 || rt:1334333830837>1334333830908	-	-	-	3611.302
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926200>1926275 || rt:1334333830837>1334333830911	-	-	-	3611.302
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926200>1926275 || rt:1334333830837>1334333830912	-	-	-	3611.302	
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926200>1926275 || rt:1334333830837>1334333830911	-	-	-	3611.302
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926211>1926275 || rt:1334333830838>1334333830912	-	-	-	3611.303	
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926211>1926275 || rt:1334333830838>1334333830911	-	-	-	3611.303
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926234>1926275 || rt:1334333830908>1334333830911	-	-	-	3611.374
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926234>1926285 || rt:1334333830909>1334333830911	-	-	-	3611.374
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926257>1926275 || rt:1334333830909>1334333830911	-	-	-	3611.374
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926234>1926275 || rt:1334333830909>1334333830912	-	-	-	3611.374	
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926257>1926275 || rt:1334333830909>1334333830911	-	-	-	3611.374
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926257>1926285 || rt:1334333830909>1334333830911	-	-	-	3611.374
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_high][false,false,75]: tc:1926266>1926275 || rt:1334333830910>1334333830911	-	-	-	3611.375
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926257>1926275 || rt:1334333830909>1334333830912	-	-	-	3611.374	
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_low][false,false,75]: tc:1926266>1926285 || rt:1334333830910>1334333830911	-	-	-	3611.375
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926257>1926275 || rt:1334333830910>1334333830912	-	-	-	3611.375	
    2012-04-13	16:17:10	LiveReceiver.checkFlush[live_video_mbr/_definst_/42261_medium][false,false,75]: tc:1926266>1926275 || rt:1334333830911>1334333830912	-	-	-	3611.376

  8. #8
    Join Date
    Sep 2011
    Posts
    1,601

    Default

    Hi
    Try setting the Keyframes to 1 every second, and let me know how you get on.
    Also report the results from 22kHz audio when you get round to it.

    Thanks
    Jason

  9. #9
    Join Date
    Dec 2007
    Posts
    28,369

    Default

    Use this property to debug key frame alignment

    http://www.wowza.com/forums/content....rame-alignment

    Revert to INFO level debugging with the above property.

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •