Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Record transcoded stream

  1. #1
    Join Date
    Jun 2012
    Posts
    15

    Default Record transcoded stream

    I would like to record a transcoded stream (which currently is recorded to flv aswell). I can't get it to record the transcoded flvs, or at least I'm not seeing it. I have attached part of application.xml and complete transcode.xml. Does anyone have an idea what I'm doing wrong? If you have questions or would like to see other files please let me know.

    Transcoding is installed, I can see this in the logs

    2012-06-13	13:37:25	CEST	comment	server	INFO	200	-	Transcoder Streams Available: Unlimited
    2012-06-13	13:37:25	CEST	comment	server	INFO	200	-	Transcoder Watermark: No
    My Application.xml look like this:

    <Streams>
    
    			<StreamType>default</StreamType>
    
    			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
    
    			<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
    
    			<LiveStreamPacketizers></LiveStreamPacketizers>
    
    			<Properties>
    				<!-- <Property>
    					<Name>seekTarget</Name>
    					<Value>enhanced</Value>
    				</Property> -->
    			</Properties>
    
    		</Streams>
    
    		<Transcoder>
    
    			<LiveStreamTranscoder>transcoder</LiveStreamTranscoder>
    
    			<Templates>${SourceStreamName}.xml,transrate.xml</Templates>
    
    			<ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
    
    			<TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
    
    			<Properties>
    
    			</Properties>
    
    		</Transcoder>
    and my transcode.xml:

    <Root>
    
    	<Transcode>
    
    		<Encodes>
    
    			<Encode>
    
    				<Enable>true</Enable>
    
    				<Name>large</Name>
    
    				<StreamName>flv:${SourceStreamName}_large</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>fit-height</FitMode>
    
    						<!--<Width>576</Width>-->
    
    						<!--<Height>432</Height>-->
    
    						<!-- <Crop>0,0,0,0</Crop> -->
    
    						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
    
    					</FrameSize>
    
    					<Profile>main</Profile>
    
    					<Bitrate>130000</Bitrate>
    
    					<KeyFrameInterval>
    
    						<FollowSource>false</FollowSource>
    
    						<Interval>2</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>AAC</Codec>
    
    					<Bitrate>96000</Bitrate>
    
    				</Audio>
    
    				<Properties>
    
    				</Properties>
    
    			</Encode>
    
    			<!-- Setup for 360p, high bandwith, main profile for desktop -->
    
    			<Encode>
    
    				<Enable>true</Enable>
    
    				<Name>small</Name>
    
    				<StreamName>flv:${SourceStreamName}_small</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>fit-height</FitMode>
    
    						<!-- <Width>384</Width> -->
    
    						<!-- <Height>288</Height> -->
    
    						<!-- <Crop>0,0,0,0</Crop> -->
    
    						<!-- <SourceRectangle>0,0,320,240</SourceRectangle> -->
    
    					</FrameSize>
    
    					<Profile>main</Profile>
    
    					<Bitrate>85000</Bitrate>
    
    					<KeyFrameInterval>
    
    						<FollowSource>false</FollowSource>
    
    						<Interval>1</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>AAC</Codec>
    
    					<Bitrate>96000</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>large</EncodeName>
    
    					</Member>
    
    					<Member>
    
    						<EncodeName>small</EncodeName>
    
    					</Member>
    
    				</Members>
    
    			</StreamNameGroup>
    
    		</StreamNameGroups>
    
    		<Properties>
    
    		</Properties>
    
    	</Transcode>
    
    </Root>

  2. #2

    Default

    Hi Dennis,

    Two things I notice:

    1. Your application.xml specifies the "default" StreamType which is only for VOD streaming. The transcoder as far as I know only works with "live" StreamTypes. Are you transcoding sucessfully with a "default" StreamType?
    2. The StreamType should be one of the *record StreamTypes mentioned in the Wowza User Guide. Are you trying to record using some other method?

  3. #3
    Join Date
    Jun 2012
    Posts
    15

    Default

    Hi Randall,

    We are currently recording a rtmp stream from the flash player, this gets recorded to an flv with the above settings. This works, but I want to transcode the stream because I need more and above all consistent keyframes in the .flv, but I can't get it to work. If I change the streamtype to live-record it doesn't record anymore. Should the server be restarted?

    The install is handled by our hosting provider, but they don't support the settings and transcoding.

  4. #4

    Default

    Technically, only the application needs to be restarted. (I think) But, when testing it's good practice just to restart Wowza.

    Ahh, I think I understand now. You're using ActionScript commands in your Flash app like so: nsPublish.publish ("myStream", "record"); In that case, "default" is correct.

    "If I change the streamtype to live-record it doesn't record anymore."

    If you omit the "record" part in your publish command, it should work. Take a look at the flash source in this example for how to integrate Flash publishing and the Wowza Transcoder.

  5. #5
    Join Date
    Jun 2012
    Posts
    15

    Default

    Hi Randall,

    recording from flash is not my issue, but getting transcoded flvs in the content folder is. It has been recording flvs, but I also need another transcoded flv in the content folder. I've checked all the documentation and my Actionscript is the same as your example. The only thing I've found is the streamtype and a patch used in your example. Should I change the streamtype (currently default)? Should we try the patch? Is it something else?

  6. #6
    Join Date
    Jun 2011
    Posts
    1,037

    Default

    You'll need a StreamType of live-record, as Randall highlights above, as the Transcoder and recoding only acts on live streams.
    You'll also need to omitt the "record" part in your publish command.

    To record to flv, you just need to specify flv: at the beginning of your StreamName in FMLE or Wirecast. That will take care of the
    input stream at least. To record Transcoded streams to .flv you need to specify the prefix of flv: (instead of mp4 for each StreamName in the transcoder/templates
    files (such as transrate.xml or transcode.xml).
    Example:
    from:
    <StreamName>mp4:${SourceStreamName}_160p</StreamName>
    To:
    <StreamName>flv:${SourceStreamName}_160p</StreamName>

  7. #7
    Join Date
    Jun 2012
    Posts
    15

    Default

    Well, we've managed to get transcoding up and running. BUT, the keyframe interval can't be set higher then the initial stream. Is there something we're doing wrong? I want a keyframe every 2 frames, but when I set "this._camera.setKeyFrameInterval(60);" in AS. It seems impossible to get more keyframes from transcoding because from AS it is unreliable. It drops keyframes when the clients doesn't have enough upstream. I was told in another thread that it would be possible with transcoding, but how?

  8. #8

    Default

    Sorry Dennis,

    Check the <KeyFrameInterval> property in your transcoder template. Check the Wowza tutorials Transcoder section for more info.

    Some hints for flash encoding: Try lowering your stream bitrate, for example, by increasing the keyframe interval, lowering quality (or explicit bitrate), and decreasing framerate. 30fps seems too high for webcams and home user upload bandwidth, in my opinion. Try 15 FPS. FYI, I see flash encoding drop down to 4-5FPS frequently.

    Did you want a keyframe every 2 frames, or every 2 seconds?

  9. #9
    Join Date
    Jun 2012
    Posts
    15

    Default

    Hi Randall,

    I need high image quality and a high framerate to record fast movement. And I need a lot of keyframes to time and synch the recorded videos. I've deliberately set the keyframeinterval to 60 in flash so I could test if transcoding would produce videos with a desired interval of 2. It doesn't seem to matter what interval I set, it stays the same as the original video. Is there another setting I'm missing?
    Last edited by dennisderooy; 06-25-2012 at 05:34 AM.

  10. #10
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Wowza is not going to be able to improve the stream for fast movement in the Transcoder. You should set frame rate, and key frame frequency on the encoder side.

    Richard

Page 1 of 2 12 LastLast

Similar Threads

  1. Record only transcoded stream automatically
    By wotan192 in forum AddOn: Transcoder
    Replies: 4
    Last Post: 09-26-2015, 12:52 PM
  2. Accessing Transcoded Stream
    By nkarnick in forum Live Streaming and Encoder Discussion
    Replies: 7
    Last Post: 01-02-2013, 10:51 AM
  3. How to choose to record or not to record a live stream with a plugin
    By enricod75 in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 12-09-2012, 05:53 AM
  4. getQueryStr() of transcoded stream
    By arpan_synapse in forum AddOn: Transcoder
    Replies: 19
    Last Post: 07-30-2012, 07:19 AM
  5. Record live transcoded streams
    By german in forum AddOn: Transcoder
    Replies: 1
    Last Post: 11-21-2011, 12:34 PM

Posting Permissions

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