How to stream video capture in FFMPEG in RTSP?

Linux:

ffmpeg -re -i /dev/video0 -f rtsp -muxdelay 0.1 rtsp://127.0.0.1:1234/live.sdp
/usr/share/libdrm/amdgpu.ids: No such file or directory
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: –prefix= –prefix=/usr –disable-debug –disable-doc –disable-static –enable-cuda –enable-cuda-sdk –enable-cuvid –enable-libdrm –enable-ffplay –enable-gnutls –enable-gpl –enable-libass –enable-libfdk-aac –enable-libfontconfig –enable-libfreetype –enable-libmp3lame –enable-libnpp –enable-libopencore_amrnb –enable-libopencore_amrwb –enable-libopus –enable-libpulse –enable-sdl2 –enable-libspeex –enable-libtheora –enable-libtwolame –enable-libv4l2 –enable-libvorbis –enable-libvpx –enable-libx264 –enable-libx265 –enable-libxcb –enable-libxvid –enable-nonfree –enable-nvenc –enable-omx –enable-openal –enable-opencl –enable-runtime-cpudetect –enable-shared –enable-vaapi –enable-vdpau –enable-version3 –enable-xlib
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, video4linux2,v4l2, from ‘/dev/video0’:
Duration: N/A, start: 2487.058359, bitrate: 165888 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920×1080, 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg4 (native))
Press (q) to stop, (?) for help
(tcp @ 0x556468045840) Connection to tcp://127.0.0.1:1234?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 —
Conversion failed!

My real problem is streaming from the HDMI output of an NVR to a Mi TV Stick.

Because the RTSP outputs of the DVR using XMEYE are not good on Android TV. They get slow and bad.

If anyone has another solution, thank you.

Problem:

NVR -> HDMI -> USB CAPTURE -> LINUX (FFMPEG) -> RTSP -> —(wifi)—-> Mi TV Stick