Add babycam as channel
Added by Josu Lazkano over 7 years ago
Hello I have a babycam that I want to add to Tvheadend as a channel.
I can reproduce as VLC this way:
vlc rtsp://camIP:554/ch0_0.h264
And this is the stream info:
# ffmpeg -i rtsp://camIP:554/ch0_0.h264 ffmpeg version 3.2.4-1~bpo8+1 Copyright (c) 2000-2017 the FFmpeg developers ... Input #0, rtsp, from 'rtsp://camIP:554/ch0_0.h264': Metadata: title : H.264 Program Stream, streamed by the LIVE555 Media Server comment : ch0_0.h264 Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 20.08 tbr, 90k tbn, 180k tbc Stream #0:1: Audio: aac (LC), 8000 Hz, stereo, fltp
How could I add it? I read about pipe and ffmpeg. But, need I create a new Network?
I will appreciate any help.
Kind regards.
Replies (10)
RE: Add babycam as channel - Added by Mark Clarkstone over 7 years ago
Josu Lazkano wrote:
Hello I have a babycam that I want to add to Tvheadend as a channel.
I can reproduce as VLC this way:
[...]
And this is the stream info:
[...]
How could I add it? I read about pipe and ffmpeg. But, need I create a new Network?
Yes, creating a standard IPTV network will work.
I will appreciate any help.
Kind regards.
RE: Add babycam as channel - Added by Josu Lazkano over 7 years ago
Thanks!
I add a new IPTV Network, then I go tu Muxes and create one:
How could I create the pipe?
Best regards.
RE: Add babycam as channel - Added by Mark Clarkstone over 7 years ago
Where it says URL you enter
pipe:///usr/bin/ffmpeg --args
RE: Add babycam as channel - Added by Josu Lazkano over 7 years ago
Thanks!
I add this and it works:
pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://camIP:554/ch0_0.h264 -vcodec copy -acodec copy -metadata service_provider=XiaomiCam -metadata service_name=BabyCam -f mpegts -tune zerolatency pipe:1
Now I can monitor my baby from every TV in the house.
Best regards.
RE: Add babycam as channel - Added by Poul Kalff over 7 years ago
I've just ordered a Xiaomi-cam, because this is simply too exciting to NOT try it out myself; An excellent example of how many ways tvheadend can be used :-| ....and I have a baby too ;-)
RE: Add babycam as channel - Added by Jonathan Thomson over 7 years ago
It is very useful having IP cameras as channels in TVH; we have 8 cameras in and around the house and they are all mapped to channels in TVH. Before we got Sky Q installed (hence my lack of presence on these forums recently) we had Kodi in the rooms and I had it set up so that if someone rang the doorbell, a small overlay would appear for 10 seconds in the corner of the screen with the live feed from the front door camera - very cool/sad
RE: Add babycam as channel - Added by Adam Sutton over 7 years ago
I have absolutely no idea how, but the email notification for this thread ended up in my holiday folder and despite it being 3mo old I felt like I should reply as it's quite cool
I did something similar for a camera I put in my boys shed, have to admit not used it for a while but it was quite cool when it was up. Although mine predated the direct integration so I was running a sep. instance of vlc I think to create the stream.
Great to see TVH being used for cool things
RE: Add babycam as channel - Added by saen acro over 7 years ago
RE: Add babycam as channel - Added by David Silva over 6 years ago
I'm trying to add my foscam with the following url in IPTV automatic:
My link in VLC is: rtsp://user:[email protected]:554/videoMain
In tvheadend: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://user:[email protected]:554/videoMain
-vcodec copy -acodec copy -metadata service_provider=Foscam -metadata service_name=FB836 -f mpegts -tune zerolatency pipe:1
In VLC the codec information reads:
Type: Video
Codec: H264 - MPEG-4 AVC (part10) (h264)
Resolution: 1280x738
Display resolution: 1280x720
Decoded format: Planar 4:2:0
Type: Audio
Codec: PCM MU-LAW (mlaw)
Channels: Mono
Sample rate: 8000 Hz
Bits per sample: 16
This is the output from tvheadend
2018-03-13 19:43:08.226 subscription: 0027: "scan" subscribing to mux "pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://user:[email protected]:554/videoMain
-vcodec copy -acodec copy -metadata service_provider=Foscam -metadata service_name=FB836 -f mpegts -tune zerolatency pipe:1", weight: 6, adapter: "IPTV", network: "Camera", service: "Raw PID Subscription"
2018-03-13 19:43:08.226 spawn: Executing "/usr/bin/ffmpeg"
2018-03-13 19:43:08.240 spawn: Error splitting the argument list: Option not found
2018-03-13 19:43:08.241 iptv: stdin pipe unexpectedly closed: No data
2018-03-13 19:43:23.217 mpegts: pipe:///usr/bin/ffmpeg -loglevel fatal -i rtsp://user:[email protected]:554/videoMain
-vcodec copy -acodec copy -metadata service_provider=Foscam -metadata service_name=FB836 -f mpegts -tune zerolatency pipe:1 - scan no data, failed output from Tvheadend:
Any points to where I'm going wrong would be great, or if its even possible with foscam cameras.
RE: Add babycam as channel - Added by Robert Cameron over 6 years ago
Try putting the camera's URL in quotation marks. Tvheadend has had several problems in the past with parsing arguments (and not properly escaping some characters) when calling external programs.
I know that recently there were some changes made to how arguments to external programs are handled in the master branch (4.3), but I'm not sure if they were also applied to the 4.2 branch. Whether this is included in your version depends upon your particular setup.