homebridge-plugins / homebridge-camera-ffmpeg

Homebridge Plugin Providing FFmpeg-based Camera Support
https://homebridge-plugins.github.io/homebridge-camera-ffmpeg/
Apache License 2.0
1.09k stars 227 forks source link

ERROR: FFmpeg exited with code 1 #461

Closed Razor5812 closed 4 years ago

Razor5812 commented 4 years ago

Good morning all,

Homebridge is installed on a Nas Synology (previously install on a mac mini and having the same problem). I managed to connect my first 4 cameras but not my video door entry system: Intercom Fibaro. My intercom video stream works well on my internet explorer and on VLC.

When I include the intercom in Homebridge, it returns to me: "ERROR: FFmpeg exited with code 1"

Here is the config files : { "name": "Portail", "videoConfig": { "source": "-re -f mjpeg -i http://login:Mdp@192.168.0.111:1111/live/mjpeg", "stillImageSource": "-i http://login:Mdp@192.168.0.111:1111/live/jpeg", "maxStreams": 1, "maxWidth": 720, "maxHeight": 576, "maxFPS": 30, "vcodec": "h264", "audio": true, "debug": true }

Here is the debug file:

Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url http://Login:Mdp@192.168.0.111:1111/live/mjpeg. Applying option re (read input at native frame rate) with argument 1. Applying option f (force format) with argument mjpeg. Successfully parsed a group of options. Opening an input file: http://Login:Mdp@192.168.0.111:1111/live/mjpeg.

[mjpeg @ 0x7efc56f1c140] Opening 'http://Login:Mdp@192.168.0.111:1111/live/mjpeg' for reading

[http @ 0x7efc56f1cac0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy,data'

[tcp @ 0x7efc56f1cf40] Original list of addresses: [tcp @ 0x7efc56f1cf40] Address 192.168.0.111 port 1111 [tcp @ 0x7efc56f1cf40] Interleaved list of addresses: [tcp @ 0x7efc56f1cf40] Address 192.168.0.111 port 1111 [tcp @ 0x7efc56f1cf40] Starting connection attempt to 192.168.0.111 port 1111

[tcp @ 0x7efc56f1cf40] Successfully connected to 192.168.0.111 port 1111

[http @ 0x7efc56f1cac0] request: GET /live/mjpeg HTTP/1.1 User-Agent: Lavf/58.38.100 Accept: / Range: bytes=0- Connection: close Host: 192.168.0.111:1111 Icy-MetaData: 1

http://Login:Mdp@192.168.0.111:1111/live/mjpeg: End of file

[4/19/2020, 3:56:10 PM] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1

resgroupmsr commented 4 years ago

Try different vcodec. I’ve had good luck with this option "vcodec": "libx264 -preset ultrafast", You could also try “copy” and if that works it gives clearest stream

Razor5812 commented 4 years ago

Thanks for your help.

I just tried them, same problem

kalety commented 4 years ago

Hi!, all the problems, I think is about ffmpeg. I've found this, and works!

https://github.com/homebridge/ffmpeg-for-homebridge#readme

rfitzpatrickCO commented 4 years ago

I continue to have this same issue no matter what my config.json looks like. I've tried different codecs, putting in the path to my system ffmpeg and installing the binaries that @kalety referenced above.

I am running Homebridge on Raspberry Pi 3B+ and installed FFmpeg using the Homebridge UI. My camera is a Ubiquiti UVC-G3. Below are some of the configurations I've used without success. In all examples below, the camera is recognized by Homebridge and I was able to successfully add and see a snapshot of my camera in the Home App on iOS and Mac OS.

{ "cameras": [ { "name": "Front Porch", "manufacturer": "Ubiquiti", "model": "UVC-G3", "videoConfig": { "source": "-re -i rtsp://192.168.1.1:7447/redacted", "vcodec": "libx264 -preset ultrafast", "audio": true, "debug": true } } ], "platform": "Camera-ffmpeg" }

{ "cameras": [ { "name": "Front Porch", "manufacturer": "Ubiquiti", "model": "UVC-G3", "videoConfig": { "source": "-re -i rtsp://192.168.1.1:7447/redacted", "vcodec": "h264_omx", "audio": true, "debug": true } } ], "platform": "Camera-ffmpeg" }

{ "cameras": [ { "name": "Front Porch", "manufacturer": "Ubiquiti", "model": "UVC-G3", "videoConfig": { "source": "-re -i rtsp://192.168.1.1:7447/redacted", "vcodec": "h264", "audio": true, "debug": true } } ], "platform": "Camera-ffmpeg" }

Below is my debug log: [5/20/2020, 09:51:23] Homebridge is running on port 51284. [5/20/2020, 09:58:28] [Camera-ffmpeg] Snapshot from Front Porch at 480:270 ffmpeg -re -i rtsp://192.168.1.1:7447/redacted -t 1 -vf scale=480:270 -f image2 - [5/20/2020, 09:58:32] [Camera-ffmpeg] Start streaming video from Front Porch with 1280:720@10fps (299kBit) /usr/local/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -re -i rtsp://192.168.1.1:7447/redacted -map 0:0 -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -r 10 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 5800679 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params XYjiJdw1XomueLupH1qeomJ0oN2iFQKrLY7WRNkp srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 10873569 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params Z0f6jgJgYC7WbsHoV9p8SU6/GIuwUaCdkuX50SM2 srtp://192.168.1.93:58591?rtcpport=58591&localrtcpport=58591&pkt_size=1316 -loglevel debug ffmpeg version 4.2.git-47773f7 Copyright (c) 2000-2020 the FFmpeg developers

built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516 configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-demuxer=rtsp --enable-omx-rpi --enable-mmal libavutil 56. 40.100 / 56. 40.100 libavcodec 58. 68.102 / 58. 68.102 libavformat 58. 38.100 / 58. 38.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 75.100 / 7. 75.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Splitting the commandline. Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'. Reading option '-i' ... matched as input url with argument 'rtsp://192.168.1.1:7447/redacted'. Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'. Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'. Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.

Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '10'. Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'. Reading option '-tune' ... matched as AVOption 'tune' with argument 'zerolatency'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'scale=1280:720'. Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '299k'. Reading option '-bufsize' ... matched as AVOption 'bufsize' with argument '299k'. Reading option '-maxrate' ... matched as AVOption 'maxrate' with argument '299k'. Reading option '-payload_type' ... matched as AVOption 'payload_type' with argument '99'. Reading option '-ssrc' ... matched as AVOption 'ssrc' with argument '5800679'. Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'. Reading option '-srtp_out_suite' ... matched as AVOption 'srtp_out_suite' with argument 'AES_CM_128_HMAC_SHA1_80'. Reading option '-srtp_out_params' ... matched as AVOption 'srtp_out_params' with argument 'XYjiJdw1XomueLupH1qeomJ0oN2iFQKrLY7WRNkp'. Reading option 'srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316' ... matched as output url.

Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'libfdk_aac'. Reading option '-profile:a' ... matched as option 'profile' (set profile) with argument 'aac_eld'. Reading option '-flags' ... matched as AVOption 'flags' with argument '+global_header'. Reading option '-f' ... matched as option 'f' (force format) with argument 'null'. Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '16k'. Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '24k'. Reading option '-bufsize' ... matched as AVOption 'bufsize' with argument '24k'. Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '1'. Reading option '-payload_type' ... matched as AVOption 'payload_type' with argument '110'. Reading option '-ssrc' ... matched as AVOption 'ssrc' with argument '10873569'. Reading option '-f' ... matched as option 'f' (force format) with argument 'rtp'. Reading option '-srtp_out_suite' ... matched as AVOption 'srtp_out_suite' with argument 'AES_CM_128_HMAC_SHA1_80'. Reading option '-srtp_out_params' ... matched as AVOption 'srtp_out_params' with argument 'Z0f6jgJgYC7WbsHoV9p8SU6/GIuwUaCdkuX50SM2'. Reading option 'srtp://192.168.1.93:58591?rtcpport=58591&localrtcpport=58591&pkt_size=1316' ... matched as output url.

Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url rtsp://192.168.1.1:7447/redacted. Applying option re (read input at native frame rate) with argument 1. Successfully parsed a group of options. Opening an input file: rtsp://192.168.1.1:7447/redacted.

[tcp @ 0x3608a00] No default whitelist set [tcp @ 0x3608a00] Original list of addresses: [tcp @ 0x3608a00] Address 192.168.1.1 port 7447 [tcp @ 0x3608a00] Interleaved list of addresses: [tcp @ 0x3608a00] Address 192.168.1.1 port 7447 [tcp @ 0x3608a00] Starting connection attempt to 192.168.1.1 port 7447

[tcp @ 0x3608a00] Successfully connected to 192.168.1.1 port 7447

[rtsp @ 0x36069f0] SDP: v=0 o=- 422 0 IN IP4 192.168.1.1 s=FCECDA30FD8B_2 u=www.evostream.com e=contact@evostream.com c=IN IP4 192.168.1.1 t=0 0 a=recvonly a=control:* a=range:npt=now- m=audio 0 RTP/AVP 96 a=recvonly a=rtpmap:96 mpeg4-generic/11025/1 a=control:trackID=1 a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1508; SizeLength=13; IndexLength=3; IndexDeltaLength=3; m=video 0 RTP/AVP 97 a=recvonly a=control:trackID=2 a=rtpmap:97 H264/90000 a=fmtp:97 profile-level-id=4d401e; packetization-mode=1; sprop-parameter-sets=Z01AHppkBQF/y/+AXoBfNwEBAUAAAPoAAB1MJQ==,aO48gA==

[rtsp @ 0x36069f0] audio codec set to: aac [rtsp @ 0x36069f0] audio samplerate set to: 11025 [rtsp @ 0x36069f0] audio channels set to: 1

[rtsp @ 0x36069f0] video codec set to: h264 [rtsp @ 0x36069f0] RTP Profile IDC: 4d Profile IOP: 40 Level: 1e [rtsp @ 0x36069f0] RTP Packetization Mode: 1 [rtsp @ 0x36069f0] Extradata set to 0x360d310 (size: 40) [rtp @ 0x3608d50] No default whitelist set

[udp @ 0x360d8b0] No default whitelist set [udp @ 0x360d8b0] end receive buffer size reported is 327680 [udp @ 0x360d8b0] attempted to set receive buffer to size 393216 but it only ended up set as 327680 [udp @ 0x361dc10] No default whitelist set

[udp @ 0x361dc10] end receive buffer size reported is 327680 [udp @ 0x361dc10] attempted to set receive buffer to size 393216 but it only ended up set as 327680

[rtsp @ 0x36069f0] setting jitter buffer size to 500

[rtp @ 0x362e1b0] No default whitelist set [udp @ 0x362e700] No default whitelist set [udp @ 0x362e700] end receive buffer size reported is 327680 [udp @ 0x362e700] attempted to set receive buffer to size 393216 but it only ended up set as 327680

[udp @ 0x363ea50] No default whitelist set [udp @ 0x363ea50] end receive buffer size reported is 327680 [udp @ 0x363ea50] attempted to set receive buffer to size 393216 but it only ended up set as 327680

[rtsp @ 0x36069f0] setting jitter buffer size to 500 [rtsp @ 0x36069f0] hello state=0

[h264 @ 0x360ce70] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x360ce70] nal_unit_type: 8(PPS), nal_ref_idc: 3

[h264 @ 0x360ce70] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x360ce70] nal_unit_type: 8(PPS), nal_ref_idc: 3

[h264 @ 0x360ce70] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x360ce70] nal_unit_type: 8(PPS), nal_ref_idc: 3

[h264 @ 0x360ce70] nal_unit_type: 5(IDR), nal_ref_idc: 3

[h264 @ 0x360ce70] Format yuvj420p chosen by get_format(). [h264 @ 0x360ce70] Reinit context to 640x368, pix_fmt: yuvj420p

[h264 @ 0x360ce70] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3

Last message repeated 5 times

[rtsp @ 0x36069f0] All info found

[rtsp @ 0x36069f0] rfps: 14.666667 0.016417 [rtsp @ 0x36069f0] rfps: 14.750000 0.009234 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 14.833333 0.004103 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 14.916667 0.001025 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 15.000000 0.000000 [rtsp @ 0x36069f0] rfps: 15.083333 0.001027 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 15.166667 0.004107 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 15.250000 0.009239 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 15.333333 0.016423 [rtsp @ 0x36069f0] rfps: 29.666667 0.016414 [rtsp @ 0x36069f0] rfps: 29.750000 0.009231 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 29.833333 0.004102 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 29.916667 0.001025 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 30.000000 0.000000 [rtsp @ 0x36069f0] rfps: 45.000000 0.000000 [rtsp @ 0x36069f0] rfps: 60.000000 0.000000 [rtsp @ 0x36069f0] rfps: 120.000000 0.000000

[rtsp @ 0x36069f0] rfps: 240.000000 0.000002 [rtsp @ 0x36069f0] rfps: 29.970030 0.000132 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 59.940060 0.000529 Last message repeated 1 times [rtsp @ 0x36069f0] rfps: 14.985015 0.000033

Last message repeated 1 times

Input #0, rtsp, from 'rtsp://192.168.1.1:7447/redacted': Metadata: title : FCECDA30FD8B_2

Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0, 22, 1/11025: Audio: aac (LC), 11025 Hz, mono, fltp Stream #0:1, 28, 1/90000: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 640x360 (640x368) [SAR 189:190 DAR 168:95], 0/1, 15 fps, 15 tbr, 90k tbn, 30 tbc Successfully opened the file. Parsing a group of options: output url srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316. Applying option map (set input stream mapping) with argument 0:0.

Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264. Applying option pix_fmt (set pixel format) with argument yuv420p. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 10. Applying option f (force format) with argument rawvideo. Applying option vf (set video filters) with argument scale=1280:720. Applying option b:v (video bitrate (please use -b:v)) with argument 299k. Applying option f (force format) with argument rtp. Successfully parsed a group of options. Opening an output file: srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316.

Codec AVOption preset (Set the encoding preset (cf. x264 --fullhelp)) specified for output file #0 (srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

[srtp @ 0x378b970] No default whitelist set [rtp @ 0x3685020] No default whitelist set [udp @ 0x379cdb0] No default whitelist set

[udp @ 0x36853e0] No default whitelist set Successfully opened the file. Parsing a group of options: output url srtp://192.168.1.93:58591?rtcpport=58591&localrtcpport=58591&pkt_size=1316. Applying option map (set input stream mapping) with argument 0:1. Applying option acodec (force audio codec ('copy' to copy stream)) with argument libfdk_aac. Applying option profile:a (set profile) with argument aac_eld. Applying option f (force format) with argument null. Applying option ar (set audio sampling rate (in Hz)) with argument 16k. Applying option b:a (video bitrate (please use -b:v)) with argument 24k. Applying option ac (set number of audio channels) with argument 1. Applying option f (force format) with argument rtp. Successfully parsed a group of options. Opening an output file: srtp://192.168.1.93:58591?rtcpport=58591&localrtcpport=58591&pkt_size=1316.

Codec AVOption b (set bitrate (in bits/s)) specified for output file #1 (srtp://192.168.1.93:58591?rtcpport=58591&localrtcpport=58591&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

Codec AVOption profile () specified for output file #1 (srtp://192.168.1.93:58591?rtcpport=58591&localrtcpport=58591&pkt_size=1316) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

[srtp @ 0x3657bc0] No default whitelist set [rtp @ 0x3657b00] No default whitelist set [udp @ 0x3658300] No default whitelist set [udp @ 0x3658220] No default whitelist set

Successfully opened the file.

detected 4 logical cores

[h264 @ 0x3668140] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x3668140] nal_unit_type: 8(PPS), nal_ref_idc: 3

Stream mapping: Stream #0:0 -> #0:0 (aac (native) -> pcm_mulaw (native))

Stream #0:1 -> #1:0 (h264 (native) -> mpeg4 (native)) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

[graph_0_in_0_0 @ 0x365edc0] Setting 'time_base' to value '1/11025'

[graph_0_in_0_0 @ 0x365edc0] Setting 'sample_rate' to value '11025' [graph_0_in_0_0 @ 0x365edc0] Setting 'sample_fmt' to value 'fltp' [graph_0_in_0_0 @ 0x365edc0] Setting 'channel_layout' to value '0x4' [graph_0_in_0_0 @ 0x365edc0] tb:1/11025 samplefmt:fltp samplerate:11025 chlayout:0x4 [format_out_0_0 @ 0x3748210] Setting 'sample_fmts' to value 's16'

[format_out_0_0 @ 0x3748210] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_0' [AVFilterGraph @ 0x3793040] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed [auto_resampler_0 @ 0x3748ac0] [SWR @ 0x379d2f0] Using fltp internally between filters [auto_resampler_0 @ 0x3748ac0] ch:1 chl:mono fmt:fltp r:11025Hz -> ch:1 chl:mono fmt:s16 r:11025Hz

Output #0, rtp, to 'srtp://192.168.1.93:56511?rtcpport=56511&localrtcpport=56511&pkt_size=1316': Metadata: title : FCECDA30FD8B_2

encoder         : Lavf58.38.100
Stream #0:0, 0, 1/11025: Audio: pcm_mulaw, 11025 Hz, mono, s16, 88 kb/s
Metadata:
  encoder         : Lavc58.68.102 pcm_mulaw

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

Last message repeated 15612 times

[h264 @ 0x3668140] nal_unit_type: 7(SPS), nal_ref_idc: 3 [h264 @ 0x3668140] nal_unit_type: 8(PPS), nal_ref_idc: 3

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) Last message repeated 54 times [h264 @ 0x3668140] nal_unit_type: 5(IDR), nal_ref_idc: 3 cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

Last message repeated 782 times

[h264 @ 0x3668140] Format yuvj420p chosen by get_format(). [h264 @ 0x3668140] Reinit context to 640x368, pix_fmt: yuvj420p

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

Last message repeated 16604 times

[h264 @ 0x365c4b0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

[h264 @ 0x3769a10] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

[h264 @ 0x377b020] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3

cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)

Last message repeated 4764 times

[h264 @ 0x372d3b0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3

[graph 1 input from stream 0:1 @ 0x3681f10] Setting 'video_size' to value '640x360' [graph 1 input from stream 0:1 @ 0x3681f10] Setting 'pix_fmt' to value '12'

[graph 1 input from stream 0:1 @ 0x3681f10] Setting 'time_base' to value '1/90000' [graph 1 input from stream 0:1 @ 0x3681f10] Setting 'pixel_aspect' to value '189/190' [graph 1 input from stream 0:1 @ 0x3681f10] Setting 'frame_rate' to value '15/1' [graph 1 input from stream 0:1 @ 0x3681f10] w:640 h:360 pixfmt:yuvj420p tb:1/90000 fr:15/1 sar:189/190 [format @ 0x370c990] Setting 'pix_fmts' to value 'yuv420p'

[auto_scaler_0 @ 0x37e8130] Setting 'flags' to value 'bicubic'

[auto_scaler_0 @ 0x37e8130] w:iw h:ih flags:'bicubic' interl:0 [format @ 0x370c990] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format' [AVFilterGraph @ 0x3674ca0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed

[swscaler @ 0x37e8a60] deprecated pixel format used, make sure you did set range correctly

[auto_scaler_0 @ 0x37e8130] w:640 h:360 fmt:yuvj420p sar:189/190 -> w:640 h:360 fmt:yuv420p sar:189/190 flags:0x4

[mpeg4 @ 0x3659420] Either both buffer size and max rate or neither must be specified

Error initializing output stream 1:0 -- Error while opening encoder for output stream #1:0 - maybe incorrect parameters such as bit_rate, rate, width or height

[AVIOContext @ 0x3685480] Statistics: 0 seeks, 6 writeouts

[AVIOContext @ 0x3658390] Statistics: 0 seeks, 0 writeouts

Conversion failed!

[5/20/2020, 09:58:35] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1

kalety commented 4 years ago

Hi!, have you test the rtsp path in VLC?. In config.json, the codec that is recommended for a Raspberry pi is "h264_omx".

rfitzpatrickCO commented 4 years ago

I have - that's in the second config that I posted above. It works great in VLC.

kalety commented 4 years ago

"rtsp://192.168.1.1:7447/redacted" is the same in above three configs,I don't understand what is "second", sorry!

rfitzpatrickCO commented 4 years ago

{ "cameras": [ { "name": "Front Porch", "manufacturer": "Ubiquiti", "model": "UVC-G3", "videoConfig": { "source": "-re -i rtsp://192.168.1.1:7447/redacted", "vcodec": "h264_omx", "audio": true, "debug": true } } ], "platform": "Camera-ffmpeg" }

This is one of the configurations I've used. The codec is h264_omx, but it didn't work for me. Maybe I'm misunderstanding what you're asking. I'm new to this, so I wouldn't doubt it...

kalety commented 4 years ago

I said you that if you have tested in VLC only the rtsp stream "rtsp://192.168.1.1:7447/redacted". If you see the stream in VLC all of your hardware is ok.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.