Currently attempting to stream a video via ffmpeg to a udp stream by piping rawvideo directly into ffmpeg using ffmpeg.stdin.write(data)
. Here are my specified options/parameters:
var ffmpegArgs = [
'-c:v', 'rawvideo',// input container
'-f', 'rawvideo',
'-pix_fmt', 'rgba', // input pixel format
'-s', '600x600', //input size
'-video_size', '600x600',
'-i', 'pipe:0', // input source
'-format', 'mpegts', // output container format
'-c:v', 'libx264', // output video codec
'-b:v', '2m', // output bitrate
'udp://239.255.123.46:1234' // output destination
];
A puzzling issue arises when attempting to start the process, as an error pops up stating
Unable to find a suitable output format for 'udp://239.255.123.46:1234'
. Strangely, if I change the output to a filename like video.mp4
, the video records and renders perfectly fine, ready to be viewed after stopping.
Why does the UDP streaming not function properly? Any thoughts or suggestions? Oddly enough, running FFMPEG through command line with a video and utilizing the same UDP stream address works flawlessly.
What might be causing this issue?