FAQ  •  Register  •  Login

ip camera online video

<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Wed Apr 15, 2015 7:38 pm

ip camera online video

Hello all
I have created a plugin to add my IP camera video to Serviio so that I can view camera video using MediaBrowser.
Now I want to create my own web page that will show original video (not transcoded) using Flowplayer flash component.
Using CDS API I am able to get content URL
  Code:
http://server:23424/cds/resource/1000000020001274/MEDIA_ITEM/MPEG_PS_PAL-0/ORIGINAL?profile=0&authToken=465bcc876e104484a49e082b2bac8e5c

But when I setup my web page it does not work
  Code:
   <!-- the player -->
   <div class="flowplayer" data-swf="flowplayer.swf" data-ratio="0.5625">
      <video>
         <source type="video/x-flv" src="http://server:23424/cds/resource/1000000020001274/MEDIA_ITEM/MPEG_PS_PAL-0/ORIGINAL?profile=0&authToken=465bcc876e104484a49e082b2bac8e5c">
      </video>
   </div>

I can not see any video in FlowPlayer.

Can someone help me get this working?

Thank you
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Apr 16, 2015 9:29 am

Re: ip camera online video

it the token still valid at that point?
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Thu Apr 16, 2015 2:08 pm

Re: ip camera online video

Yes, auth token is active
Here is log file snippet
  Code:
2015-04-15 21:28:13,320 DEBUG [CDSRetrieveMediaServerResource] GET http://server:23424/cds/resource/1000000020001274/MEDIA_ITEM/MPEG_PS_PAL-0/ORIGINAL?profile=0&authToken=465bcc876e104484a49e082b2bac8e5c&clientId=2103 HTTP/1.1, headers = [host: server:23424,user-agent: Mozilla/5.0 (Windows NT 5.1; rv:37.0) Gecko/20100101 Firefox/37.0,accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,accept-language: en-US,en;q=0.5,accept-encoding: gzip, deflate,dnt: 1,referer: http://server:22180/flowplayer/flowplayer.swf,cookie: indextabs=2; serverstatustab=0; rendererprofiletab=0; networksettingtab=0; librarystatustabs=0,connection: keep-alive]
2015-04-15 21:28:13,321 DEBUG [CDSRetrieveMediaServerResource] Creating client with id '2103'
2015-04-15 21:28:13,321 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'Identifier=2103, Profile=Generic DLNA profile'
2015-04-15 21:28:13,321 DEBUG [ResourceDeliveryProcessor] Request for resource 1000000020001274 and type 'MEDIA_ITEM' received
2015-04-15 21:28:13,321 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000000020001274 (online)
2015-04-15 21:28:13,321 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-15 21:28:13,322 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-15 21:28:13,322 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 1000000020001274, format MPEG_PS_PAL and profile Generic DLNA profile
2015-04-15 21:28:13,322 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file rtsp://141.138.41.47:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=
2015-04-15 21:28:13,322 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "rtsp://141.138.41.47:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=": MPEG_PS_PAL
2015-04-15 21:28:13,322 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "rtsp://141.138.41.47:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=": MPEG_PS_NTSC
2015-04-15 21:28:13,323 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000000020001274 (online)
2015-04-15 21:28:13,323 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-15 21:28:13,323 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-15 21:28:13,323 DEBUG [VideoDeliveryEngine] Delivering item '1000000020001274' for client 'Identifier=2103, Profile=Generic DLNA profile'
2015-04-15 21:28:13,323 DEBUG [VideoDeliveryEngine] Delivering file 'rtsp://141.138.41.47:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=' using transcoding
2015-04-15 21:28:13,323 DEBUG [AbstractTranscodingDeliveryEngine] A suitable transcoding job already exists, re-use it for client 'Identifier=2103, Profile=Generic DLNA profile'
2015-04-15 21:28:13,332 DEBUG [TranscodingJobListener] Deleted temp file '/tmp/Serviio/transcoding-temp-1000000020001274-1-ORIGINAL.stf': true
2015-04-15 21:28:13,332 DEBUG [AbstractTranscodingDeliveryEngine] Removing transcoding job 'transcoding-temp-1000000020001274-1-ORIGINAL.stf' of client 'Identifier=2103, Profile=Generic DLNA profile'
2015-04-15 21:28:13,332 DEBUG [AbstractTranscodingDeliveryEngine] Removing transcoding listener with id transcoding-temp-1000000020001274-1-ORIGINAL.stf
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Apr 16, 2015 2:20 pm

Re: ip camera online video

You are using the generic profile (id=0), which transcodes to mpeg. You have to use the flv_player profile - note, the resource URL will then also change.
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Sun Apr 19, 2015 6:07 pm

Re: ip camera online video

I have made this changes
  Code:
   <div class="flowplayer" data-swf="flowplayer.swf" data-ratio="0.5625">
      <video>
         <source type="video/x-flv" src="http://server:23424/cds/resource/1000000020001739/MEDIA_ITEM/FLV-0/ORIGINAL?profile=flv_player&authToken=a13535a121944425bc1d2c957ef35e61">
      </video>
   </div>


and this is the log file
  Code:
2015-04-19 20:02:34,920 DEBUG [CDSRetrieveMediaServerResource] GET http://server:23424/cds/resource/1000000020001739/MEDIA_ITEM/FLV-0/ORIGINAL?profile=flv_player&authToken=a13535a121944425
bc1d2c957ef35e61 HTTP/1.1, headers = [host: server:23424,user-agent: Mozilla/5.0 (Windows NT 5.1; rv:37.0) Gecko/20100101 Firefox/37.0,accept: text/html,application/xhtml+xml,application/x
ml;q=0.9,*/*;q=0.8,accept-language: en-US,en;q=0.5,accept-encoding: gzip, deflate,dnt: 1,referer: http://server:22180/flowplayer/flowplayer.swf,cookie: indextabs=1; serverstatustab=0; rend
ererprofiletab=0; networksettingtab=0; librarystatustabs=0,connection: keep-alive]
2015-04-19 20:02:34,921 DEBUG [CDSRetrieveMediaServerResource] Creating client with id '89.164.160.71'
2015-04-19 20:02:34,921 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'Identifier=89.164.160.71, Profile=Flash player'
2015-04-19 20:02:34,921 DEBUG [ResourceDeliveryProcessor] Request for resource 1000000020001739 and type 'MEDIA_ITEM' received
2015-04-19 20:02:34,921 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000000020001739 (online)
2015-04-19 20:02:34,921 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-19 20:02:34,921 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-19 20:02:34,921 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 1000000020001739, format FLV and profile Flash player
2015-04-19 20:02:34,921 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=
2015-04-19 20:02:34,922 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=": FLV
2015-04-19 20:02:34,922 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=": FLV
2015-04-19 20:02:34,922 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file "rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=": FLV
2015-04-19 20:02:34,922 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000000020001739 (online)
2015-04-19 20:02:34,922 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-19 20:02:34,922 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 2)
2015-04-19 20:02:34,922 DEBUG [VideoDeliveryEngine] Delivering item '1000000020001739' for client 'Identifier=89.164.160.71, Profile=Flash player'
2015-04-19 20:02:34,922 DEBUG [VideoDeliveryEngine] Delivering file 'rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=' using transcoding
2015-04-19 20:02:34,922 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'Identifier=89.164.160.71, Profile=Flash player'
2015-04-19 20:02:34,926 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=
2015-04-19 20:02:34,927 DEBUG [ProcessExecutor] Starting /opt/ffmpeg/bin/ffmpeg -rtsp_transport +tcp+udp -analyzeduration 10000000 -fflags +genpts -threads auto -i rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM= -y -threads auto -c:v copy -an -map 0:0 -sn -f flv /tmp/Serviio/transcoding-temp-1000000020001739-flv_player-ORIGINAL.stf


This time, flowplayer shows the picture from the camera (snapshot) and when I click play nothing happens, no video stream is shown.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Apr 20, 2015 11:05 am

Re: ip camera online video

Did yopu add it as live stream? It transcodes into a file, live stream should use pipe: as the output.

What happens if you run:

  Code:
/opt/ffmpeg/bin/ffmpeg -rtsp_transport +tcp+udp -analyzeduration 10000000 -fflags +genpts -threads auto -i rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZX
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Fri Apr 24, 2015 7:14 am

Re: ip camera online video

When I run this
  Code:
/opt/ffmpeg/bin/ffmpeg -rtsp_transport +tcp+udp -analyzeduration 10000000 -fflags +genpts -threads auto -i rtsp://141.136.221.69:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=

I get this as a result
  Code:
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 25 2015 23:24:34 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/ffmpeg --enable-libx264 --enable-gpl --enable-avcodec --enable-static --extra-cflags='-I=/opt/x264/lib/pkgconfig' --extra-ldflags='-I=/opt/x264/lib/pkgconfig'
  libavutil      54. 14.100 / 54. 14.100
  libavcodec     56. 12.101 / 56. 12.101
  libavformat    56. 14.100 / 56. 14.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, rtsp, from 'rtsp://141.136.221.69:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.319956, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
At least one output file must be specified
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Apr 24, 2015 4:00 pm

Re: ip camera online video

and this?

  Code:
/opt/ffmpeg/bin/ffmpeg -rtsp_transport +tcp+udp -analyzeduration 10000000 -fflags +genpts -threads auto -i rtsp://89.164.160.71:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM= -y -threads auto -c:v copy -an -map 0:0 -sn -f flv /tmp/Serviio/transcoding-temp-1000000020001739-flv_player-ORIGINAL.stf
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Fri Apr 24, 2015 9:16 pm

Re: ip camera online video

  Code:
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 25 2015 23:24:34 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/ffmpeg --enable-libx264 --enable-gpl --enable-avcodec --enable-static --extra-cflags='-I=/opt/x264/lib/pkgconfig' --extra-ldflags='-I=/opt/x264/lib/pkgconfig'
  libavutil      54. 14.100 / 54. 14.100
  libavcodec     56. 12.101 / 56. 12.101
  libavformat    56. 14.100 / 56. 14.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[h264 @ 0x1f12800] RTP: missed 1 packets
[h264 @ 0x1f12800] RTP: missed 22 packets
[h264 @ 0x1f12800] RTP: missed 12 packets
[h264 @ 0x1f12800] RTP: missed 6 packets
    Last message repeated 3 times
[h264 @ 0x1f12800] RTP: missed 5 packets
[h264 @ 0x1f12800] RTP: missed 7 packets
[h264 @ 0x1f12800] RTP: missed 16 packets
[h264 @ 0x1f12800] RTP: missed 7 packets
[h264 @ 0x1f12800] RTP: missed 6 packets
[h264 @ 0x1f12800] RTP: missed 7 packets
    Last message repeated 1 times
Input #0, rtsp, from 'rtsp://141.136.221.69:22554/ISAPI/streaming/channels/101?auth=cHVzZXI6UHVzZXIxMjM=':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.319889, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
Output #0, flv, to '/tmp/Serviio/transcoding-temp-1000000020001739-flv_player-ORIGINAL.stf':
  Metadata:
    title           : Media Presentation
    encoder         : Lavf56.14.100
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 1920x1080, q=2-31, 25 fps, 1k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[flv @ 0x206ecc0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -200; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0x206ecc0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -160; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0x206ecc0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -120; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0x206ecc0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -80; changing to 0. This may result in incorrect timestamps in the output file.
[flv @ 0x206ecc0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -40; changing to 0. This may result in incorrect timestamps in the output file.
[NULL @ 0x1f12800] RTP: missed 6 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
[NULL @ 0x1f12800] RTP: missed 16 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
[NULL @ 0x1f12800] RTP: missed 6 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
    Last message repeated 2 times
[NULL @ 0x1f12800] RTP: missed 6 packets
[NULL @ 0x1f12800] RTP: missed 17 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
    Last message repeated 1 times
[NULL @ 0x1f12800] RTP: missed 6 packets
[NULL @ 0x1f12800] RTP: missed 8 packets
    Last message repeated 1 times
[NULL @ 0x1f12800] RTP: missed 7 packetskB time=00:00:01.64 bitrate=1461.8kbits/s
[NULL @ 0x1f12800] RTP: missed 15 packets
[NULL @ 0x1f12800] RTP: missed 8 packets
    Last message repeated 2 times
[NULL @ 0x1f12800] RTP: missed 7 packets
[NULL @ 0x1f12800] RTP: missed 27 packets
[NULL @ 0x1f12800] RTP: missed 6 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
[NULL @ 0x1f12800] RTP: missed 8 packets
[NULL @ 0x1f12800] RTP: missed 7 packetskB time=00:00:02.16 bitrate=1242.9kbits/s
[NULL @ 0x1f12800] RTP: missed 9 packets
[NULL @ 0x1f12800] RTP: missed 18 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
[NULL @ 0x1f12800] RTP: missed 8 packets
[NULL @ 0x1f12800] RTP: missed 18 packets
[NULL @ 0x1f12800] RTP: missed 5 packets
[NULL @ 0x1f12800] RTP: missed 9 packets
[NULL @ 0x1f12800] RTP: missed 20 packets
[NULL @ 0x1f12800] RTP: missed 5 packets
[NULL @ 0x1f12800] RTP: missed 19 packets
[NULL @ 0x1f12800] RTP: missed 6 packets
[NULL @ 0x1f12800] RTP: missed 14 packets
[NULL @ 0x1f12800] RTP: missed 10 packetsB time=00:00:02.72 bitrate=1098.6kbits/s
[NULL @ 0x1f12800] RTP: missed 8 packets
[NULL @ 0x1f12800] RTP: missed 9 packets
[NULL @ 0x1f12800] RTP: missed 15 packets
[NULL @ 0x1f12800] RTP: missed 2 packets
[NULL @ 0x1f12800] RTP: missed 20 packets
[NULL @ 0x1f12800] RTP: missed 7 packets
[NULL @ 0x1f12800] RTP: missed 42 packets
[NULL @ 0x1f12800] RTP: missed 6 packets
frame=   70 fps= 31 q=-1.0 Lsize=     396kB time=00:00:03.28 bitrate= 988.9kbits/s
video:394kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.426018%
Received signal 2: terminating.
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Thu Apr 30, 2015 10:35 am

Re: ip camera online video

Any feedback on the output that I have last posted?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Apr 30, 2015 4:10 pm

Re: ip camera online video

It looks ok.

How did you add the stream to the console?
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Fri May 01, 2015 7:10 am

Re: ip camera online video

Camera is connected to my ADSL router and it connects to dynamic DNS service. My Groovy plugin fetches the camera IP address from dynamic DNS service creates the URL and adds it to the Serviio.
In Mediabrowser everything is working fine, I can see the camera in Online library and I can watch the video.
As I said the problem is when I try to watch the video in my web page.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue May 05, 2015 5:06 pm

Re: ip camera online video

So first, you should set 'live' attribute on the ContentURLContainer to 'true', otherwise you'll run out of disk space.

Second, does that Serviio URL play in VLC?
<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Thu May 07, 2015 1:57 pm

Re: ip camera online video

Yes, URL from the camera plays in VLC and other players.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu May 07, 2015 8:10 pm

Re: ip camera online video

I don't meant the URL from the camera, but the URL from serviio (that delivers the camera stream)

Return to Third-party tools integration

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.