Versions Compared

Key

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

...

This example shows how to receive a video stream and write it to an mp4 video file using the MPEG-4 codec (13).

 

PQL

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']        					
        				 ]})
output = SENDER({sink='File',
				wrapper='GenericPush',
				transport='none',
				protocol='FFmpegVideoStream',
				dataHandler='Tuple',
				options=[	['framerate', '30.0'],
							['streamUrl', 'video.mp4'],
							['videoCodec', '13']
						]
				}, video)

...