[FFmpeg-user] stream frames using Ethernet camera

Anatoly anatoly at kazanfieldhockey.ru
Fri Sep 1 00:27:47 EEST 2023


On Thu, 31 Aug 2023 16:27:47 +0200
"Naveen.B" <navins.2006 at gmail.com> wrote:

> Hello,
> 
> I have an ethernet camera connected to my ethernet port and I need to
> stream those Images using ffmpeg command,
> source address: 192.168.9.78
> UDP port: 5004
> 
> ffmpeg command: ffmpeg eth0 -i udp://192.168.9.78:5004
> error:
> C:\Naveen\projects\DMS\software\ffmpeg_full\ffmpeg\bin>ffmpeg eth0 -i
> udp:// 192.168.9.78:5004
what is 'eth0'?
> ffmpeg version 2022-06-20-git-56419428a8-full_build-www.gyan.dev
...snip...
> [udp @ 000002a7b2923c00] bind failed: Error number -10048 occurred
> udp://192.168.9.78:5004: Unknown error
Obviously, this does mean that ffmpeg can't start listen for incoming
connection on 192.168.9.78 port 5004. Do you have 92.168.9.78 on your
machine?
I think it is very unlikely that -i udp:// is what you want. Because
using 'raw' UDP you can't 'establish connection' from PC to camera. This
is because there's no such a thing in UDP itself.
Roughly saying, with UDP, tranmitter side just blindly sends packets
from it's ip:port to receiver's ip:port without even knowing if there
receiver is present at all.
Doing this way, you theoretically must input your PCs ip:port
somewhere in camera settings, because this in the only way for camera
to know where to send packets (PC just can't 'connect' with 'raw' UDP).
That's why upper level protocol (running on top of UDP) is typycally
used for negotitating/establishing connection with camera, such as
rtsp, rtp...
So probably you need something like
ffmpeg -rtsp_transport udp -i
'rtsp://USERNAME:PASSWORD@IPADDRESS:PORT/stream-url'
Look at your camera manual, if available, to find out which protocol
camera use.
ffmpeg protocols documentation:
https://ffmpeg.org/ffmpeg-protocols.html



More information about the ffmpeg-user mailing list