Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: FFMPEG #522

Open
yoyomax80400 opened this issue Jun 15, 2023 · 16 comments
Open

[Bug]: FFMPEG #522

yoyomax80400 opened this issue Jun 15, 2023 · 16 comments
Assignees
Labels
bug 🐛 There is at least high chance that it is a bug!

Comments

@yoyomax80400
Copy link

NRCHKB Plugin Version

1.5.0

Node JS Version

18.16.0

NPM Version

9.6.6

Node-RED Version

3.0.2

Operating System

Home assistant ingress docker

What happened?

I setup a camera control with all basic information see below :

image


If i launch the stream in the home.app, the stream never showing up.
In debug mode i can see only one error :

2023-06-15T09:36:17.093Z CameraSource-Error ERROR: FFmpeg exited with code 1
2023-06-15T09:36:19.823Z CameraSource-Error ERROR: FFmpeg exited with code 1

I tried in terminal the FFPMEG command :

# docker exec -t $(docker ps -f name=a0d7b954_nodered -q) ffmpeg -re -rtsp_transport tcp -i rtsp://admin:XXXXX@192.168.1.76:8554/Streaming/Channels/101 -loglevel debug

This is the ouput :
image
image
image
image

How to reproduce?

1 - Create a camera control
2 - Fill the all the input box
3 - Pair the accesory or bridge
4 - Watch the log

Expected behavior:

No response

Additional comments?

No response

Relevant log output

No response

@yoyomax80400 yoyomax80400 added the bug 🐛 There is at least high chance that it is a bug! label Jun 15, 2023
@crxporter
Copy link
Member

@marcus-j-davies do you want to do an ffmpeg help?

@marcus-j-davies
Copy link
Member

@yoyomax80400

Ignore the output error! Your not setting a save file - so that is expected, and is not related to seeing a stream in iOS.

But your config does need sorting.

Video Encoder : set to libx264 or h264_v4l2m2m - the built in one is not optimised, and performs poorly.

Audio Encoder : set to libfdk_aac

Max Bitrate : Set to 300

Image source : set same as source (or an image url if you know it)

@yoyomax80400
Copy link
Author

yoyomax80400 commented Jun 15, 2023

@marcus-j-davies,
Thanks for reply, yes i know i didn't provide a file to save the stream, if i provide one, the stream working in terminal and the mp4 file contain the stream

I made the change you tell me, but still getting the issue ... in IOS the stream won't load and in the log i get :
2023-06-15T12:07:50.184Z CameraSource-Error ERROR: FFmpeg exited with code 1

Edit :
I try to put the stream in Image source bellow the error :
[Camera] Snapshot request handler provided empty image buffer!

@marcus-j-davies
Copy link
Member

marcus-j-davies commented Jun 15, 2023

What codec is your camera pushing?

Remember to use the codecs I suggested in the config, if they are not, iOS will not work

@yoyomax80400
Copy link
Author

The camera codec is set to H264

@marcus-j-davies
Copy link
Member

marcus-j-davies commented Jun 15, 2023

Ok, just to clear up any confusion.

Codec on the node config must be one that I said (and Audio as well). And is your camera natively sending h264 frames?

The node config FPS, ideally should be lower than native fps on the cam?

Have you changed anything else on the config? Like additional args, filter?

It's FFMPEG that's not happy with something.

@yoyomax80400
Copy link
Author

From the camera:
Video codec : H264
Fps : 25
Resolution : 1920*1080

I didn't change anything else from the config ... i don't understand why i got a FFMPEG exit code, instead i try "Scryben" docker image, set to ffmpeg and it's work too, i try on home assistant and working too :(
But unfortaly, i would like this in node-red

@marcus-j-davies
Copy link
Member

@Shaquu @crxporter

Is there a debug flag or some kind one can add, to see the stderr of the ffmpeg process in NRCHKB?

@yoyomax80400
Copy link
Author

I have no idea ..
image
image

i already add DEBUG=NRCHKB*,CameraSource* from init_command no change ..

let me ask on the dev github of the ingress add-on

@Shaquu
Copy link
Member

Shaquu commented Jun 16, 2023

@yoyomax80400
Copy link
Author

https://nrchkb.github.io/wiki/service/camera-control/#how-to-debug-issues

Yes i already read the doc about how to debug ... but i think there are something to do with node-red as add-on in home assistant for see the debug
I opened a issue on the add-on github, i'm waiting for a answer

@yoyomax80400
Copy link
Author

I'm no able to control the docker from home assistant OS.

Can anyone help me to start nodered container with param ?
I cannot use 'docker run' cause it will create a new container and could not be instantiated in home assistant OS

@Shaquu
Copy link
Member

Shaquu commented Jul 12, 2023

I am not using the home assistant. Can you ask on their channels?

@yoyomax80400
Copy link
Author

Already did but no anwser from them ... still waiting to fix the trouble

@yoyomax80400
Copy link
Author

Since nobody answer on the issue, may be i can give further information about FFMPEG.
See below the log when i start node-red :

v3.18.2-587-g045c1850e7f [https://dl-cdn.alpinelinux.org/alpine/v3.18/community]
OK: 20079 distinct packages available
(1/94) Installing sdl2 (2.26.5-r0)
(2/94) Installing svt-av1-libs (1.6.0-r0)
(3/94) Installing aom-libs (3.6.1-r0)
(4/94) Installing libxau (1.0.11-r2)
(5/94) Installing libmd (1.0.4-r2)
(6/94) Installing libbsd (0.11.7-r1)
(7/94) Installing libxdmcp (1.1.4-r2)
(8/94) Installing libxcb (1.15-r1)
(9/94) Installing libx11 (1.8.4-r4)
(10/94) Installing hwdata-pci (0.370-r0)
(11/94) Installing libpciaccess (0.17-r2)
(12/94) Installing libdrm (2.4.115-r4)
(13/94) Installing libxext (1.3.5-r2)
(14/94) Installing libxfixes (6.0.1-r2)
(15/94) Installing libffi (3.4.4-r2)
(16/94) Installing wayland-libs-client (1.22.0-r2)
(17/94) Installing libva (2.18.0-r1)
(18/94) Installing libvdpau (1.5-r1)
(19/94) Installing onevpl-libs (2023.2.1-r0)
(20/94) Installing ffmpeg-libavutil (6.0-r15)
(21/94) Installing libdav1d (1.2.1-r0)
(22/94) Installing libhwy (1.0.4-r1)
(23/94) Installing lcms2 (2.15-r2)
(24/94) Installing libjxl (0.8.2-r0)
(25/94) Installing lame-libs (3.100-r5)
(26/94) Installing opus (1.4-r0)
(27/94) Installing libgomp (12.2.1_git20220924-r10)
(28/94) Installing soxr (0.1.3-r5)
(29/94) Installing ffmpeg-libswresample (6.0-r15)
(30/94) Installing libogg (1.3.5-r4)
(31/94) Installing libtheora (1.1.1-r17)
(32/94) Installing libvorbis (1.3.7-r1)
(33/94) Installing libvpx (1.13.0-r1)
(34/94) Installing libwebp (1.3.1-r0)
(35/94) Installing x264-libs (0.164_git20220602-r1)
(36/94) Installing numactl (2.0.16-r4)
(37/94) Installing x265-libs (3.5-r4)
(38/94) Installing xvidcore (1.3.7-r1)
(39/94) Installing ffmpeg-libavcodec (6.0-r15)
(40/94) Installing alsa-lib (1.2.9-r1)
(41/94) Installing libbz2 (1.0.8-r5)
(42/94) Installing libpng (1.6.39-r3)
(43/94) Installing freetype (2.13.0-r5)
(44/94) Installing fontconfig (2.14.2-r3)
(45/94) Installing fribidi (1.0.13-r0)
(46/94) Installing libintl (0.21.1-r7)
(47/94) Installing libblkid (2.38.1-r8)
(48/94) Installing libmount (2.38.1-r8)
(49/94) Installing glib (2.76.4-r0)
(50/94) Installing graphite2 (1.3.14-r5)
(51/94) Installing harfbuzz (7.3.0-r0)
(52/94) Installing libunibreak (5.1-r0)
(53/94) Installing libass (0.17.1-r0)
(54/94) Installing libbluray (1.3.4-r0)
(55/94) Installing gmp (6.2.1-r3)
(56/94) Installing nettle (3.8.1-r2)
(57/94) Installing p11-kit (0.24.1-r2)
(58/94) Installing libtasn1 (4.19.0-r1)
(59/94) Installing gnutls (3.8.0-r2)
(60/94) Installing mpg123-libs (1.31.3-r1)
(61/94) Installing libopenmpt (0.7.2-r0)
(62/94) Installing cjson (1.7.15-r4)
(63/94) Installing mbedtls (2.28.4-r0)
(64/94) Installing librist (0.2.7-r0)
(65/94) Installing libsrt (1.5.2-r0)
(66/94) Installing libssh (0.10.5-r0)
(67/94) Installing xz-libs (5.4.3-r0)
(68/94) Installing libxml2 (2.11.4-r0)
(69/94) Installing libsodium (1.0.18-r3)
(70/94) Installing libzmq (4.3.4-r4)
(71/94) Installing ffmpeg-libavformat (6.0-r15)
(72/94) Installing glslang-libs (1.3.243.0-r1)
(73/94) Installing spirv-tools (1.3.243.0-r1)
(74/94) Installing shaderc (2023.3-r1)
(75/94) Installing vulkan-loader (1.3.243.0-r1)
(76/94) Installing libplacebo (5.264.1-r1)
(77/94) Installing ffmpeg-libpostproc (6.0-r15)
(78/94) Installing ffmpeg-libswscale (6.0-r15)
(79/94) Installing vidstab (1.1.1-r0)
(80/94) Installing zimg (3.0.5-r0)
(81/94) Installing ffmpeg-libavfilter (6.0-r15)
(82/94) Installing libasyncns (0.8-r1)
(83/94) Installing dbus-libs (1.14.8-r0)
(84/94) Installing libltdl (2.4.7-r2)
(85/94) Installing orc (0.4.34-r0)
(86/94) Installing flac-libs (1.4.3-r0)
(87/94) Installing libsndfile (1.2.0-r2)
(88/94) Installing speexdsp (1.2.1-r1)
(89/94) Installing tdb-libs (1.4.8-r1)
(90/94) Installing libpulse (16.1-r10)
(91/94) Installing libjpeg-turbo (2.1.5.1-r3)
(92/94) Installing v4l-utils-libs (1.24.1-r0)
(93/94) Installing ffmpeg-libavdevice (6.0-r15)
(94/94) Installing ffmpeg (6.0-r15)

Do you think FFMPEG is not the correct one ? or a library is missing ?

@Shaquu
Copy link
Member

Shaquu commented Feb 19, 2024

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 There is at least high chance that it is a bug!
Projects
None yet
Development

No branches or pull requests

4 participants