[PD] IP camera and pidip

Olivier Heinry olivier at heinry.fr
Tue Apr 29 20:36:07 CEST 2008

Le Fri, 11 Apr 2008 03:42:02 +0200,
ydegoyon at free.fr a écrit :

> ola,
> let's see, does your ip cam delivers you a stream in the form of
> http://ip:port/something.someformat ??
> where someformat = mp4, mpg, ogg ?
> in that case, you can use that solution :
> in a  shell script :
> rm /tmp/pipe
> mknod /tmp/pipe p
> mencoder -nosound -ovc raw -of rawvideo -vf format=rgb24,crop=320:240 
> http://ip:port/something.someformat -o /tmp/pipe
> in pd :
> pdp_rawin /tmp/pipe bitmap/rgb/320x240
> suerte,
> sevy

Ola Sevy,

I've been trying your "trick" ith an Axis 214 and I only get a black screen.

here is my shell script:

#! /bin/sh
rm /tmp/pipe
mknod /tmp/pipe p
mencoder -nosound -ovc raw -of rawvideo -vf format=rgb24 rtsp:// -o /tmp/pipe

and that's the output:

~/puredata$ ./axisconnect.sh
MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Resolving for AF_INET6...
Couldn't resolve name for AF_INET6:
Connecting to server[]: 554...
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
STREAM_LIVE555, URL: rtsp://
success: format: 21  data: 0x0 - 0x0
Stream not seekable!
 file format detected.
Initiated "video/MP4V-ES" RTP subsession on port 33036
demux_rtp: Guessed the video frame rate as 15 frames-per-second.
        (If this is wrong, use the "-fps <frame-rate>" option instead.)
VIDEO:  [mp4v]  0x0  0bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:21  fourcc:0x7634706D  size:0x0  fps:15.00  ftime:=0.0667
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [format fmt=rgb24]
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
VDec: vo config request - 352 x 240 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[swscaler @ 0x8412910]No accelerated colorspace conversion found
[swscaler @ 0x8412910]SwScaler: using unscaled yuv420p -> rgb24 special converter
New_Face failed. Maybe the font path is wrong.n   0mb  A-V:0.000 [0:0]
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.

1 duplicate frame(s)!
Pos:   5.2s     78f ( 0%)  6.55fps Trem:   0min   0mb  A-V:0.000 [30022:0]

As soon as I bang the pdp_rawin object, its output to the console says:

pdp_glx: packet is not a PDP_IMAGE 

at each new frame. 

I set up the cam to send in MPEG4 in color, no clue about RGB or YUV colorspace, but it's supposed to be a NTSC 640x480 model.

Any idea what's gone wrong?



> t'es in t'es bat wrote:
> > Thanks for answer,
> > .....but i hope to realize a stream, i need it for my concept,
> > Anyone have a strategy to get the ip camera stream in mjpeg in pdip
> > for pdp_canvas
> > Or do i have to use another lib for that job????
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

More information about the Pd-list mailing list