[MPlayer-users] RTSP - mencoder - ffmpeg - ffserver

sid sid.is.dead at gmail.com
Mon Nov 22 18:04:39 CET 2010


Hi evryone.

I'm trying to connect my ip-cam to motion.

Due to a bandwidth problem i have to stream via RTSP a H.264 video,
but motion do not support H.264 so i have to convert the stream to
MJPEG and stream it back to motion again.

My idea was to use mencoder to read and convert the stream than pipe
the output (through a FIFO) to ffmpeg/ffserver to stream it back to
motion.

These are the commands i've been using :

 mencoder rtsp://usr:pwd@10.0.1.115:554/axis-media/media.amp -ovc lavc
-lavcopts vcodec=mjpeg -o pipe1

and

ffmpeg -an -i pipe1 http://localhost:8090/feed1.ffm

The problem with this solution is that i can see the framerate of the
mencoder output increasing till 5 fps (or similar) than ffmpeg exits
giving the error :"pipe1: Unknown format".

Here is the complete output:

$mencoder rtsp://usr:pwd@10.0.1.115:554/axis-media/media.amp -ovc lavc
-lavcopts vcodec=mjpeg -o pipe1
MEncoder 1.0rc3-4.4.4 (C) 2000-2009 MPlayer Team
Resolving 10.0.1.115 for AF_INET6...
Couldn't resolve name for AF_INET6: 10.0.1.115
Connecting to server 10.0.1.115[10.0.1.115]: 554...
librtsp: server responds: 'RTSP/1.0 401 Unauthorized'
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
STREAM_LIVE555, URL: rtsp://root:atslan@10.0.1.115:554/axis-media/media.amp
success: format: 21  data: 0x0 - 0x0
Stream not seekable!
 file format detected.
Initiated "video/H264" RTP subsession on port 33676
VIDEO:  [H264]  0x0  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:21  fourcc:0x34363248  size:0x0  fps:25.000  ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
non-existing PPS referenced
VDec: vo config request - 352 x 288 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (352x288 fourcc=47504a4d [MJPG])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.
^CPos:  11.7s    292f ( 0%)  2.80fps Trem:   0min   0mb  A-V:0.000 [1449:0]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.

Video stream: 1449.830 kbit/s  (181228 B/s)  size: 2116752 bytes
11.680 secs  292 frames


and

$ffmpeg -an -i pipe1 tryme.mjpeg
FFmpeg version SVN-r0.5.2-4:0.5.2-6, Copyright (c) 2000-2009 Fabrice
Bellard, et al.
  configuration: --extra-version=4:0.5.2-6 --prefix=/usr
--enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
--enable-libdirac --enable-libgsm --enable-libopenjpeg
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping
--disable-vhook --enable-runtime-cpudetect --enable-gpl
--enable-postproc --enable-swscale --enable-x11grab --enable-libfaad
--enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Oct  5 2010 08:33:07, gcc: 4.4.5
pipe1: Unknown format



I've tryed to move to conversion from mencoder to ffmpeg with similar
result and i've tryed to use openRTSP with ffmpeg with no result, so
i'm totally stucked.

The only solutions I'm still trying is to use mencoder and vloopback
to copy the converted stream to /dev/video0 and than read with motion
from /dev/video1.

What you think about the solution to this problem?

Thanks a lot.


More information about the MPlayer-users mailing list