Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Graphics, sound and multimedia • Re: Pi 5 + Camera for streaming

$
0
0
Hello

I've written a better script that works better. I've had it running for days now, with a slight time lag of about 0,5 seconds

rpicam-vid -b 700000 --autofocus-mode continuous --denoise cdn_off --brightness 0.1 --contrast 1.0 --sharpness 1.0 --level 4.2 --framerate 25 --width 640 --height 360 -t 0 -n --inline -o - | \
ffmpeg -fflags +nobuffer+genpts -flags low_delay -avioflags direct -hwaccel drm -hwaccel_output_format drm_prime \
-hide_banner -f alsa -i plughw:CARD=Device,DEV=0 -r 25 -i - -metadata title='DEVIL' -c:v copy -acodec libfdk_aac -eld_sbr 1 -f floatp -ar 44100 -b:a 32k -fpsmax 25 -threads 4 \
-f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream

-acodec libfdk_aac -eld_sbr 1 also working with opus -c:a libopus -b:a 64k -ar 48000 -f s16le

simply change it


your problem

Connection to tcp://localhost:8554?timeout=0 failed: Connection refused

i think mediamtx is not running

greetings

JFQueralt

i'm trying your method on my pi5 adn it's not working, it keeps erroring out

Code:

[NULL @ 0x1205d00] Unable to find a suitable output format for '-'ERROR: *** libav: cannot allocate output context, try setting with --libav-format ***
so I try --libavformat h264 on the end of the rpicam-vid and it now works, in that it starts up as expected, but nothing happens when I hit the url
rtsp://localhost:8554/

and eventually the error log reads

Code:

[tcp @ 0x764990] Connection to tcp://localhost:8554?timeout=0 failed: Connection refusedCould not write header for output file #0 (incorrect codec parameters ?): Connection refusedError initializing output stream 0:0 -
any ideas on why it wouldn't be working?

Statistics: Posted by mediauser — Wed May 01, 2024 7:18 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles