Closed 671792320 closed 4 years ago
use this, in place of the original
const ffmpegInputArgs = ' -map ' + mapvideo + ' -vcodec ' + vcodec + ' -pix_fmt yuv420p -r ' + fps + ' -f rawvideo' + ' ' + additionalCommandline + ' -vf "format=nv12,hwupload" -b:v ' + vbitrate + 'k' + ' -bufsize ' + vbitrate + 'k' + ' -maxrate ' + vbitrate + 'k' + ' -payload_type 99'
ok
the -re
has caused me probed in the past - try it with and without
isn't that the problem you had last time - where the driver was not installed?
I'm very sure that I have the driver installed
ok so clearly the -vf
fix is working.
other than hardware access issues with node-red, I can't see any reason why it will not work.
it could be :
The use of docker
getting in the way
node-red
its self not having the right access (does it have root)
the nodejs module child_process
having problems - its used to start ffmpeg.
everything works for you when using libx264, I use hardware rendering, so I can only point to an issue with permissions or docker.
Sorry - I can't offer anything else.
ok
Is your noed-red running inside a docker container? Or run directly on the Raspberry Pi
Can you help me modify this code with the file?
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 \
-threads:v 2 -threads:a 4 \
-rtsp_transport tcp \
-i rtsp://admin:123@192.168.1.247:8554/live3.sdp \
-map 0:0 \
-pix_fmt yuv420p \
-r 15.
-f rawvideo \
-vf 'format=nv12|vaapi,hwupload,scale_vaapi=1280:720' \
-c:v h264_vaapi \
-b:v 299k \
-bufsize 299k \
-maxrate 299k -payload_type 99 \
-ssrc 13314026 \
-f RTP \
-srtp_out_suite AES_CM_128_HMAC_SHA1_80 \
-srtp_out_params ils+c7v2WkNjdFFgICwYAeDKZ5oVaUAs1moiaGFB \
"srtp://192.168.1.243:62485?rtcpport=62485&localrtcpport=62485&pkt_size=1316"
This is me at https://gist.github.com/brainiarc7/95c9338a737aa36d9bb2931bed379219
Answers found on
Morning,
No worries, so you want to use the command from Braniark7 yes?
I want to test it
ok let me just modify the JS file and I will attach it here... bear with me.
Step 1: Replace the Camera.js file, with this one attached.
step 2:
Set this as the Source Stream
-hwaccel vaapi -vaapi_device /dev/dri/renderD128 -threads:v 2 -threads:a 4 -rtsp_transport tcp -i rtsp://STREAM_URL
Step 3:
set h264_vaapi
as the encocder
hangon - let me just add debugging to it.....
ok this on Camera.js.zip
run node -red in terminal (so we can see any output)
ok I'll wait for the test
It seems that we have to give up.
The only thing that could cause that i guess is -vaapi_device. being set to a non valid Render device. Or the url for the camera being incorrect.
yes
I don't think there is much more one can do here, not from a node specific point of view. after all the testing, I can only put this down to some DSM/Node-Red/Docker environment factor, causing the issue.
Sorry, I couldn't resolve.
“ srtp://192.168.1.243:62485?rtcpport = 62485&localrtcpport = 62485&pkt_size = 1316” This command, I found that you have not added "" or "" in the modified file. I found that when I input all the commands, if the lowest STRP is not in "", the process will not start.
Hello, please ask for help on the camera, when I try to use ffmpeg to hard decode the problem I query the official hardware decode for this command -vaapi_device / dev / dri / renderD128 -hwaccel vaapi -hwaccel_output_format vaapi When I add it like this and add monitoring rtsp connection, it seems to be unable to start, I am confused why this is not possible? But the same command can be started normally under homeassistant. In addition, I found that ffmpeg seems to support Intel QSV, but what I installed from apk add ffmpeg didn't seem to compile. I tried to recompile ffmpeg myself but it failed. My installation platform is nodered with a black skirt black DS918 + 6.2.2 docker installation. When I execute ls / dev / dri under nodered, docker correctly recognizes renderD128