Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleHow to receive a stream and encode it into a file
linenumberstrue
video = ACCESS({source='Video', 
				 wrapper='GenericPull', 
				 transport='none', 
				 protocol='FFmpegVideoStream', 
				 datahandler='Tuple',
				 options=[
							['streamUrl', 'udp://127.0.0.1:12345'],
							['timeStampMode', 'none']
					     ],					     
				schema=	 [	
							['image', 			'IMAGEJCV']        					
        				 ]})
 
/// or shorter, as a source operator:
video = FFMPEGVIDEO({source='Video', options=[['streamUrl', 'udp://127.0.0.1:12345'],
                                              ['timeStampMode', 'none']]})
 
output = SENDER({sink='File',
				wrapper='GenericPush',
				transport='none',
				protocol='FFmpegVideoStream',
				dataHandler='Tuple',
				options=[	['framerate', '30.0'],
							['streamUrl', 'video.mp4'],
							['videoCodec', '13']
						]
				}, video)

...