Wowza Community

Output at fixed framerate?

We have users connecting into our Wowza instance with unknown framerates.
We’re then transcoding the source and outputting it.

We’d like to force the output to be a maximum of 30fps regardless of the input framerate.
Can this be done?

I know there’s the docs about using SkipFrameCount however this seems to require us to know the incoming framerate which we do not know.

Hello @Webfox_Developers. This is all I have for you at this time:

With the current version of WSE, you can have the transcoder output a constant frame rate using the Missing Frame concealment feature:

https://www.wowza.com/docs/replace-missing-video-frames-to-ensure-a-consistent-frame-rate

It does have some limitations but it may work for you. If the actual frame rate is close to the required frame rate, then it won’t be adjusted, but if you are sending a 10fps and you want 30fps, then that should work.

Thank you @Rose_Power-Wowza_Com,

Do you know if this method can be used to reduce the number of frames?
E.g. if they send 60 and we only want to output 30 (again noting that we don’t know the input framerate)?

Yes you can control that in the Engine transcoder.

Do you have more information on this?
I’ve tried many things including setting StrictFrameRate to true, but with an input stream of 60fps, my output streams still remain at 60fps.

Interestingly I tried changing my input stream to 10fps, and the output stream was 10fps rather than 30fps (with frames repeated multiple times) as I had expected. I did see the following message -

TranscoderFrameManager.onFrame: Inserting 1 frames due to not receiving a frame in over 500ms.

So assumedly it is doing something, just not what I’m expecting.

This is our transcoder template

<?xml version="1.0" encoding="UTF-8"?>
<Root version="1">
	<Transcode>
		<Description>Default transrate.xml file</Description>
		<PostProcess>
			<SortBuffer>
				<Enable>true</Enable>
				<!-- milliseconds -->
				<BufferSize>750</BufferSize>
				<FlushInterval>75</FlushInterval>
			</SortBuffer>
		</PostProcess>
		<Encodes>
                    <Encode>
				<Name>1080p</Name>
				<Enable>true</Enable>
				<Description></Description>
				<StreamName>mp4:${SourceStreamName}_1080p</StreamName>
				<Video>
					<Codec>H.264</Codec>
					<Implementation>Beamr</Implementation>
					<GPUID>-1</GPUID>
					<Profile>high</Profile>
					<Bitrate>6000000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>0</Interval>
					</KeyFrameInterval>
					<FrameSize>
						<FitMode>fit-height</FitMode>
						<Width>1280</Width>
						<Height>1080</Height>
						<Crop>0,0,0,0</Crop>
						<SourceRectangle></SourceRectangle>
					</FrameSize>
					<Overlays>
					</Overlays>
				</Video>
				<Audio>
					<Codec>AAC</Codec>
					<Bitrate>64000</Bitrate>
				</Audio>
			</Encode>
			<!-- Setup for 720p, high bandwith, main profile for desktop or set-top box -->
			<Encode>
				<Enable>true</Enable>
				<Name>720p</Name>
				<StreamName>mp4:${SourceStreamName}_720p</StreamName>
				<Video>
					<!-- H.263, H.264, H.265, VP8, VP9, PassThru, Disable -->
					<Codec>H.264</Codec>
					<!-- default, Beamr, QuickSync, NVENC -->
					<Implementation>Beamr</Implementation>
					<GPUID>-1</GPUID>
					<FrameSize>
						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
						<FitMode>fit-height</FitMode>
						<Width>1280</Width>
						<Height>720</Height>
						<!-- <Crop>0,0,0,0</Crop> -->
						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
						<Crop>0,0,0,0</Crop>
						<SourceRectangle></SourceRectangle>
					</FrameSize>
					<!-- baseline, main, high -->
					<Profile>high</Profile>
					<Bitrate>3000000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>0</Interval>
					</KeyFrameInterval>
					<Overlays>
					</Overlays>
					<Parameters></Parameters>
				</Video>
				<Audio>
					<!-- AAC, Vorbis, Opus, PassThru, Disable -->
					<Codec>AAC</Codec>
					<Bitrate>64000</Bitrate>
					<Parameters></Parameters>
				</Audio>
				<Properties>
				</Properties>
				<Description></Description>
			</Encode>
			<!-- Setup for 360p, high bandwith, main profile for desktop -->
			<Encode>
				<Enable>true</Enable>
				<Name>360p</Name>
				<StreamName>mp4:${SourceStreamName}_360p</StreamName>
				<Video>
					<!-- H.263, H.264, H.265, VP8, VP9, PassThru, Disable -->
					<Codec>H.264</Codec>
					<!-- default, Beamr, QuickSync, NVENC -->
					<Implementation>Beamr</Implementation>
					<GPUID>-1</GPUID>
					<FrameSize>
						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source -->
						<FitMode>fit-height</FitMode>
						<Width>640</Width>
						<Height>360</Height>
						<!-- <Crop>0,0,0,0</Crop> -->
						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
						<Crop>0,0,0,0</Crop>
						<SourceRectangle></SourceRectangle>
					</FrameSize>
					<!-- baseline, main, high -->
					<Profile>high</Profile>
					<Bitrate>365000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>0</Interval>
					</KeyFrameInterval>
					<Overlays>
					</Overlays>
					<Parameters></Parameters>
				</Video>
				<Audio>
					<!-- AAC, Vorbis, Opus, PassThru, Disable -->
					<Codec>AAC</Codec>
					<Bitrate>64000</Bitrate>
					<Parameters></Parameters>
				</Audio>
				<Properties>
				</Properties>
				<Description></Description>
			</Encode>
			<!-- Setup for 240p, medium bandwidth, baseline profile -->
			<Encode>
				<Enable>false</Enable>
				<Name>240p</Name>
				<StreamName>mp4:${SourceStreamName}_234p</StreamName>
				<Video>
					<!-- H.263, H.264, H.265, VP8, VP9, PassThru, Disable -->
					<Codec>H.264</Codec>
					<!-- default, Beamr, QuickSync, NVENC -->
					<Implementation>Beamr</Implementation>
					<GPUID>-1</GPUID>
					<FrameSize>
						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source  -->
						<FitMode>fit-height</FitMode>
						<Width>416</Width>
						<Height>234</Height>
						<!-- <Crop>0,0,0,0</Crop> -->
						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
					</FrameSize>
					<!-- baseline, main, high -->
					<Profile>baseline</Profile>
					<Bitrate>145000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>60</Interval>
					</KeyFrameInterval>
					<Overlays>
					</Overlays>
					<Parameters></Parameters>
				</Video>
				<Audio>
					<!-- AAC, Vorbis, Opus, PassThru, Disable -->
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
					<Parameters></Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
			<!-- Setup for 160p, low bandwith, baseline profile for 3G mobile devices such as iOS, Android, Blackberry -->
			<Encode>
				<Enable>true</Enable>
				<Name>160p</Name>
				<StreamName>mp4:${SourceStreamName}_160p</StreamName>
				<Video>
					<!-- H.263, H.264, H.265, VP8, VP9, PassThru, Disable -->
					<Codec>H.264</Codec>
					<!-- default, Beamr, QuickSync, NVENC -->
					<Implementation>Beamr</Implementation>
					<GPUID>-1</GPUID>
					<FrameSize>
						<!-- letterbox, fit-width, fit-height, crop, stretch, match-source  -->
						<FitMode>fit-height</FitMode>
						<Width>284</Width>
						<Height>160</Height>
						<!-- <Crop>0,0,0,0</Crop> -->
						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
						<Crop>0,0,0,0</Crop>
						<SourceRectangle></SourceRectangle>
					</FrameSize>
					<!-- baseline, main, high -->
					<Profile>baseline</Profile>
					<Bitrate>105000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>0</Interval>
					</KeyFrameInterval>
					<Overlays>
					</Overlays>
					<Parameters></Parameters>
				</Video>
				<Audio>
					<!-- AAC, Vorbis, Opus, PassThru, Disable -->
					<Codec>AAC</Codec>
					<Bitrate>64000</Bitrate>
					<Parameters></Parameters>
				</Audio>
				<Properties>
				</Properties>
				<Description></Description>
			</Encode>
		</Encodes>
		<Decode>
			<Debug>true</Debug>
			<Video>
				<!-- default, Beamr, QuickSync, CUDA, NVCUVID -->
				<Implementation>Beamr</Implementation>
				<Deinterlace>false</Deinterlace>
				<InputBufferTime>240</InputBufferTime>
		                <MinimumFrameRate>30</MinimumFrameRate>
                		<StrictFrameRate>true</StrictFrameRate>
				<Overlays>
					<Overlay>
						<Enable>false</Enable>
						<Name>WowzaLogo</Name>
						<Index>0</Index>
						<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
						<CheckForUpdates>false</CheckForUpdates>
						<Opacity>100</Opacity>
						<Location>
							<X>4</X>
							<Y>4</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>
				<Parameters></Parameters>
			</Audio>
			<Properties>
			</Properties>
		</Decode>
		<Scale>
			<!-- default, CUDA -->
			<Implementation>default</Implementation>
			<Parameters></Parameters>
			<Properties>
			</Properties>
		</Scale>
		<StreamNameGroups>
			<!-- Note: Play stream using stream name ngrp:[stream-name] -->
			<StreamNameGroup>
				<Name>all</Name>
				<StreamName>${SourceStreamName}_all</StreamName>
				<Members>
					<Member>
						<MemberName>1080p</MemberName>
						<EncodeName>1080p</EncodeName>
						<MediaListRendition>
							<WowzaVideoOnly>false</WowzaVideoOnly>
							<WowzaAudioOnly>false</WowzaAudioOnly>
						</MediaListRendition>
					</Member>
					<Member>
						<MemberName>720p</MemberName>
						<EncodeName>720p</EncodeName>
						<MediaListRendition>
							<WowzaVideoOnly>false</WowzaVideoOnly>
							<WowzaAudioOnly>false</WowzaAudioOnly>
						</MediaListRendition>
					</Member>
					<Member>
						<MemberName>360p</MemberName>
						<EncodeName>360p</EncodeName>
						<MediaListRendition>
							<WowzaVideoOnly>false</WowzaVideoOnly>
							<WowzaAudioOnly>false</WowzaAudioOnly>
						</MediaListRendition>
					</Member>
					<Member>
						<MemberName>240p</MemberName>
						<EncodeName>240p</EncodeName>
						<MediaListRendition>
							<WowzaVideoOnly>false</WowzaVideoOnly>
							<WowzaAudioOnly>false</WowzaAudioOnly>
						</MediaListRendition>
					</Member>
					<Member>
						<MemberName>160p</MemberName>
						<EncodeName>160p</EncodeName>
						<MediaListRendition>
							<WowzaVideoOnly>false</WowzaVideoOnly>
							<WowzaAudioOnly>false</WowzaAudioOnly>
						</MediaListRendition>
					</Member>
				</Members>
				<Description></Description>
			</StreamNameGroup>
			<StreamNameGroup>
				<Name>mobile</Name>
				<StreamName>${SourceStreamName}_mobile</StreamName>
				<Members>
					<Member>
						<MemberName>240p</MemberName>
						<EncodeName>240p</EncodeName>
					</Member>
					<Member>
						<MemberName>160p</MemberName>
						<EncodeName>160p</EncodeName>
					</Member>
				</Members>
			</StreamNameGroup>
		</StreamNameGroups>
		<Properties>
		</Properties>
	</Transcode>
</Root>

I do not unfortunately. You’ll need to interact with Wowza technical support for them to walk through the setup and get it working for you. It’s a standard 48 hr business day response time so if you send in a support ticket today, you might not hear back until Monday unless you have a premium plan.

Hope we can get it resolved for you though asap!