Ran it and got this:
ffmpeg version N-92087-gdcbd89e000 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: —prefix=/usr/local —arch=armel —target-os=linux —enable-omx-rpi —enable-nonfree —enable-gpl —enable-libfdk-aac —enable-mmal —enable-libx264 —enable-decoder=h264 —enable-network —enable-protocol=tcp —enable-demuxer=rtsp
libavutil 56. 19.101 / 56. 19.101
libavcodec 58. 31.102 / 58. 31.102
libavformat 58. 18.104 / 58. 18.104
libavdevice 58. 4.105 / 58. 4.105
libavfilter 7. 33.100 / 7. 33.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 93 packets
[h264 @ 0x2740ff0] error while decoding MB 30 15, bytestream -12
[h264 @ 0x2740ff0] concealing 2419 DC, 2419 AC, 2419 MV errors in I frame
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 31 packets
[h264 @ 0x2740ff0] error while decoding MB 67 22, bytestream -5
[h264 @ 0x2740ff0] concealing 1822 DC, 1822 AC, 1822 MV errors in P frame
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 27 packets
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 19 packets
Input #0, rtsp, from ‘rtsp://admin:Redacted@192.168.1.69:554/ch01/1’:
Metadata:
title : Media Presentation
Duration: N/A, start: 0.450000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280×720, 20 fps, 20 tbr, 90k tbn, 180k tbc
At least one output file must be specified
Содержание
- FFmpeg exited with code 1 #163
- Comments
- FFMPEG exited with Error code 1 #213
- Comments
- ERROR: FFmpeg exited with code 1 #265
- Comments
FFmpeg exited with code 1 #163
Once in a while the camera stream won’t start (keeps loading and eventually times out) and outputs the error: FFmpeg exited with code 1.
What is this error code exactly and is there a way to prevent it from occurring?
The text was updated successfully, but these errors were encountered:
I have this problem all the time
I had the same problem too.
I find the log file. It seems like ffmpeg can’t access the /dev/video0. It may happened by ffmpeg didn’t release the previous session of /dev/video0.
I extract the command in the ffmpeg.js
$ ffmpeg -re -f video4linux2 -i /dev/video0 -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 20 -f rawvideo -tune zerolatency -b:v 1500k -bufsize 1500k -payload_type 99 -ssrc 16132552 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params omz31e5SiZSneUySvSsIaFfu+NW2uWUl9+FHs3HD srtp://192.168.10.112:58536?rtcpport=58536&localrtcpport=58536&pkt_size=1316
0|homebrid | /dev/video0: Input/output error
0|homebrid | [2018-3-24 22:28:22] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
0|homebrid | [video4linux2,v4l2 @ 0x1ef2740] Cannot open video device /dev/video0: No such file or directory
0|homebrid | /dev/video0: No such file or directory
0|homebrid | [2018-3-24 22:28:35] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
0|homebrid | [video4linux2,v4l2 @ 0x2294740]
0|homebrid | Cannot open video device /dev/video0: Device or resource busy
0|homebrid | /dev/video0: Device or resource busy
0|homebrid | [2018-3-24 22:29:07] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
Источник
FFMPEG exited with Error code 1 #213
Hello, Just got camera to add into HomeKit and I get this error:
Any ideas?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I have the exact same problem
I hope someone finds a fix idk whats wrong
You might need to enable debugging using your config ( «debug»: true ) to see why exactly FFmpeg is exiting with a code 1.
This was happening to me today, and I think the problem was my custom-compiled FFmpeg had been overwritten during an apt upgrade . I’m not 100% sure that is what happened, but 1) I ran an apt upgrade earlier in the day after not messing with anything since the last time it worked, and 2) reinstalling the .deb of my custom FFmpeg fixed the issue.
Mind sending ur custom FFMPEG deb?
@cbpowell here’s what the debug said:
[2018-10-1 23:05:07] [Camera-ffmpeg] Start streaming video from TC01 with 480×360@100kBit
ffmpeg -re -i rtsp://admin:redacted@redacted/ch01/1 -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=480:360 -b:v 100k -bufsize 100k -payload_type 99 -ssrc 4066647 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params iYg0uZokbxs/VpaWEtE3LiDVl8aimEKC2kvzrQJm srtp://192.168.1.66:52501?rtcpport=52501&localrtcpport=52501&pkt_size=1316
ffmpeg version N-92079-gb577153231 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: —arch=armel —target-os=linux —enable-gpl —enable-libx264 —enable-nonfree
libavutil 56. 19.101 / 56. 19.101
libavcodec 58. 31.102 / 58. 31.102
libavformat 58. 18.103 / 58. 18.103
libavdevice 58. 4.104 / 58. 4.104
libavfilter 7. 33.100 / 7. 33.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
: No such file or directory
[2018-10-1 23:05:07] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
@KhaosT Please help or anyone
@iRayanKhan I don’t think I can send you the .deb, because it contains code that is non-distributable.
So your issue is the FFmpeg output «No such file or directory», that’s what is causing the code 1 exit. Unfortunately FFmpeg output isn’t great for debugging. It looks like you’re trying to use -vcodec h264_omx but your FFmpeg does not appear to be compiled with h264_omx support. That could be the issue?
Try following the FFmpeg compilation instructions in the Wiki to compile it on your own Pi. I personally followed a slightly modified version of the instructions on this blog.
@cbpowell After some research it appears it is trying to use the webcam at /dev/video0 which must be a USB port. I also tried h264 with out omx and even CAMERA-IP and CAMERA-ffmpeg-Omx
Followed the directions to no avail.
What’s the outcome if you run ffmpeg -re -i rtsp://admin:redacted@redacted/ch01/1 -o — directly in terminal? Based on the error log I think your ffmpeg is not compiled with rtsp support.
Ran it and got this:
ffmpeg version N-92087-gdcbd89e000 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: —prefix=/usr/local —arch=armel —target-os=linux —enable-omx-rpi —enable-nonfree —enable-gpl —enable-libfdk-aac —enable-mmal —enable-libx264 —enable-decoder=h264 —enable-network —enable-protocol=tcp —enable-demuxer=rtsp
libavutil 56. 19.101 / 56. 19.101
libavcodec 58. 31.102 / 58. 31.102
libavformat 58. 18.104 / 58. 18.104
libavdevice 58. 4.105 / 58. 4.105
libavfilter 7. 33.100 / 7. 33.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 93 packets
[h264 @ 0x2740ff0] error while decoding MB 30 15, bytestream -12
[h264 @ 0x2740ff0] concealing 2419 DC, 2419 AC, 2419 MV errors in I frame
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 31 packets
[h264 @ 0x2740ff0] error while decoding MB 67 22, bytestream -5
[h264 @ 0x2740ff0] concealing 1822 DC, 1822 AC, 1822 MV errors in P frame
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 27 packets
[rtsp @ 0x273e180] max delay reached. need to consume packet
[rtsp @ 0x273e180] RTP: missed 19 packets
Input #0, rtsp, from ‘rtsp://admin:Redacted@192.168.1.69:554/ch01/1’:
Metadata:
title : Media Presentation
Duration: N/A, start: 0.450000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280×720, 20 fps, 20 tbr, 90k tbn, 180k tbc
At least one output file must be specified
@iRayanKhan I think you installed 2 ffmpeg on your device. The one homebridge is using have a version header of
and the one you ran manually have
The one homebridge found wasn’t compiled with rtsp support.
I think I have 2, too. I’m gonna wipe my Pi and do a fresh install of everything. Will report back later today.
Funny issue, May have fixed FFmpeg, now my garages died :). It may be unrelated, Homebridge-LiftMaster2
Gonna just try the cameras now
Tried again after wiping my pi;
Same issue.
Update: My garages also are dead, tried running both the cameras and Garages separate and no dice.
Can you post how you set up your Raspberry Pi? If you didn’t unpair your garage before doing this all over again, you may need to manually remove it from HomeKit on iOS device before readding it.
I setup my Pi with Raspbian Jessie with Etcher (Removed HK accessories prior). Reinstalled everything according to the instructions and now when homebridge boots it auto crashed because of my Garage plugin (Copy Pasted same config) and it just crashes homebridge..
«Reinstalled everything according to the instructions», can you share the link to the instructions?
Источник
ERROR: FFmpeg exited with code 1 #265
Hi after some help please
I have installed FFmpeg and the plugin on my Mac ok, ive successfully added the camera to my home App however everytime I click the video feed in my app Homebridge shows this error: ERROR: FFmpeg exited with code 1.
ive tried searching on GitHub and have found people with the similar fault but can not seem to find an answer as to what is wrong.
Please help
Thanks Paul
The text was updated successfully, but these errors were encountered:
in your config, add «audio»: false below your camera settings
Same issue. Adding «audio»: false only helped for 1 out of 4 camera’s
Hi Paul, you should at least do the following:
- tell what your camera and his configuration are
- activate debugging (i.e. into config -> «debug»: true) and post the log
btw exit code 1 usually means that some parameters to ffmpeg are wrong
My config is:
<
«platform» : «Camera-ffmpeg»,
«cameras» : [
<
«name» : «Garage»,
«videoConfig» : <
«vcodec» : «h264_omx»,
«source» : «-rtsp_transport tcp -re -i rtsp://@10.0.1.21:554/Streaming/Channels/102»,
«maxFPS» : 20,
«audio» : false,
«maxHeight» : 360,
«maxStreams» : 4,
«maxWidth» : 640,
«stillImageSource» : «-i http://@10.0.1.21/ISAPI/Streaming/channels/101/picture»
>
>,
<
«name» : «Gangnew»,
«videoConfig» : <
«vcodec» : «h264_omx»,
«source» : «-rtsp_transport tcp -re -i rtsp://@10.0.1.24/live»,
«maxFPS» : 20,
«audio» : false,
«maxHeight» : 360,
«maxStreams» : 4,
«maxWidth» : 640,
«stillImageSource» : «-i http://@10.0.1.24/cgi-bin/snapshot.cgi?1»
>
>,
<
«name» : «Gangold»,
«videoConfig» : <
«vcodec» : «h264_omx»,
«source» : «-rtsp_transport tcp -re -i rtsp://@10.0.1.22:554/Streaming/Channels/102»,
«maxFPS» : 20,
«audio» : false,
«maxHeight» : 360,
«maxStreams» : 4,
«maxWidth» : 640,
«stillImageSource» : «-i http://@10.0.1.22/Streaming/channels/102/picture»
>
>,
<
«name» : «Living»,
«videoConfig» : <
«vcodec» : «h264_omx»,
«source» : «-rtsp_transport tcp -re -i rtsp://@10.0.1.20/Streaming/Channels/102»,
«maxFPS» : 20,
«audio» : false,
«maxHeight» : 360,
«maxStreams» : 4,
«maxWidth» : 640,
«stillImageSource» : «-i http://@10.0.1.20/Streaming/channels/102/picture»
>
>
],
«name» : «device»
waiting for the debug log.
anyway I don’t understand why you put «-rtsp_transport tcp» in your config
brand and model of your camera?
Thank you for your reply’s I am currently at work and do not have access to my iMac.
I am also unsure how to run a debug as I am very very new to Homebridge and using Terminal. Camera I have are a Wanscam jw0004 and my iMac FaceTime cam using the iSight plugin
Also that is not my config file in the above post
Also having the same issue. Here’s one of my camera configs (Have 5 that are all identical other than IP):
<
«platform»: «Camera-ffmpeg»,
«cameras»: [
<
«name»: «Kitchen Cam»,
«videoConfig»: <
«source»: «-rtsp_transport tcp -i rtsp://10.0.1.44:8554/unicast»,
«stillImageSource»: «-i rtsp://10.0.1.44:8554/unicast»,
«maxStreams»: 5,
«maxWidth»: 1280,
«maxHeight»: 720,
«maxFPS»: 25,
«vcodec»: «h264»,
«packetSize»: 752,
«maxBitrate»: 512,
«debug»: true
>
>,
Here are some logs with debugging enabled:
ffmpeg -rtsp_transport tcp -i rtsp://10.0.1.38:8554/unicast -map 0:0 -vcodec h264 -pix_fmt yuv420p -r 25 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 10630649 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params +3PoWxPOulyTitMt3O3uUNzovurRhB0/9HVr59pN srtp://10.0.1.17:63888?rtcpport=63888&localrtcpport=63888&pkt_size=752 -loglevel debug
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: —prefix=/usr/local/Cellar/ffmpeg/4.1_5 —enable-shared —enable-pthreads —enable-version3 —enable-hardcoded-tables —enable-avresample —cc=clang —host-cflags=’-I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include/darwin’ —host-ldflags= —enable-ffplay —enable-gpl —enable-libaom —enable-libbluray —enable-libmp3lame —enable-libopus —enable-librubberband —enable-libsnappy —enable-libtesseract —enable-libtheora —enable-libvorbis —enable-libvpx —enable-libx264 —enable-libx265 —enable-libxvid —enable-lzma —enable-libfontconfig —enable-libfreetype —enable-frei0r —enable-libass —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-librtmp —enable-libspeex —enable-videotoolbox —disable-libjack —disable-indev=jack
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Splitting the commandline.
Reading option ‘-rtsp_transport’ .
matched as AVOption ‘rtsp_transport’ with argument ‘tcp’.
Reading option ‘-i’ . matched as input url with argument ‘rtsp://10.0.1.38:8554/unicast’.
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 ‘h264’.
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 ’25’.
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 ‘10630649’.
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 ‘+3PoWxPOulyTitMt3O3uUNzovurRhB0/9HVr59pN’.
Reading option ‘srtp://10.0.1.17:63888?rtcpport=63888&localrtcpport=63888&pkt_size=752’ . 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://10.0.1.38:8554/unicast.
Successfully parsed a group of options.
Opening an input file: rtsp://10.0.1.38:8554/unicast.
[tcp @ 0x7fd2be625140] No default whitelist set
[tcp @ 0x7fd2be625140] Original list of addresses:
[tcp @ 0x7fd2be625140] Address 10.0.1.38 port 8554
[tcp @ 0x7fd2be625140] Interleaved list of addresses:
[tcp @ 0x7fd2be625140] Address 10.0.1.38 port 8554
[tcp @ 0x7fd2be625140] Starting connection attempt to 10.0.1.38 port 8554
[tcp @ 0x7fd2be625140] Successfully connected to 10.0.1.38 port 8554
[rtsp @ 0x7fd2c3800000] SDP:
v=0
o=- 1549497936855297 1 IN IP4 10.0.1.38
s=LIVE555 Streaming Media v2017.10.28
i=LIVE555 Streaming Media v2017.10.28
t=0 0
a=tool:LIVE555 Streaming Media v2017.10.28
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:LIVE555 Streaming Media v2017.10.28
a=x-qt-text-inf:LIVE555 Streaming Media v2017.10.28
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:0
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=ffffc01f;sprop-parameter-sets=Z0LAH52oFAFuhAAAAwAEAAADAMoQ,aO48gA==
a=x-dimensions:1280,720
a=control:track1
Failed to parse interval end specification »
[rtsp @ 0x7fd2c3800000] video codec set to: h264
[rtsp @ 0x7fd2c3800000] Extradata set to 0x7fd2c1203690 (size: 33)
[rtsp @ 0x7fd2c3800000] setting jitter buffer size to 0
[rtsp @ 0x7fd2c3800000] hello state=0
Failed to parse interval end specification »
[h264 @ 0x7fd2c3004000] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0x7fd2c3004000] Format yuv420p chosen by get_format().
[h264 @ 0x7fd2c3004000] Reinit context to 1280×720, pix_fmt: yuv420p
[h264 @ 0x7fd2c3004000] Frame num gap 136 134
[h264 @ 0x7fd2c3004000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0x7fd2c3004000] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7fd2c3004000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[rtsp @ 0x7fd2c3800000] All info found
[rtsp @ 0x7fd2c3800000] rfps: 24.416667 0.016680
Last message repeated 1 times
[rtsp @ 0x7fd2c3800000] rfps: 24.500000 0.013078
[rtsp @ 0x7fd2c3800000] rfps: 24.583333 0.010223
[rtsp @ 0x7fd2c3800000] rfps: 24.666667 0.008115
[rtsp @ 0x7fd2c3800000] rfps: 24.750000 0.006755
Last message repeated 1 times
[rtsp @ 0x7fd2c3800000] rfps: 24.833333 0.006141
[rtsp @ 0x7fd2c3800000] rfps: 24.916667 0.006275
[rtsp @ 0x7fd2c3800000] rfps: 25.000000 0.007155
[rtsp @ 0x7fd2c3800000] rfps: 25.083333 0.016606
[rtsp @ 0x7fd2c3800000] rfps: 25.083333 0.008783
[rtsp @ 0x7fd2c3800000] rfps: 25.166667 0.016025
[rtsp @ 0x7fd2c3800000] rfps: 25.166667 0.011158
[rtsp @ 0x7fd2c3800000] rfps: 25.250000 0.016192
[rtsp @ 0x7fd2c3800000] rfps: 25.250000 0.014280
[rtsp @ 0x7fd2c3800000] rfps: 25.333333 0.018149
[rtsp @ 0x7fd2c3800000] rfps: 25.416667 0.018765
[rtsp @ 0x7fd2c3800000] rfps: 50.000000 0.002679
Input #0, rtsp, from ‘rtsp://10.0.1.38:8554/unicast’:
Metadata:
title : LIVE555 Streaming Media v2017.10.28
comment : LIVE555 Streaming Media v2017.10.28
Duration: N/A, start: 0.839656
, bitrate: N/A
, 25 fps, 50 tbr, 90k tbn, 50 tbc
Successfully opened the file.
Parsing a group of options: output url srtp://10.0.1.17:63888?rtcpport=63888&localrtcpport=63888&pkt_size=752.
Applying option map (set input stream mapping) with argument 0:0.
Applying option vcodec (force video codec (‘copy’ to copy stream)) with argument h264.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
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://10.0.1.17:63888?rtcpport=63888&localrtcpport=63888&pkt_size=752.
Matched encoder ‘libx264’ for codec ‘h264’.
[srtp @ 0x7fd2be43fa40] No default whitelist set
[rtp @ 0x7fd2c150b6c0] No default whitelist set
[udp @ 0x7fd2c17143c0] No default whitelist set
[udp @ 0x7fd2c150c480] No default whitelist set
[udp @ 0x7fd2c150c480] bind failed: Address already in use
srtp://10.0.1.17:63888?rtcpport=63888&localrtcpport=63888&pkt_size=752: Input/output error
[2/7/2019, 12:10:58 PM] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
This all worked fine on my previous Mac. Issue started after getting a new Mini and setting everything back up. Running 10.14.4 Beta 2 (Issue occurred on 10.14.2 and 10.14.3 as well)
Источник
If you’re trying to use the homebridge-camera-ffmpeg plugin for homebridge to connect your IP camera to Homekit, you may have run into issues with ffmpeg exiting with code 1
when trying to stream. This usually means ffmpeg can’t launch with the options provided in your camera configuration, but many different things can be going wrong and it’s hard to debug.
[1/18/2020, 8:27:54 PM] [Camera-ffmpeg] Snapshot from Front door at 480x270
[1/18/2020, 8:27:56 PM] [Camera-ffmpeg] Start streaming video from Front door with 1280x720@299kBit
[1/18/2020, 8:27:56 PM] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
There are lots of ways this can go wrong, so here are some steps to figure out where you might be having issues.
The Solution
First, confirm ffmpeg
is installed and runs on your homebridge server. Just run ffmpeg
at the command line and confirm it runs. Here’s what running it successfully looks like:
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu... etc
You may want to note the codecs that ffmpeg
has been installed with. For my particular Axis camera, it was important to have h264 support so you’ll look for --enable-libx264
.
Next, you need to make sure you have the right video and image source URLs for your axis camera. There are quite a few variations. Here is how the full configuration looks:
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Front door",
"videoConfig": {
"source": "-rtsp_transport tcp -i rtsp://user:pass@1.2.3.4/axis-media/media.amp",
"stillImageSource": "-i http://1.2.3.4/jpg/image.jpg?size=3",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 960,
"maxFPS": 30,
"vcodec": "h264"
}
}
]
}
Both source
and stillImageSource
urls can be looked up on this axis endpoint chart. Note that you need to add a username and password in the URL if configured, and of course substitute your own camera IP in for 1.2.3.4
.
Lastly, if you still can’t figure out what’s going wrong, enable debug mode for your homebridge-camera-ffmpeg
source and get more information:
...
"maxFPS": 30,
"vcodec": "h264",
"debug": true
...
This will give you more info about what the plugin sees from your camera and what the result of the ffmpeg call is when trying to fetch the stream. You should attempt to look at the video stream in Homekit to kick off the ffmpeg process.
Good day,
I’ve done a fresh install of Raspbian Stretch Lite (11/30/2019 image) on my RPi. I install FFmpeg, NodeJS, Homebridge and Homebridge-camera-ffmpeg plugin.
I add my camera to HomeKit and can see the thumbnails. When I try to view the livestream, I get the following error: I appreciate any suggestions others may have.
[2018-11-23 17:25:16] Homebridge is running on port 51826.
[2018-11-23 17:25:16] UniFi G3 Flex is running on port 34933.
[2018-11-23 17:27:26] [Camera-ffmpeg] Snapshot from UniFi G3 Flex at 480x270
ffmpeg -rtsp_transport http -re -i rtsp://192.168.2.26:7447/pqSBSzLFBznJlUHn -t 1 -s 480x270 -f image2 -
[2018-11-23 17:27:39] [Camera-ffmpeg] Snapshot from UniFi G3 Flex at 480x270
ffmpeg -rtsp_transport http -re -i rtsp://192.168.2.26:7447/pqSBSzLFBznJlUHn -t 1 -s 480x270 -f image2 -
[2018-11-23 17:27:44] [Camera-ffmpeg] Start streaming video from UniFi G3 Flex with 1280x720@299kBit
ffmpeg -rtsp_transport http -re -i rtsp://192.168.2.26:7447/pqSBSzLFBznJlUHn -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -payload_type 99 -ssrc 599742 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params +4wzxMDtR7UtUc+MkHgT5H7WRi/N+78nOzKdroIv srtp://192.168.2.18:55807?rtcpport=55807&localrtcpport=55807&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 7672808 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params AaTqZPOI8C0HUxpU2xluuwCsmSmr5a3ibSXgrem4 srtp://192.168.2.18:55957?rtcpport=55957&localrtcpport=55957&pkt_size=1316
ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, rtsp, from 'rtsp://192.168.2.26:7447/pqSBSzLFBznJlUHn':
Metadata:
title : FCECDA1F525A_2
Duration: N/A, start:
0.303000, bitrate: N/A
Stream #0:0: Audio: aac (LC), 48000 Hz, mono, fltp
Stream #0:1: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 15 fps, 15 tbr, 90k tbn, 30 tbc
Codec AVOption tune (Tune the encoding to a specific scenario) specified for output file #0 (srtp://192.168.2.18:55807?rtcpport=55807&localrtcpport=55807&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.2.18:55807?rtcpport=55807&localrtcpport=55807&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 #1 (srtp://192.168.2.18:55957?rtcpport=55957&localrtcpport=55957&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.2.18:55957?rtcpport=55957&localrtcpport=55957&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.
[swscaler @ 0xb10e90] deprecated pixel format used, make sure you did set range correctly
Output #0, rtp, to 'srtp://192.168.2.18:55807?rtcpport=55807&localrtcpport=55807&pkt_size=1316':
Metadata:
title : FCECDA1F525A_2
encoder : Lavf57.56.101
Stream #0:0: Audio: pcm_mulaw, 48000 Hz, mono, s16, 384 kb/s
Metadata:
encoder : Lavc57.64.101 pcm_mulaw
[mpeg4 @ 0xaf0e20] Either both buffer size and max rate or neither must be specified
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> pcm_mulaw (native))
Stream #0:1 -> #1:0 (h264 (native) -> mpeg4 (native))
Error while opening encoder for output stream #1:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[2018-11-23 17:27:47] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1
Issue
Using video show npm I am creating a video from multiple images. initially there was an issue but then I download and installed ffmpeg.
Now another error occurs. Thanks to everyone in advance.
This is my code:
//create a video from multiple images
var secondsToShowEachImage = 3
var finalVideoPath = '/outputImages/newvideo2.mp4'
// setup videoshow options
var videoOptions = {
fps: 24,
transition: false,
videoBitrate: 1024 ,
videoCodec: 'libx264',
size: '640x640',
outputOptions: ['-pix_fmt yuv420p'],
format: 'mp4'
}
let path1= '/InputImages/abc.jpg';
let path2 = '/InputImages/xy.jpg'
let path3 = '/InputImages/ab.jpg'
// array of images to make the 'videoshow' from
var images = [
{path: path1, loop: secondsToShowEachImage},
{path: path2, loop: secondsToShowEachImage}
]
console.log('working --->')
videoshow(images, videoOptions)
.save(finalVideoPath)
// console.log('hello world')
.on('start', function (command) {
console.log('encoding ' + finalVideoPath + ' with command ' + command)
})
.on('error', function (err) {
console.log('err' , err)
// return Promise.reject(new Error(err))
})
.on('end', function (output) {
// do stuff here when done
})
The error is
err Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!
at ChildProcess.<anonymous> (E:Video-Editor-PracticeNodees6video-editorNewVideoEditornode_modulesfluent-ffmpeglibprocessor.js:182:22)
Solution
This issue is due to images sizes. Resize all images first then try again
use this below code
use this code for all images of video.
const image = await Jimp.read(path);
image.resize(ResizeImageWidth , ResizeImageHeight )
.write(outputImagepath);
Answered By – ijaz khan
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0
#javascript #node.js #ffmpeg #video-processing
Вопрос:
Используя видео-шоу npm, я создаю видео из нескольких изображений. сначала возникла проблема, но затем я отключил и установил ffmpeg. Теперь произошла еще одна ошибка.Заранее спасибо всем. это мой код.
//create a video from multiple images
var secondsToShowEachImage = 3
var finalVideoPath = '/outputImages/newvideo2.mp4'
// setup videoshow options
var videoOptions = {
fps: 24,
transition: false,
videoBitrate: 1024 ,
videoCodec: 'libx264',
size: '640x640',
outputOptions: ['-pix_fmt yuv420p'],
format: 'mp4'
}
let path1= '/InputImages/abc.jpg';
let path2 = '/InputImages/xy.jpg'
let path3 = '/InputImages/ab.jpg'
// array of images to make the 'videoshow' from
var images = [
{path: path1, loop: secondsToShowEachImage},
{path: path2, loop: secondsToShowEachImage}
]
console.log('working --->')
videoshow(images, videoOptions)
.save(finalVideoPath)
// console.log('hello world')
.on('start', function (command) {
console.log('encoding ' finalVideoPath ' with command ' command)
})
.on('error', function (err) {
console.log('err' , err)
// return Promise.reject(new Error(err))
})
.on('end', function (output) {
// do stuff here when done
})
Ошибка в том, что
err Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!
at ChildProcess.<anonymous> (E:Video-Editor-PracticeNodees6video-editorNewVideoEditornode_modulesfluent-ffmpeglibprocessor.js:182:22)
Ответ №1:
This issue is due to images sizes. Resize all images first then try again
use this below code
use this code for all images of video.
const image = await Jimp.read(path);
image.resize(ResizeImageWidth , ResizeImageHeight )
.write(outputImagepath);
#7926
closed
defect
(invalid)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | omx |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
I am running homebridge with the «camera-ffmpeg» plug-in on a raspi.
Since update to 7:3.2.14 i have no more video and this message in the error log:
ERROR: ffmpeg exited with code 1
i use «h264_omx» as video codec.
when i switch to libx264 codec, everything works fine.
When i go back to ffmpeg 7:3.2.12-1~deb9u1+rpt1 everything works again (including omx codec)
is there a problem with this new version ?
See the detail log in the attachment !
Richard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.